Skip to content

Commit ed2edf2

Browse files
fix(overmind): fix circular typing issues
1 parent 8589094 commit ed2edf2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/node_modules/overmind/src/internalTypes.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,13 @@ export type ResolveAction<T> = T extends IOperator<void, infer R>
172172
: never
173173

174174
export interface ContextFunction<P extends any, R extends any> {
175-
(context: IContext<any>, payload: P): R
175+
(context: { state: any; actions: any; effects: any }, payload: P): R
176176
}
177177

178178
// This resolves promises to its values, cause that is how operators work
179179
export interface OperatorContextFunction<P extends any, R extends any> {
180-
(context: IContext<any>, payload: P extends Promise<infer PP> ? PP : P): R
180+
(
181+
context: { state: any; actions: any; effects: any },
182+
payload: P extends Promise<infer PP> ? PP : P
183+
): R
181184
}

0 commit comments

Comments
 (0)