Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed Feb 4, 2024
1 parent 3bbf1fa commit 593e420
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/toolkit/src/entities/slice_creator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ export const entityMethodsCreator: ReducerCreator<
adapter,
{
selectEntityState = (state) => state,
// template literal computed keys don't keep their type if there's an unresolved generic
// so we cast to some intermediate type to at least check we're using the right variables in the right places
name = '' as 's',
pluralName = name && (`${name}s` as 'p'),
}: EntityMethodsCreatorConfig<any, any, any, 's', 'p'> = {},
Expand Down

0 comments on commit 593e420

Please sign in to comment.