Skip to content

Conversation

jonapgartwohat
Copy link

@jonapgartwohat jonapgartwohat commented Oct 22, 2021

In version 8 of nestjs, the intercept method of the NestInterceptor interface has a new signature:

intercept(context: ExecutionContext, next: CallHandler<T>): Observable<R> | Promise<Observable<R>>;

Prior to this PR, the intercept method in DataLoaderInterceptor was incompatible, yielding the following TS error.

Type 'Observable<any>' is not assignable to type 'Observable<any> | Promise<Observable<any>>'.

I also removed the rxjs dependency as it's no longer needed.

fixes: #50

@jonapgartwohat jonapgartwohat changed the title support nestjs v8 NestInterceptor interface DRAFT: support nestjs v8 NestInterceptor interface Oct 22, 2021
@jonapgartwohat jonapgartwohat changed the title DRAFT: support nestjs v8 NestInterceptor interface support nestjs v8 NestInterceptor interface Oct 22, 2021
@jonapgartwohat
Copy link
Author

closing in favor of #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Property 'intercept' in type 'DataLoaderInterceptor' is not assignable to the same property in base type 'NestInterceptor<any, any>'.
1 participant