When compiling angular.io examples after update to rxjs v6 I'm getting the following error:
node_modules/angular-in-memory-web-api/http-client-backend.service.d.ts(32,22): error TS2420: Class 'HttpClientBackendService' incorrectly implements interface 'HttpBackend'.
Types of property 'handle' are incompatible.
Type '(req: HttpRequest<any>) => Observable<HttpResponse<any>>' is not assignable to type '(req: HttpRequest<any>) => Observable<HttpEvent<any>>'.
Type 'Observable<HttpResponse<any>>' is not assignable to type 'Observable<HttpEvent<any>>'.
Property 'source' is protected but type 'Observable<T>' is not a class derived from 'Observable<T>'.
I haven't investigated why this error is surfaced only now, but it does seem that the interface is incorrectly implemented. See:
When compiling angular.io examples after update to rxjs v6 I'm getting the following error:
I haven't investigated why this error is surfaced only now, but it does seem that the interface is incorrectly implemented. See:
https://github.com/angular/in-memory-web-api/blob/748891871fdb61d071f9dbf57fa8174924cebfb7/src/in-mem/http-client-backend.service.ts#L64
Which returns an
Observable<HttpResponse<any>>
and not it's super classObservable<HttpEvent<any>>
.Found in version: 0.5.3
Workaround: disable typecheck of 3rd party code by setting
"skipLibCheck": true
in tsconfig.json.