Skip to content

Commit 5868f77

Browse files
committed
Try using ACR[T] over {} within ValidateSliceCaseReducers
1 parent d2d0f70 commit 5868f77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/toolkit/src/createSlice.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ export interface CreateSliceOptions<
9999
/**
100100
* A callback that receives a *builder* object to define
101101
* case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`.
102-
*
102+
*
103103
* Alternatively, a mapping from action types to action-type-specific *case reducer*
104104
* functions. These reducers should have existing action types used
105105
* as the keys, and action creators will _not_ be generated.
106-
*
106+
*
107107
* @example
108108
```ts
109109
import { createAction, createSlice, Action, AnyAction } from '@reduxjs/toolkit'
@@ -253,7 +253,7 @@ export type ValidateSliceCaseReducers<
253253
? {
254254
prepare(...a: never[]): Omit<A, 'type'>
255255
}
256-
: {}
256+
: ACR[T]
257257
}
258258

259259
function getType(slice: string, actionKey: string): string {

0 commit comments

Comments
 (0)