@@ -24,32 +24,28 @@ type BuiltInObjects = Date | Set<unknown> | File;
24
24
/**
25
25
* Lists all paths in an object as string accessors.
26
26
*/
27
- export type FormPath < T extends object , Type = any > = string & T extends any
28
- ? StringPath < T , { filter : 'all' ; objAppend : never ; path : '' ; type : Type } >
29
- : never ;
27
+ export type FormPath < T extends object , Type = any > = string &
28
+ StringPath < T , { filter : 'all' ; objAppend : never ; path : '' ; type : Type } > ;
30
29
31
30
/**
32
31
* List paths in an object as string accessors, but only with non-objects as accessible properties.
33
32
* Similar to the leaves in a node tree, if you look at the object as a tree structure.
34
33
*/
35
- export type FormPathLeaves < T extends object , Type = any > = string & T extends any
36
- ? StringPath < T , { filter : 'leaves' ; objAppend : never ; path : '' ; type : Type } >
37
- : never ;
34
+ export type FormPathLeaves < T extends object , Type = any > = string &
35
+ StringPath < T , { filter : 'leaves' ; objAppend : never ; path : '' ; type : Type } > ;
38
36
39
37
/**
40
38
* List paths in an object as string accessors, but only with non-objects as accessible properties.
41
39
* Also includes the _errors field for objects and arrays.
42
40
*/
43
- export type FormPathLeavesWithErrors < T extends object , Type = any > = string & T extends any
44
- ? StringPath < T , { filter : 'leaves' ; objAppend : '_errors' ; path : '' ; type : Type } >
45
- : never ;
41
+ export type FormPathLeavesWithErrors < T extends object , Type = any > = string &
42
+ StringPath < T , { filter : 'leaves' ; objAppend : '_errors' ; path : '' ; type : Type } > ;
46
43
47
44
/**
48
45
* List all arrays in an object as string accessors.
49
46
*/
50
- export type FormPathArrays < T extends object , Type = any > = string & T extends any
51
- ? StringPath < T , { filter : 'arrays' ; objAppend : never ; path : '' ; type : Type } >
52
- : never ;
47
+ export type FormPathArrays < T extends object , Type = any > = string &
48
+ StringPath < T , { filter : 'arrays' ; objAppend : never ; path : '' ; type : Type } > ;
53
49
54
50
type Concat <
55
51
Path extends string ,
0 commit comments