Skip to content

Commit

Permalink
fix(StoreModule) Fix typing to accept InjectionToken
Browse files Browse the repository at this point in the history
forFeature method accepts also InjectionToken as reducer, but this was disallowed by typescript definition.
  • Loading branch information
Szpadel authored Sep 11, 2017
1 parent 669b2f4 commit 6382791
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/store/src/store_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,17 @@ export class StoreModule {

static forFeature<T, V extends Action = Action>(
featureName: string,
reducers: ActionReducerMap<T, V>,
reducers: ActionReducerMap<T, V> | InjectionToken<ActionReducerMap<T, V>>,
config?: StoreConfig<T, V>
): ModuleWithProviders;
static forFeature<T, V extends Action = Action>(
featureName: string,
reducer: ActionReducer<T, V>,
reducer: ActionReducer<T, V>| InjectionToken<ActionReducer<T, V>>,
config?: StoreConfig<T, V>
): ModuleWithProviders;
static forFeature(
featureName: string,
reducers: ActionReducerMap<any, any> | ActionReducer<any, any>,
reducers: ActionReducerMap<any, any> | InjectionToken<ActionReducerMap<any, any>> | ActionReducer<any, any> | InjectionToken<ActionReducer<any, any>>,
config: StoreConfig<any, any> = {}
): ModuleWithProviders {
return {
Expand Down

0 comments on commit 6382791

Please sign in to comment.