zinfer 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Built-in types like Date, Array, Map, Set, Promise, Function, etc. are preserved without expansion.
|
|
8
8
|
* Symbol-keyed properties (like Zod's [BRAND]) are filtered out from object types.
|
|
9
9
|
*/
|
|
10
|
-
export declare const NORMALIZE_TYPE_DEFINITION = "\ntype __Normalize<T> =\n T extends Date | RegExp | Error | Map<any, any> | Set<any> | WeakMap<any, any> | WeakSet<any> | Promise<any> | Function\n ? T\n : T extends (...args: infer A) => infer R\n ? (...args: __Normalize<A>) => __Normalize<R>\n : T extends
|
|
10
|
+
export declare const NORMALIZE_TYPE_DEFINITION = "\ntype __Normalize<T> =\n T extends Date | RegExp | Error | Map<any, any> | Set<any> | WeakMap<any, any> | WeakSet<any> | Promise<any> | Function\n ? T\n : T extends (...args: infer A) => infer R\n ? (...args: __Normalize<A>) => __Normalize<R>\n : T extends readonly any[]\n ? number extends T['length']\n ? T extends (infer U)[]\n ? __Normalize<U>[]\n : readonly __Normalize<T[number]>[]\n : { [K in keyof T]: __Normalize<T[K]> }\n : T extends string\n ? T extends object ? string : T\n : T extends number\n ? T extends object ? number : T\n : T extends boolean\n ? T extends object ? boolean : T\n : T extends bigint\n ? T extends object ? bigint : T\n : T extends object\n ? T extends infer O\n ? { [K in keyof O as K extends symbol ? never : K]: __Normalize<O[K]> }\n : never\n : T;\n";
|
|
11
11
|
/**
|
|
12
12
|
* Creates a temporary type alias for extracting input or output type from a Zod schema.
|
|
13
13
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../src/core/normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"normalizer.d.ts","sourceRoot":"","sources":["../../src/core/normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,giCAyBrC,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAG5F"}
|
package/dist/core/normalizer.js
CHANGED
|
@@ -13,11 +13,13 @@ type __Normalize<T> =
|
|
|
13
13
|
? T
|
|
14
14
|
: T extends (...args: infer A) => infer R
|
|
15
15
|
? (...args: __Normalize<A>) => __Normalize<R>
|
|
16
|
-
: T extends
|
|
17
|
-
?
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
: T extends readonly any[]
|
|
17
|
+
? number extends T['length']
|
|
18
|
+
? T extends (infer U)[]
|
|
19
|
+
? __Normalize<U>[]
|
|
20
|
+
: readonly __Normalize<T[number]>[]
|
|
21
|
+
: { [K in keyof T]: __Normalize<T[K]> }
|
|
22
|
+
: T extends string
|
|
21
23
|
? T extends object ? string : T
|
|
22
24
|
: T extends number
|
|
23
25
|
? T extends object ? number : T
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalizer.js","sourceRoot":"","sources":["../../src/core/normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG
|
|
1
|
+
{"version":3,"file":"normalizer.js","sourceRoot":"","sources":["../../src/core/normalizer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBxC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB,EAAE,QAA4B;IAClF,MAAM,QAAQ,GAAG,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC;IACvE,OAAO,QAAQ,QAAQ,oBAAoB,QAAQ,WAAW,UAAU,KAAK,CAAC;AAChF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zinfer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Extract input/output types from Zod schemas",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"schema",
|
|
7
7
|
"type-extraction",
|
|
8
8
|
"typescript",
|
|
9
|
-
"zod"
|
|
9
|
+
"zod",
|
|
10
|
+
"zod-to-ts"
|
|
10
11
|
],
|
|
11
12
|
"license": "MIT",
|
|
12
13
|
"repository": {
|
|
@@ -35,15 +36,15 @@
|
|
|
35
36
|
"ts-morph": "^27.0.2"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
|
-
"@changesets/cli": "2.
|
|
39
|
-
"@types/node": "25.
|
|
40
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
41
|
-
"knip": "
|
|
42
|
-
"lefthook": "2.1.
|
|
43
|
-
"oxfmt": "0.
|
|
44
|
-
"oxlint": "1.
|
|
45
|
-
"typescript": "
|
|
46
|
-
"vitest": "4.
|
|
39
|
+
"@changesets/cli": "2.30.0",
|
|
40
|
+
"@types/node": "25.5.0",
|
|
41
|
+
"@typescript/native-preview": "7.0.0-dev.20260327.2",
|
|
42
|
+
"knip": "6.0.6",
|
|
43
|
+
"lefthook": "2.1.4",
|
|
44
|
+
"oxfmt": "0.42.0",
|
|
45
|
+
"oxlint": "1.57.0",
|
|
46
|
+
"typescript": "6.0.2",
|
|
47
|
+
"vitest": "4.1.2",
|
|
47
48
|
"zod": "4.3.6"
|
|
48
49
|
},
|
|
49
50
|
"peerDependencies": {
|