You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regardless of what this class does, this compiled perfectly with 5.3.0. When I upgrade to 5.4.0 I'm getting the following TS error:
Class 'LabResolver' incorrectly implements interface 'Resolve<Lab>'.
Types of property 'resolve' are incompatible.
Type '(route: ActivatedRouteSnapshot) => Observable<Lab>' is not assignable to type '(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => Lab | Observable<Lab> | Promise<Lab>'.
Type 'Observable<Lab>' is not assignable to type 'Lab | Observable<Lab> | Promise<Lab>'.
Type 'Observable<Lab>' is not assignable to type 'Promise<Lab>'.
Property 'then' is missing in type 'Observable<Lab>'.
I looked into the changelog to see if there's anything that might be related. The only thing I could think of was ade1fd5, however this is just me speculating here.
Maybe another important information: This basically happens in all "resolver" classes. Apart from resolvers being an Angular specific context, I think it boils down to the fact that a resolver's resolve() method always returns: any | Observable<any> | Promise<any>, where any is what ever you put into the Resolve generic.
I hope this is the right place to ask for help.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi everyone,
I ran into a regression when upgrading from RxJS
5.3.0
to5.4.0
in my Angular project. Basically, I have a class that looks like:Regardless of what this class does, this compiled perfectly with 5.3.0. When I upgrade to 5.4.0 I'm getting the following TS error:
I looked into the changelog to see if there's anything that might be related. The only thing I could think of was ade1fd5, however this is just me speculating here.
Maybe another important information: This basically happens in all "resolver" classes. Apart from resolvers being an Angular specific context, I think it boils down to the fact that a resolver's
resolve()
method always returns:any | Observable<any> | Promise<any>
, where any is what ever you put into the Resolve generic.I hope this is the right place to ask for help.
Thanks!
The text was updated successfully, but these errors were encountered: