File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import {
1818 ResolveState ,
1919 Execution ,
2020 ResolveMockActions ,
21+ NestedPartial ,
2122} from './internalTypes'
2223import { proxifyEffects } from './proxyfyEffects'
2324import {
@@ -78,7 +79,7 @@ function deepCopy(obj) {
7879
7980export function createMock < Config extends Configuration > (
8081 config : Config ,
81- mockedEffects ?: Partial < Config [ 'effects' ] >
82+ mockedEffects ?: NestedPartial < Config [ 'effects' ] >
8283) : {
8384 actions : ResolveMockActions < Config [ 'actions' ] >
8485 state : ResolveState < Config [ 'state' ] >
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ export type SubType<Base, Condition> = Pick<
66 { [ Key in keyof Base ] : Base [ Key ] extends Condition ? Key : never } [ keyof Base ]
77>
88
9+ export type NestedPartial < T > = T extends object
10+ ? Partial < { [ P in keyof T ] : NestedPartial < T [ P ] > } >
11+ : T
12+
913export type Options = {
1014 name ?: string
1115 devtools ?: string | boolean
You can’t perform that action at this time.
0 commit comments