@@ -81,11 +81,11 @@ type TupleKeys<T extends ReadonlyArray<any>> = Exclude<keyof T, keyof any[]>;
8181type PathImpl < K extends string | number , V , TraversedTypes > = V extends Primitive | BrowserNativeObject
8282 ? `${K } `
8383 : // Check so that we don't recurse into the same type
84- // by ensuring that the types are mutually assignable
85- // mutually required to avoid false positives of subtypes
86- true extends AnyIsEqual < TraversedTypes , V >
87- ? `${K } `
88- : `${K } ` | `${K } .${PathInternal < V , TraversedTypes | V > } `;
84+ // by ensuring that the types are mutually assignable
85+ // mutually required to avoid false positives of subtypes
86+ true extends AnyIsEqual < TraversedTypes , V >
87+ ? `${K } `
88+ : `${K } ` | `${K } .${PathInternal < V , TraversedTypes | V > } `;
8989
9090/**
9191 * Helper type for recursively constructing paths through a type.
@@ -115,19 +115,19 @@ type ArrayPathImpl<K extends string | number, V, TraversedTypes> = V extends Pri
115115 ? string
116116 : never
117117 : V extends ReadonlyArray < infer U >
118- ? U extends Primitive | BrowserNativeObject
119- ? IsAny < V > extends true
120- ? string
121- : never
122- : // Check so that we don't recurse into the same type
123- // by ensuring that the types are mutually assignable
124- // mutually required to avoid false positives of subtypes
125- true extends AnyIsEqual < TraversedTypes , V >
126- ? never
127- : `${K } ` | `${K } .${ArrayPathInternal < V , TraversedTypes | V > } `
128- : true extends AnyIsEqual < TraversedTypes , V >
129- ? never
130- : `${K } .${ArrayPathInternal < V , TraversedTypes | V > } `;
118+ ? U extends Primitive | BrowserNativeObject
119+ ? IsAny < V > extends true
120+ ? string
121+ : never
122+ : // Check so that we don't recurse into the same type
123+ // by ensuring that the types are mutually assignable
124+ // mutually required to avoid false positives of subtypes
125+ true extends AnyIsEqual < TraversedTypes , V >
126+ ? never
127+ : `${K } ` | `${K } .${ArrayPathInternal < V , TraversedTypes | V > } `
128+ : true extends AnyIsEqual < TraversedTypes , V >
129+ ? never
130+ : `${K } .${ArrayPathInternal < V , TraversedTypes | V > } `;
131131
132132/**
133133 * Helper type for recursively constructing paths through a type.
@@ -175,17 +175,17 @@ export type PathValue<T, P extends Path<T> | ArrayPath<T>> = T extends any
175175 ? PathValue < T [ K ] , R >
176176 : never
177177 : K extends `${ArrayKey } `
178- ? T extends ReadonlyArray < infer V >
179- ? PathValue < V , R & Path < V > >
178+ ? T extends ReadonlyArray < infer V >
179+ ? PathValue < V , R & Path < V > >
180+ : never
180181 : never
181- : never
182182 : P extends keyof T
183- ? T [ P ]
184- : P extends `${ArrayKey } `
185- ? T extends ReadonlyArray < infer V >
186- ? V
187- : never
188- : never
183+ ? T [ P ]
184+ : P extends `${ArrayKey } `
185+ ? T extends ReadonlyArray < infer V >
186+ ? V
187+ : never
188+ : never
189189 : never ;
190190
191191/**
0 commit comments