I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
What is the current behavior?
Adding a selector with selectIds from .adapter.getSelectors() throws a type error.
Using the example-app:
export const {
selectIds: getBookIds,
selectEntities: getBookEntities,
selectAll: getAllBooks,
selectTotal: getTotalBooks
} = fromBooks.adapter.getSelectors(getBookEntitiesState)
const selectTest = createSelector(
getBookIds,
getBookEntities,
(ids, entities) => {
return { ids, entities }
}
)
Error:
/platform-master/example-app/app/books/reducers/index.ts (97,3): Argument of type '((state: object) => number[]) | ((state: object) => string[])' is not assignable to parameter of type 'Selector<object, number[]>'.
Type '(state: object) => string[]' is not assignable to type 'Selector<object, number[]>'.
Type 'string[]' is not assignable to type 'number[]'.
Type 'string' is not assignable to type 'number'.
Version of affected browser(s),operating system(s), npm, node and ngrx:
@ngrx/entity 4.1.0
I'm submitting a...
What is the current behavior?
Adding a selector with
selectIdsfrom.adapter.getSelectors()throws a type error.Using the
example-app:Error:
Version of affected browser(s),operating system(s), npm, node and ngrx:
@ngrx/entity 4.1.0