Skip to content

Commit

Permalink
fix(module): add TranslateModule type to ModuleWithProviders
Browse files Browse the repository at this point in the history
According to https://angular.io/api/core/ModuleWithProviders you should add a generic type to any ModuleWithProviders
  • Loading branch information
alfonsserra committed Feb 12, 2020
1 parent 24b7b2b commit 60d256e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/ngx-translate/core/src/public_api.ts
Expand Up @@ -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<TranslateModule> {
return {
ngModule: TranslateModule,
providers: [
Expand All @@ -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<TranslateModule> {
return {
ngModule: TranslateModule,
providers: [
Expand Down

0 comments on commit 60d256e

Please sign in to comment.