Property 'getTranslation' in type 'MultiTranslateHttpLoader' is not assignable to the same property in base type 'TranslateLoader
peddikishore opened this issue · 5 comments
When using the latest version 8.0.2 with Angular 14 we are getting this error
Error: node_modules/ngx-translate-multi-http-loader/dist/multi-http-loader.d.ts:12:5 - error TS2416: Property 'getTranslation' in type 'MultiTranslateHttpLoader' is not assignable to the same property in base type 'TranslateLoader'.
Type '(lang: string) => import("D:/zyto/zyto.insights.customerportal/node_modules/ngx-translate-multi-http-loader/node_modules/rxjs/dist/types/internal/Observable").Observable' is not assignable to type '(lang: string) => import("D:/zyto/zyto.insights.customerportal/node_modules/rxjs/internal/Observable").Observable'.
Type 'Observable' is missing the following properties from type 'Observable': _isScalar, _trySubscribe, _subscribe
12 getTranslation(lang: string): Observable;
Need help here, please.
Facing the same issue, after upgrading angular to 14, with the below listed versions. Please let us know if there is any solution
ngx-translate-multi-http-loader: "8.0.2",
Angular: 14.0.6
@ngx-translate/core": "^14.0.0"
Same issue here:
/rxjs/dist/types/internal/types").TeardownLogic'.
Types of parameters 'subscriber' and 'subscriber' are incompatible.
Property '_finalizers' is missing in type 'import("xxx/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber' but required in type 'import("xxx/node_modules/ngx-translate-multi-http-loader/node_modules/rxjs/dist/types/internal/Subscriber").Subscriber'.
Is this project either under manteniment or is abandoned!?
I am not sure what is the issue but I think it might be the easiest if you just copy the code from https://github.com/denniske/ngx-translate-multi-http-loader/blob/master/src/multi-http-loader.ts into your project instead using the library using npm to solve this issue.
If somebody has a fix for this please open a PR. I don't have the bandwidth to maintain this project at the moment.
@peddikishore Close as fixed in the latest release https://github.com/rbalet/ngx-translate-multi-http-loader/releases/tag/v9.0.0.
Please open the issue again in case this wouldn't be the case