Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(store): use variadic tuple types for createSelector #3023

Merged
3 changes: 1 addition & 2 deletions modules/entity/src/state_selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export function createSelectorsFactory<T>() {
const selectAll = createSelector(
selectIds,
selectEntities,
(ids: T[], entities: Dictionary<T>): any =>
ids.map((id: any) => (entities as any)[id])
(ids, entities): any => ids.map((id: any) => (entities as any)[id])
);

const selectTotal = createSelector(selectIds, (ids) => ids.length);
Expand Down
2 changes: 1 addition & 1 deletion modules/store/spec/selector.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe('Selectors', () => {
const selectorFn = jasmine
.createSpy(
'selectorFn',
createSelector((state) => state, projectorFn)
createSelector((state: any) => state, projectorFn)
david-shortman marked this conversation as resolved.
Show resolved Hide resolved
)
.and.callThrough();

Expand Down
Loading