( featureName: any )
| 708 | featureName: keyof T |
| 709 | ): MemoizedSelector<T, V>; |
| 710 | export function createFeatureSelector( |
| 711 | featureName: any |
| 712 | ): MemoizedSelector<any, any> { |
| 713 | return createSelector( |
| 714 | (state: any) => { |
| 715 | const featureState = state[featureName]; |
| 716 | if (!isNgrxMockEnvironment() && isDevMode() && !(featureName in state)) { |
| 717 | console.warn( |
| 718 | `@ngrx/store: The feature name "${featureName}" does ` + |
| 719 | 'not exist in the state, therefore createFeatureSelector ' + |
| 720 | 'cannot access it. Be sure it is imported in a loaded module ' + |
| 721 | `using StoreModule.forRoot('${featureName}', ...) or ` + |
| 722 | `StoreModule.forFeature('${featureName}', ...). If the default ` + |
| 723 | 'state is intended to be undefined, as is the case with router ' + |
| 724 | 'state, this development-only warning message can be ignored.' |
| 725 | ); |
| 726 | } |
| 727 | return featureState; |
| 728 | }, |
| 729 | (featureState: any) => featureState |
| 730 | ); |
| 731 | } |
| 732 | |
| 733 | function isSelectorsDictionary( |
| 734 | selectors: unknown |
no test coverage detected