Andreas Loew

Results 71 comments of Andreas Loew

I've included this into the new fork at https://github.com/CodeAndWeb/ngx-translate

Interesting. Did you try to run the lint job?

I've made some more modifications and completely removed "any" from the interface now. The issue why the "any" was required was the tests. Adding the "as string" fixed the issue....

From a technical standpoint, I completely agree with you. I don't like the API for get() and instant() either - but I currently see no way to change it because...

What I would prefer is a way to configure the library like this - but this obviously can't exist in typescript: ~~~ if(ngxTanslateSticeMode) export type Translation=StrictTranslation; else export type Translation=StrictTranslation|any;...

What about using the TranslateCompiler - it provides exactly the way to manipulate the translations after loading.

Related to: https://github.com/ngx-translate/core/issues/751 In this case: JSON is invalid. I suppose the best position to catch the error is creating a `TranslateLoader` that handles the failed loading (missing file, invalid...

Added it here: https://ngx-translate.org/resources/plugins/ That's all we can do currently...