We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09d0926 commit 4cfb54aCopy full SHA for 4cfb54a
src/jsonschema.ts
@@ -2,12 +2,10 @@ import { InputConfig } from "./types";
2
3
type With$fn<T> = {
4
[K in keyof T]:
5
- | (T[K] extends (infer U)[]
6
- ? With$fn<U>[] // handle arrays recursively
7
- : T[K] extends object
8
- ? With$fn<T[K]> // handle objects recursively
9
- : T[K]) // retain original type
10
- | `${string}$ex$fn_REPLACER`;
+ | (T[K] extends (infer U)[] // Handle arrays recursively
+ ? With$fn<U>[]
+ : With$fn<T[K]>) // Handle everything else recursively
+ | `${string}$ex$fn_REPLACER`; // Apply extension to everything
11
};
12
13
export type JsonSchemaRoot = With$fn<InputConfig>;
0 commit comments