Skip to content

Commit bc848b4

Browse files
fix(overmind): fix null typing of ResolveState
1 parent 34a1789 commit bc848b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/node_modules/overmind/src/internalTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ export interface Events {
153153

154154
type Derived = (parent: any, config: any) => any
155155

156-
export type ResolveState<State extends IState> = State extends undefined
156+
export type ResolveState<State extends IState | null> = State extends undefined
157157
? {}
158158
: {
159159
[P in keyof State]: State[P] extends Derived
160160
? ReturnType<State[P]>
161161
: State[P] extends Array<any>
162162
? State[P]
163-
: State[P] extends IState
163+
: State[P] extends IState | null
164164
? ResolveState<State[P]>
165165
: State[P]
166166
}

0 commit comments

Comments
 (0)