ngx-translate / http-loader

A loader for ngx-translate that loads translations with http calls
MIT License
193 stars 69 forks source link

Fixed wrong return value from getTranslations: Observable<any> inste… #46

Closed CodeAndWeb closed 6 years ago

CodeAndWeb commented 6 years ago

Return type should be Observable as defined in TranslateLoader, not any.

CodeAndWeb commented 6 years ago

Well... it is a peer dependency, isn't it?

ocombe commented 6 years ago

it is a transitive dependency since we require ngx translate core which requires rxjs, but it's not a direct dependency: https://github.com/ngx-translate/http-loader/blob/master/lib/package.json#L21-L25

CodeAndWeb commented 6 years ago

Yes.. but TranslateLoader defines the interface as public getTranslation(lang: string): Observable<any>. Implementing it with public getTranslation(lang: string):any violates that interface contract.

It's just that Typescript and tslint do not seem to care about it - at least not in the current version.