Skip to content

Commit 60d256e

Browse files
authored
fix(module): add TranslateModule type to ModuleWithProviders
According to https://angular.io/api/core/ModuleWithProviders you should add a generic type to any ModuleWithProviders
1 parent 24b7b2b commit 60d256e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/ngx-translate/core/src/public_api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class TranslateModule {
4646
/**
4747
* Use this method in your root module to provide the TranslateService
4848
*/
49-
static forRoot(config: TranslateModuleConfig = {}): ModuleWithProviders {
49+
static forRoot(config: TranslateModuleConfig = {}): ModuleWithProviders<TranslateModule> {
5050
return {
5151
ngModule: TranslateModule,
5252
providers: [
@@ -66,7 +66,7 @@ export class TranslateModule {
6666
/**
6767
* Use this method in your other (non root) modules to import the directive/pipe
6868
*/
69-
static forChild(config: TranslateModuleConfig = {}): ModuleWithProviders {
69+
static forChild(config: TranslateModuleConfig = {}): ModuleWithProviders<TranslateModule> {
7070
return {
7171
ngModule: TranslateModule,
7272
providers: [

0 commit comments

Comments
 (0)