From 60d256e29fade32d34e70cd3a149ca54788754e7 Mon Sep 17 00:00:00 2001 From: Alfons Serra Date: Wed, 12 Feb 2020 12:10:47 +0100 Subject: [PATCH] fix(module): add `TranslateModule` type to `ModuleWithProviders` According to https://angular.io/api/core/ModuleWithProviders you should add a generic type to any ModuleWithProviders --- projects/ngx-translate/core/src/public_api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/ngx-translate/core/src/public_api.ts b/projects/ngx-translate/core/src/public_api.ts index a0ba03f9..ea548f7b 100644 --- a/projects/ngx-translate/core/src/public_api.ts +++ b/projects/ngx-translate/core/src/public_api.ts @@ -46,7 +46,7 @@ export class TranslateModule { /** * Use this method in your root module to provide the TranslateService */ - static forRoot(config: TranslateModuleConfig = {}): ModuleWithProviders { + static forRoot(config: TranslateModuleConfig = {}): ModuleWithProviders { return { ngModule: TranslateModule, providers: [ @@ -66,7 +66,7 @@ export class TranslateModule { /** * Use this method in your other (non root) modules to import the directive/pipe */ - static forChild(config: TranslateModuleConfig = {}): ModuleWithProviders { + static forChild(config: TranslateModuleConfig = {}): ModuleWithProviders { return { ngModule: TranslateModule, providers: [