File tree 1 file changed +6
-7
lines changed
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,11 @@ type Class<T = any> = new (...args: any[]) => T;
9
9
10
10
type UnpackArray < T > = T extends ( infer U ) [ ] ? U : T ;
11
11
12
- type RecursivePartial < T > = {
12
+ type RecursivePartial < T > = T extends object ? {
13
13
[ P in keyof T ] ?:
14
- T [ P ] extends ( infer U ) [ ] ? RecursivePartial < U > [ ] :
15
- T [ P ] extends object ? RecursivePartial < T [ P ] > :
16
- T [ P ] ;
17
- } ;
14
+ T [ P ] extends Array < infer I > ? Array < RecursivePartial < I > > :
15
+ RecursivePartial < T [ P ] > ;
16
+ } : T ;
18
17
19
18
type Loosely < T > = T extends object ? RecursivePartial < T > & { [ key : string ] : any } : T ;
20
19
@@ -348,7 +347,7 @@ declare namespace expect {
348
347
*
349
348
* @returns assertion chain object.
350
349
*/
351
- equal ( value : Loosely < T > , options ?: Hoek . deepEqual . Options ) : Assertion < T > ;
350
+ equal ( value : RecursivePartial < T > , options ?: Hoek . deepEqual . Options ) : Assertion < T > ;
352
351
353
352
/**
354
353
* Asserts that the reference value equals the provided value.
@@ -358,7 +357,7 @@ declare namespace expect {
358
357
*
359
358
* @returns assertion chain object.
360
359
*/
361
- equals ( value : Loosely < T > , options ?: Hoek . deepEqual . Options ) : Assertion < T > ;
360
+ equals ( value : RecursivePartial < T > , options ?: Hoek . deepEqual . Options ) : Assertion < T > ;
362
361
363
362
/**
364
363
* Asserts that the reference value has the provided instanceof value.
You can’t perform that action at this time.
0 commit comments