Following the documentation here to use createFeatureSelector here:
https://github.com/ngrx/platform/blob/master/docs/store/selectors.md#createfeatureselector
I get an error:
ERROR in src/app/admin/reducers/index.ts(20,33): error TS2558: Expected 1 type arguments, but got 2.
But in the documention, we do have 2 type arguments being supplied:
export const selectFeature = createFeatureSelector<AppState, FeatureState>(
'feature'
);
I would expect that code present in the documenation and the example app to work fine.
ngrx/store version: 6.0.1
Angular CLI: 6.0.8
Node: 8.11.3
OS: darwin x64
Angular: 6.0.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 6.0.8
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.1
typescript 2.7.2
webpack 4.8.3
[x] Yes (But I wouldn't know where to start)
[ ] No
Hi, this will be added in the next release of NgRx.
The documentation is based on the master branch.
To use createFeatureSelector now, you should do:
export const selectFeature = createFeatureSelector<FeatureState>('feature');
@tdeschryver thanks for the quick response !
Most helpful comment
Hi, this will be added in the next release of NgRx.
The documentation is based on the master branch.
To use
createFeatureSelectornow, you should do: