Skip to content

Commit 17bf9ed

Browse files
committed
Fix dispatch type in AsyncThunkAction to be NonNullable
- This was done so that the type tests for TypeScript v4.7 and v4.8 pass.
1 parent 7f1ef6b commit 17bf9ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/toolkit/src/createAsyncThunk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export type AsyncThunkAction<
240240
ThunkArg,
241241
ThunkApiConfig extends AsyncThunkConfig,
242242
> = (
243-
dispatch: GetDispatch<ThunkApiConfig>,
243+
dispatch: NonNullable<GetDispatch<ThunkApiConfig>>,
244244
getState: () => GetState<ThunkApiConfig>,
245245
extra: GetExtra<ThunkApiConfig>,
246246
) => SafePromise<

0 commit comments

Comments
 (0)