Skip to content

Commit 1c25ed1

Browse files
fix(overmind): typing issue
1 parent 8db3752 commit 1c25ed1

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

packages/node_modules/overmind/src/internalTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export interface Events {
151151

152152
// ============= PRIVATE TYPES FOR APP
153153

154-
export type ResolveState<State extends IState | null> = State extends undefined
154+
export type ResolveState<State extends IState | null | undefined> = State extends undefined
155155
? State
156156
: {
157157
[P in keyof State]: State[P] extends (parent: ResolveState<IState>, root: any) => any

packages/node_modules/overmind/src/types.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,18 @@ export type IConfiguration = {
1313
actions?: {}
1414
}
1515

16-
export type IState =
17-
| {
18-
[key: string]:
19-
| IState
20-
| string
21-
| IDerive<any, any, any>
22-
| number
23-
| boolean
24-
| object
25-
| null
26-
| undefined
27-
}
28-
| undefined
16+
export type IState = {
17+
[key: string]:
18+
| IState
19+
| string
20+
| IDerive<any, any, any>
21+
| number
22+
| boolean
23+
| object
24+
| null
25+
| undefined
26+
}
27+
2928

3029
export interface IConfig<ThisConfig extends IConfiguration> {
3130
state: ThisConfig['state'] & {}

0 commit comments

Comments
 (0)