Skip to content

Commit

Permalink
possibly shave some bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed Feb 11, 2024
1 parent 52b5604 commit cb6717d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/toolkit/src/entities/create_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function createEntityAdapter<T>(
const stateAdapter = sortComparer
? createSortedStateAdapter(selectId, sortComparer)
: createUnsortedStateAdapter(selectId)
const stateFactory = createInitialStateFactory({ stateAdapter })
const stateFactory = createInitialStateFactory(stateAdapter)
const selectorsFactory = createSelectorsFactory<T, EntityId>()

return {
Expand Down
8 changes: 3 additions & 5 deletions packages/toolkit/src/entities/entity_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ export function getInitialEntityState<T, Id extends EntityId>(): EntityState<
}
}

export function createInitialStateFactory<T, Id extends EntityId>({
stateAdapter,
}: {
stateAdapter: EntityStateAdapter<T, Id>
}): EntityStateFactory<T, Id> {
export function createInitialStateFactory<T, Id extends EntityId>(
stateAdapter: EntityStateAdapter<T, Id>,
): EntityStateFactory<T, Id> {
function getInitialState(
state?: undefined,
entities?: readonly T[] | Record<Id, T>,
Expand Down

0 comments on commit cb6717d

Please sign in to comment.