Skip to content

Commit bb4b09f

Browse files
author
James Salas
committed
fix: type signature in animal reducer
1 parent cb4a563 commit bb4b09f

File tree

1 file changed

+4
-1
lines changed
  • packages/example-app/src/app/animals/api

1 file changed

+4
-1
lines changed

packages/example-app/src/app/animals/api/reducer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ export function createAnimalAPIReducer(animalType: AnimalType) {
3232
case AnimalAPIActions.LOAD_SUCCEEDED:
3333
return {
3434
...state,
35-
items: indexBy<Animal>(prop('id'), action.payload!),
35+
items: indexBy<Animal, { [key: string]: Animal }>(
36+
prop('id'),
37+
action.payload!,
38+
),
3639
loading: false,
3740
error: null,
3841
};

0 commit comments

Comments
 (0)