Skip to content

Commit

Permalink
change void to unknown in InferArgs type
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebubekir-Tas committed Jul 9, 2024
1 parent c09c28a commit edebc6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/immer/create-slice-with-immer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { produce } from 'immer';
import type { Draft } from 'immer';

// Utility type to infer the argument types of the actions
type InferArgs<T> = T extends (...args: infer A) => void ? A : never;
type InferArgs<T> = T extends (...args: infer A) => unknown ? A : never;

type SliceActions<Value> = {
[actionName: string]: (
Expand Down

0 comments on commit edebc6f

Please sign in to comment.