Skip to content

Commit

Permalink
fix:enable the immer plugin, type ts (#11277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry-qiqi committed Jun 15, 2023
1 parent ec47f4a commit bf38fce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugins/src/dva.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ interface EffectsCommandMap {
interface Action<T = any> {
type: T
}
export type Reducer<S = any, A extends Action = AnyAction> = (prevState: S, action: A) => S;
export type Reducer<S = any, A extends Action = AnyAction> = (prevState: S, action: A) => ${api.config.dva?.immer? 'S | void' : 'S'};
export type Effect = (action: AnyAction, effects: EffectsCommandMap) => void;
type EffectType = 'takeEvery' | 'takeLatest' | 'watcher' | 'throttle';
type EffectWithType = [Effect, { type: EffectType }];
Expand Down

0 comments on commit bf38fce

Please sign in to comment.