@rspack/core 1.4.0-beta.0 → 1.4.0-rc.0

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.
Files changed (130) hide show
  1. package/README.md +1 -1
  2. package/dist/Module.d.ts +0 -1
  3. package/dist/MultiCompiler.d.ts +4 -1
  4. package/dist/MultiWatching.d.ts +1 -0
  5. package/dist/builtin-loader/swc/pluginImport.d.ts +4 -26
  6. package/dist/builtin-loader/swc/types.d.ts +149 -1992
  7. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +2 -1
  8. package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +3 -3
  9. package/dist/config/devServer.d.ts +1 -1
  10. package/dist/config/normalization.d.ts +3 -1
  11. package/dist/config/types.d.ts +21 -3
  12. package/dist/config/utils.d.ts +3 -17
  13. package/dist/config/zod.d.ts +687 -4492
  14. package/dist/exports.d.ts +5 -2
  15. package/dist/index.js +3926 -1289
  16. package/dist/swc.d.ts +2 -0
  17. package/dist/util/validate.d.ts +1 -1
  18. package/package.json +5 -5
  19. package/compiled/enhanced-resolve/CachedInputFileSystem.d.ts +0 -0
  20. package/compiled/enhanced-resolve/CachedInputFileSystem.js +0 -664
  21. package/compiled/enhanced-resolve/index.d.ts +0 -1124
  22. package/compiled/enhanced-resolve/license +0 -20
  23. package/compiled/enhanced-resolve/package.json +0 -1
  24. package/compiled/zod/dist/types/index.d.ts +0 -3
  25. package/compiled/zod/dist/types/v3/ZodError.d.ts +0 -164
  26. package/compiled/zod/dist/types/v3/benchmarks/datetime.d.ts +0 -5
  27. package/compiled/zod/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
  28. package/compiled/zod/dist/types/v3/benchmarks/index.d.ts +0 -1
  29. package/compiled/zod/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
  30. package/compiled/zod/dist/types/v3/benchmarks/object.d.ts +0 -5
  31. package/compiled/zod/dist/types/v3/benchmarks/primitives.d.ts +0 -5
  32. package/compiled/zod/dist/types/v3/benchmarks/realworld.d.ts +0 -5
  33. package/compiled/zod/dist/types/v3/benchmarks/string.d.ts +0 -5
  34. package/compiled/zod/dist/types/v3/benchmarks/union.d.ts +0 -5
  35. package/compiled/zod/dist/types/v3/errors.d.ts +0 -5
  36. package/compiled/zod/dist/types/v3/external.d.ts +0 -6
  37. package/compiled/zod/dist/types/v3/helpers/enumUtil.d.ts +0 -8
  38. package/compiled/zod/dist/types/v3/helpers/errorUtil.d.ts +0 -9
  39. package/compiled/zod/dist/types/v3/helpers/parseUtil.d.ts +0 -78
  40. package/compiled/zod/dist/types/v3/helpers/partialUtil.d.ts +0 -8
  41. package/compiled/zod/dist/types/v3/helpers/typeAliases.d.ts +0 -2
  42. package/compiled/zod/dist/types/v3/helpers/util.d.ts +0 -85
  43. package/compiled/zod/dist/types/v3/index.d.ts +0 -4
  44. package/compiled/zod/dist/types/v3/locales/en.d.ts +0 -3
  45. package/compiled/zod/dist/types/v3/standard-schema.d.ts +0 -102
  46. package/compiled/zod/dist/types/v3/tests/Mocker.d.ts +0 -17
  47. package/compiled/zod/dist/types/v3/types.d.ts +0 -1031
  48. package/compiled/zod/dist/types/v4/classic/checks.d.ts +0 -1
  49. package/compiled/zod/dist/types/v4/classic/coerce.d.ts +0 -17
  50. package/compiled/zod/dist/types/v4/classic/compat.d.ts +0 -48
  51. package/compiled/zod/dist/types/v4/classic/errors.d.ts +0 -30
  52. package/compiled/zod/dist/types/v4/classic/external.d.ts +0 -13
  53. package/compiled/zod/dist/types/v4/classic/index.d.ts +0 -4
  54. package/compiled/zod/dist/types/v4/classic/iso.d.ts +0 -22
  55. package/compiled/zod/dist/types/v4/classic/parse.d.ts +0 -23
  56. package/compiled/zod/dist/types/v4/classic/schemas.d.ts +0 -624
  57. package/compiled/zod/dist/types/v4/core/api.d.ts +0 -274
  58. package/compiled/zod/dist/types/v4/core/checks.d.ts +0 -277
  59. package/compiled/zod/dist/types/v4/core/config.d.ts +0 -9
  60. package/compiled/zod/dist/types/v4/core/core.d.ts +0 -47
  61. package/compiled/zod/dist/types/v4/core/doc.d.ts +0 -14
  62. package/compiled/zod/dist/types/v4/core/errors.d.ts +0 -204
  63. package/compiled/zod/dist/types/v4/core/function.d.ts +0 -52
  64. package/compiled/zod/dist/types/v4/core/index.d.ts +0 -15
  65. package/compiled/zod/dist/types/v4/core/json-schema.d.ts +0 -100
  66. package/compiled/zod/dist/types/v4/core/parse.d.ts +0 -25
  67. package/compiled/zod/dist/types/v4/core/regexes.d.ts +0 -62
  68. package/compiled/zod/dist/types/v4/core/registries.d.ts +0 -39
  69. package/compiled/zod/dist/types/v4/core/schemas.d.ts +0 -1005
  70. package/compiled/zod/dist/types/v4/core/standard-schema.d.ts +0 -55
  71. package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +0 -84
  72. package/compiled/zod/dist/types/v4/core/util.d.ts +0 -182
  73. package/compiled/zod/dist/types/v4/core/versions.d.ts +0 -5
  74. package/compiled/zod/dist/types/v4/core/zsf.d.ts +0 -91
  75. package/compiled/zod/dist/types/v4/index.d.ts +0 -3
  76. package/compiled/zod/dist/types/v4/locales/ar.d.ts +0 -4
  77. package/compiled/zod/dist/types/v4/locales/az.d.ts +0 -4
  78. package/compiled/zod/dist/types/v4/locales/be.d.ts +0 -4
  79. package/compiled/zod/dist/types/v4/locales/ca.d.ts +0 -4
  80. package/compiled/zod/dist/types/v4/locales/cs.d.ts +0 -4
  81. package/compiled/zod/dist/types/v4/locales/de.d.ts +0 -4
  82. package/compiled/zod/dist/types/v4/locales/en.d.ts +0 -5
  83. package/compiled/zod/dist/types/v4/locales/es.d.ts +0 -4
  84. package/compiled/zod/dist/types/v4/locales/fa.d.ts +0 -4
  85. package/compiled/zod/dist/types/v4/locales/fi.d.ts +0 -4
  86. package/compiled/zod/dist/types/v4/locales/fr-CA.d.ts +0 -4
  87. package/compiled/zod/dist/types/v4/locales/fr.d.ts +0 -4
  88. package/compiled/zod/dist/types/v4/locales/he.d.ts +0 -4
  89. package/compiled/zod/dist/types/v4/locales/hu.d.ts +0 -4
  90. package/compiled/zod/dist/types/v4/locales/id.d.ts +0 -4
  91. package/compiled/zod/dist/types/v4/locales/index.d.ts +0 -38
  92. package/compiled/zod/dist/types/v4/locales/it.d.ts +0 -4
  93. package/compiled/zod/dist/types/v4/locales/ja.d.ts +0 -4
  94. package/compiled/zod/dist/types/v4/locales/kh.d.ts +0 -4
  95. package/compiled/zod/dist/types/v4/locales/ko.d.ts +0 -4
  96. package/compiled/zod/dist/types/v4/locales/mk.d.ts +0 -4
  97. package/compiled/zod/dist/types/v4/locales/ms.d.ts +0 -4
  98. package/compiled/zod/dist/types/v4/locales/nl.d.ts +0 -4
  99. package/compiled/zod/dist/types/v4/locales/no.d.ts +0 -4
  100. package/compiled/zod/dist/types/v4/locales/ota.d.ts +0 -4
  101. package/compiled/zod/dist/types/v4/locales/pl.d.ts +0 -4
  102. package/compiled/zod/dist/types/v4/locales/ps.d.ts +0 -4
  103. package/compiled/zod/dist/types/v4/locales/pt.d.ts +0 -4
  104. package/compiled/zod/dist/types/v4/locales/ru.d.ts +0 -4
  105. package/compiled/zod/dist/types/v4/locales/sl.d.ts +0 -4
  106. package/compiled/zod/dist/types/v4/locales/sv.d.ts +0 -4
  107. package/compiled/zod/dist/types/v4/locales/ta.d.ts +0 -4
  108. package/compiled/zod/dist/types/v4/locales/th.d.ts +0 -4
  109. package/compiled/zod/dist/types/v4/locales/tr.d.ts +0 -5
  110. package/compiled/zod/dist/types/v4/locales/ua.d.ts +0 -4
  111. package/compiled/zod/dist/types/v4/locales/ur.d.ts +0 -4
  112. package/compiled/zod/dist/types/v4/locales/vi.d.ts +0 -4
  113. package/compiled/zod/dist/types/v4/locales/zh-CN.d.ts +0 -4
  114. package/compiled/zod/dist/types/v4/locales/zh-TW.d.ts +0 -4
  115. package/compiled/zod/dist/types/v4/mini/checks.d.ts +0 -1
  116. package/compiled/zod/dist/types/v4/mini/coerce.d.ts +0 -7
  117. package/compiled/zod/dist/types/v4/mini/external.d.ts +0 -11
  118. package/compiled/zod/dist/types/v4/mini/index.d.ts +0 -3
  119. package/compiled/zod/dist/types/v4/mini/iso.d.ts +0 -22
  120. package/compiled/zod/dist/types/v4/mini/parse.d.ts +0 -1
  121. package/compiled/zod/dist/types/v4/mini/schemas.d.ts +0 -350
  122. package/compiled/zod/index.js +0 -4513
  123. package/compiled/zod/license +0 -21
  124. package/compiled/zod/package.json +0 -1
  125. package/compiled/zod/v3/index.d.ts +0 -3
  126. package/compiled/zod/v4/core/index.d.ts +0 -1
  127. package/compiled/zod/v4/index.d.ts +0 -3
  128. package/compiled/zod/v4/locales/en.d.ts +0 -2
  129. package/compiled/zod/v4/locales/index.d.ts +0 -1
  130. package/compiled/zod/v4-mini/index.d.ts +0 -1
@@ -1,1005 +0,0 @@
1
- import * as checks from "./checks.js";
2
- import * as core from "./core.js";
3
- import type * as errors from "./errors.js";
4
- import type { StandardSchemaV1 } from "./standard-schema.js";
5
- import * as util from "./util.js";
6
- import { version } from "./versions.js";
7
- export interface ParseContext<T extends errors.$ZodIssueBase = never> {
8
- /** Customize error messages. */
9
- readonly error?: errors.$ZodErrorMap<T>;
10
- /** Include the `input` field in issue objects. Default `false`. */
11
- readonly reportInput?: boolean;
12
- /** Skip eval-based fast path. Default `false`. */
13
- readonly jitless?: boolean;
14
- }
15
- /** @internal */
16
- export interface ParseContextInternal<T extends errors.$ZodIssueBase = never> extends ParseContext<T> {
17
- readonly async?: boolean | undefined;
18
- }
19
- export interface ParsePayload<T = unknown> {
20
- value: T;
21
- issues: errors.$ZodRawIssue[];
22
- }
23
- export type CheckFn<T> = (input: ParsePayload<T>) => util.MaybeAsync<void>;
24
- export interface $ZodTypeDef {
25
- type: "string" | "number" | "int" | "boolean" | "bigint" | "symbol" | "null" | "undefined" | "void" | "never" | "any" | "unknown" | "date" | "object" | "record" | "file" | "array" | "tuple" | "union" | "intersection" | "map" | "set" | "enum" | "literal" | "nullable" | "optional" | "nonoptional" | "success" | "transform" | "default" | "prefault" | "catch" | "nan" | "pipe" | "readonly" | "template_literal" | "promise" | "lazy" | "custom";
26
- error?: errors.$ZodErrorMap<never> | undefined;
27
- checks?: checks.$ZodCheck<never>[];
28
- }
29
- export interface _$ZodTypeInternals {
30
- /** The `@zod/core` version of this schema */
31
- version: typeof version;
32
- /** Schema definition. */
33
- def: $ZodTypeDef;
34
- /** @internal Randomly generated ID for this schema. */
35
- id: string;
36
- /** @internal List of deferred initializers. */
37
- deferred: util.AnyFunc[] | undefined;
38
- /** @internal Parses input and runs all checks (refinements). */
39
- run(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
40
- /** @internal Parses input, doesn't run checks. */
41
- parse(payload: ParsePayload<any>, ctx: ParseContextInternal): util.MaybeAsync<ParsePayload>;
42
- /** @internal Stores identifiers for the set of traits implemented by this schema. */
43
- traits: Set<string>;
44
- /** @internal Indicates that a schema output type should be considered optional inside objects.
45
- * @default Required
46
- */
47
- /** @internal */
48
- optin?: "optional" | undefined;
49
- /** @internal */
50
- optout?: "optional" | undefined;
51
- /** @internal The set of literal values that will pass validation. Must be an exhaustive set. Used to determine optionality in z.record().
52
- *
53
- * Defined on: enum, const, literal, null, undefined
54
- * Passthrough: optional, nullable, branded, default, catch, pipe
55
- * Todo: unions?
56
- */
57
- values?: util.PrimitiveSet | undefined;
58
- /** @internal A set of literal discriminators used for the fast path in discriminated unions. */
59
- propValues?: util.PropValues | undefined;
60
- /** @internal This flag indicates that a schema validation can be represented with a regular expression. Used to determine allowable schemas in z.templateLiteral(). */
61
- pattern: RegExp | undefined;
62
- /** @internal The constructor function of this schema. */
63
- constr: new (def: any) => $ZodType;
64
- /** @internal A catchall object for bag metadata related to this schema. Commonly modified by checks using `onattach`. */
65
- bag: Record<string, unknown>;
66
- /** @internal The set of issues this schema might throw during type checking. */
67
- isst: errors.$ZodIssueBase;
68
- /** An optional method used to override `toJSONSchema` logic. */
69
- toJSONSchema?: () => object;
70
- /** @internal The parent of this schema. Only set during certain clone operations. */
71
- parent?: $ZodType | undefined;
72
- }
73
- /** @internal */
74
- export interface $ZodTypeInternals<out O = unknown, out I = unknown> extends _$ZodTypeInternals {
75
- /** @internal The inferred output type */
76
- output: O;
77
- /** @internal The inferred input type */
78
- input: I;
79
- }
80
- export type $ZodStandardSchema<T> = StandardSchemaV1.Props<core.input<T>, core.output<T>>;
81
- export type SomeType = {
82
- _zod: _$ZodTypeInternals;
83
- };
84
- export interface $ZodType<O = unknown, I = unknown, Internals extends $ZodTypeInternals<O, I> = $ZodTypeInternals<O, I>> {
85
- _zod: Internals;
86
- "~standard": $ZodStandardSchema<this>;
87
- }
88
- export interface _$ZodType<T extends $ZodTypeInternals = $ZodTypeInternals> extends $ZodType<T["output"], T["input"], T> {
89
- }
90
- export declare const $ZodType: core.$constructor<$ZodType>;
91
- export { clone } from "./util.js";
92
- export interface $ZodStringDef extends $ZodTypeDef {
93
- type: "string";
94
- coerce?: boolean;
95
- checks?: checks.$ZodCheck<string>[];
96
- }
97
- export interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, Input> {
98
- def: $ZodStringDef;
99
- /** @deprecated Internal API, use with caution (not deprecated) */
100
- pattern: RegExp;
101
- /** @deprecated Internal API, use with caution (not deprecated) */
102
- isst: errors.$ZodIssueInvalidType;
103
- bag: util.LoosePartial<{
104
- minimum: number;
105
- maximum: number;
106
- patterns: Set<RegExp>;
107
- format: string;
108
- contentEncoding: string;
109
- }>;
110
- }
111
- export interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {
112
- }
113
- export declare const $ZodString: core.$constructor<$ZodString>;
114
- export interface $ZodStringFormatDef<Format extends checks.$ZodStringFormats = checks.$ZodStringFormats> extends $ZodStringDef, checks.$ZodCheckStringFormatDef<Format> {
115
- }
116
- export interface $ZodStringFormatInternals<Format extends checks.$ZodStringFormats = checks.$ZodStringFormats> extends $ZodStringInternals<string>, checks.$ZodCheckStringFormatInternals {
117
- def: $ZodStringFormatDef<Format>;
118
- }
119
- export interface $ZodStringFormat<Format extends checks.$ZodStringFormats = checks.$ZodStringFormats> extends $ZodType {
120
- _zod: $ZodStringFormatInternals<Format>;
121
- }
122
- export declare const $ZodStringFormat: core.$constructor<$ZodStringFormat>;
123
- export interface $ZodGUIDDef extends $ZodStringFormatDef<"guid"> {
124
- }
125
- export interface $ZodGUIDInternals extends $ZodStringFormatInternals<"guid"> {
126
- }
127
- export interface $ZodGUID extends $ZodType {
128
- _zod: $ZodGUIDInternals;
129
- }
130
- export declare const $ZodGUID: core.$constructor<$ZodGUID>;
131
- export interface $ZodUUIDDef extends $ZodStringFormatDef<"uuid"> {
132
- version?: "v1" | "v2" | "v3" | "v4" | "v5" | "v6" | "v7" | "v8";
133
- }
134
- export interface $ZodUUIDInternals extends $ZodStringFormatInternals<"uuid"> {
135
- def: $ZodUUIDDef;
136
- }
137
- export interface $ZodUUID extends $ZodType {
138
- _zod: $ZodUUIDInternals;
139
- }
140
- export declare const $ZodUUID: core.$constructor<$ZodUUID>;
141
- export interface $ZodEmailDef extends $ZodStringFormatDef<"email"> {
142
- }
143
- export interface $ZodEmailInternals extends $ZodStringFormatInternals<"email"> {
144
- }
145
- export interface $ZodEmail extends $ZodType {
146
- _zod: $ZodEmailInternals;
147
- }
148
- export declare const $ZodEmail: core.$constructor<$ZodEmail>;
149
- export interface $ZodURLDef extends $ZodStringFormatDef<"url"> {
150
- hostname?: RegExp | undefined;
151
- protocol?: RegExp | undefined;
152
- }
153
- export interface $ZodURLInternals extends $ZodStringFormatInternals<"url"> {
154
- def: $ZodURLDef;
155
- }
156
- export interface $ZodURL extends $ZodType {
157
- _zod: $ZodURLInternals;
158
- }
159
- export declare const $ZodURL: core.$constructor<$ZodURL>;
160
- export interface $ZodEmojiDef extends $ZodStringFormatDef<"emoji"> {
161
- }
162
- export interface $ZodEmojiInternals extends $ZodStringFormatInternals<"emoji"> {
163
- }
164
- export interface $ZodEmoji extends $ZodType {
165
- _zod: $ZodEmojiInternals;
166
- }
167
- export declare const $ZodEmoji: core.$constructor<$ZodEmoji>;
168
- export interface $ZodNanoIDDef extends $ZodStringFormatDef<"nanoid"> {
169
- }
170
- export interface $ZodNanoIDInternals extends $ZodStringFormatInternals<"nanoid"> {
171
- }
172
- export interface $ZodNanoID extends $ZodType {
173
- _zod: $ZodNanoIDInternals;
174
- }
175
- export declare const $ZodNanoID: core.$constructor<$ZodNanoID>;
176
- export interface $ZodCUIDDef extends $ZodStringFormatDef<"cuid"> {
177
- }
178
- export interface $ZodCUIDInternals extends $ZodStringFormatInternals<"cuid"> {
179
- }
180
- export interface $ZodCUID extends $ZodType {
181
- _zod: $ZodCUIDInternals;
182
- }
183
- export declare const $ZodCUID: core.$constructor<$ZodCUID>;
184
- export interface $ZodCUID2Def extends $ZodStringFormatDef<"cuid2"> {
185
- }
186
- export interface $ZodCUID2Internals extends $ZodStringFormatInternals<"cuid2"> {
187
- }
188
- export interface $ZodCUID2 extends $ZodType {
189
- _zod: $ZodCUID2Internals;
190
- }
191
- export declare const $ZodCUID2: core.$constructor<$ZodCUID2>;
192
- export interface $ZodULIDDef extends $ZodStringFormatDef<"ulid"> {
193
- }
194
- export interface $ZodULIDInternals extends $ZodStringFormatInternals<"ulid"> {
195
- }
196
- export interface $ZodULID extends $ZodType {
197
- _zod: $ZodULIDInternals;
198
- }
199
- export declare const $ZodULID: core.$constructor<$ZodULID>;
200
- export interface $ZodXIDDef extends $ZodStringFormatDef<"xid"> {
201
- }
202
- export interface $ZodXIDInternals extends $ZodStringFormatInternals<"xid"> {
203
- }
204
- export interface $ZodXID extends $ZodType {
205
- _zod: $ZodXIDInternals;
206
- }
207
- export declare const $ZodXID: core.$constructor<$ZodXID>;
208
- export interface $ZodKSUIDDef extends $ZodStringFormatDef<"ksuid"> {
209
- }
210
- export interface $ZodKSUIDInternals extends $ZodStringFormatInternals<"ksuid"> {
211
- }
212
- export interface $ZodKSUID extends $ZodType {
213
- _zod: $ZodKSUIDInternals;
214
- }
215
- export declare const $ZodKSUID: core.$constructor<$ZodKSUID>;
216
- export interface $ZodISODateTimeDef extends $ZodStringFormatDef<"datetime"> {
217
- precision: number | null;
218
- offset: boolean;
219
- local: boolean;
220
- }
221
- export interface $ZodISODateTimeInternals extends $ZodStringFormatInternals {
222
- def: $ZodISODateTimeDef;
223
- }
224
- export interface $ZodISODateTime extends $ZodType {
225
- _zod: $ZodISODateTimeInternals;
226
- }
227
- export declare const $ZodISODateTime: core.$constructor<$ZodISODateTime>;
228
- export interface $ZodISODateDef extends $ZodStringFormatDef<"date"> {
229
- }
230
- export interface $ZodISODateInternals extends $ZodStringFormatInternals<"date"> {
231
- }
232
- export interface $ZodISODate extends $ZodType {
233
- _zod: $ZodISODateInternals;
234
- }
235
- export declare const $ZodISODate: core.$constructor<$ZodISODate>;
236
- export interface $ZodISOTimeDef extends $ZodStringFormatDef<"time"> {
237
- precision?: number | null;
238
- }
239
- export interface $ZodISOTimeInternals extends $ZodStringFormatInternals<"time"> {
240
- def: $ZodISOTimeDef;
241
- }
242
- export interface $ZodISOTime extends $ZodType {
243
- _zod: $ZodISOTimeInternals;
244
- }
245
- export declare const $ZodISOTime: core.$constructor<$ZodISOTime>;
246
- export interface $ZodISODurationDef extends $ZodStringFormatDef<"duration"> {
247
- }
248
- export interface $ZodISODurationInternals extends $ZodStringFormatInternals<"duration"> {
249
- }
250
- export interface $ZodISODuration extends $ZodType {
251
- _zod: $ZodISODurationInternals;
252
- }
253
- export declare const $ZodISODuration: core.$constructor<$ZodISODuration>;
254
- export interface $ZodIPv4Def extends $ZodStringFormatDef<"ipv4"> {
255
- version?: "v4";
256
- }
257
- export interface $ZodIPv4Internals extends $ZodStringFormatInternals<"ipv4"> {
258
- def: $ZodIPv4Def;
259
- }
260
- export interface $ZodIPv4 extends $ZodType {
261
- _zod: $ZodIPv4Internals;
262
- }
263
- export declare const $ZodIPv4: core.$constructor<$ZodIPv4>;
264
- export interface $ZodIPv6Def extends $ZodStringFormatDef<"ipv6"> {
265
- version?: "v6";
266
- }
267
- export interface $ZodIPv6Internals extends $ZodStringFormatInternals<"ipv6"> {
268
- def: $ZodIPv6Def;
269
- }
270
- export interface $ZodIPv6 extends $ZodType {
271
- _zod: $ZodIPv6Internals;
272
- }
273
- export declare const $ZodIPv6: core.$constructor<$ZodIPv6>;
274
- export interface $ZodCIDRv4Def extends $ZodStringFormatDef<"cidrv4"> {
275
- version?: "v4";
276
- }
277
- export interface $ZodCIDRv4Internals extends $ZodStringFormatInternals<"cidrv4"> {
278
- def: $ZodCIDRv4Def;
279
- }
280
- export interface $ZodCIDRv4 extends $ZodType {
281
- _zod: $ZodCIDRv4Internals;
282
- }
283
- export declare const $ZodCIDRv4: core.$constructor<$ZodCIDRv4>;
284
- export interface $ZodCIDRv6Def extends $ZodStringFormatDef<"cidrv6"> {
285
- version?: "v6";
286
- }
287
- export interface $ZodCIDRv6Internals extends $ZodStringFormatInternals<"cidrv6"> {
288
- def: $ZodCIDRv6Def;
289
- }
290
- export interface $ZodCIDRv6 extends $ZodType {
291
- _zod: $ZodCIDRv6Internals;
292
- }
293
- export declare const $ZodCIDRv6: core.$constructor<$ZodCIDRv6>;
294
- export declare function isValidBase64(data: string): boolean;
295
- export interface $ZodBase64Def extends $ZodStringFormatDef<"base64"> {
296
- }
297
- export interface $ZodBase64Internals extends $ZodStringFormatInternals<"base64"> {
298
- }
299
- export interface $ZodBase64 extends $ZodType {
300
- _zod: $ZodBase64Internals;
301
- }
302
- export declare const $ZodBase64: core.$constructor<$ZodBase64>;
303
- export declare function isValidBase64URL(data: string): boolean;
304
- export interface $ZodBase64URLDef extends $ZodStringFormatDef<"base64url"> {
305
- }
306
- export interface $ZodBase64URLInternals extends $ZodStringFormatInternals<"base64url"> {
307
- }
308
- export interface $ZodBase64URL extends $ZodType {
309
- _zod: $ZodBase64URLInternals;
310
- }
311
- export declare const $ZodBase64URL: core.$constructor<$ZodBase64URL>;
312
- export interface $ZodE164Def extends $ZodStringFormatDef<"e164"> {
313
- }
314
- export interface $ZodE164Internals extends $ZodStringFormatInternals<"e164"> {
315
- }
316
- export interface $ZodE164 extends $ZodType {
317
- _zod: $ZodE164Internals;
318
- }
319
- export declare const $ZodE164: core.$constructor<$ZodE164>;
320
- export declare function isValidJWT(token: string, algorithm?: util.JWTAlgorithm | null): boolean;
321
- export interface $ZodJWTDef extends $ZodStringFormatDef<"jwt"> {
322
- alg?: util.JWTAlgorithm | undefined;
323
- }
324
- export interface $ZodJWTInternals extends $ZodStringFormatInternals<"jwt"> {
325
- def: $ZodJWTDef;
326
- }
327
- export interface $ZodJWT extends $ZodType {
328
- _zod: $ZodJWTInternals;
329
- }
330
- export declare const $ZodJWT: core.$constructor<$ZodJWT>;
331
- export interface $ZodNumberDef extends $ZodTypeDef {
332
- type: "number";
333
- coerce?: boolean;
334
- }
335
- export interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
336
- def: $ZodNumberDef;
337
- /** @deprecated Internal API, use with caution (not deprecated) */
338
- pattern: RegExp;
339
- /** @deprecated Internal API, use with caution (not deprecated) */
340
- isst: errors.$ZodIssueInvalidType;
341
- bag: util.LoosePartial<{
342
- minimum: number;
343
- maximum: number;
344
- exclusiveMinimum: number;
345
- exclusiveMaximum: number;
346
- format: string;
347
- pattern: RegExp;
348
- }>;
349
- }
350
- export interface $ZodNumber<Input = unknown> extends $ZodType {
351
- _zod: $ZodNumberInternals<Input>;
352
- }
353
- export declare const $ZodNumber: core.$constructor<$ZodNumber>;
354
- export interface $ZodNumberFormatDef extends $ZodNumberDef, checks.$ZodCheckNumberFormatDef {
355
- }
356
- export interface $ZodNumberFormatInternals extends $ZodNumberInternals<number>, checks.$ZodCheckNumberFormatInternals {
357
- def: $ZodNumberFormatDef;
358
- isst: errors.$ZodIssueInvalidType;
359
- }
360
- export interface $ZodNumberFormat extends $ZodType {
361
- _zod: $ZodNumberFormatInternals;
362
- }
363
- export declare const $ZodNumberFormat: core.$constructor<$ZodNumberFormat>;
364
- export interface $ZodBooleanDef extends $ZodTypeDef {
365
- type: "boolean";
366
- coerce?: boolean;
367
- checks?: checks.$ZodCheck<boolean>[];
368
- }
369
- export interface $ZodBooleanInternals<T = unknown> extends $ZodTypeInternals<boolean, T> {
370
- pattern: RegExp;
371
- def: $ZodBooleanDef;
372
- isst: errors.$ZodIssueInvalidType;
373
- }
374
- export interface $ZodBoolean<T = unknown> extends $ZodType {
375
- _zod: $ZodBooleanInternals<T>;
376
- }
377
- export declare const $ZodBoolean: core.$constructor<$ZodBoolean>;
378
- export interface $ZodBigIntDef extends $ZodTypeDef {
379
- type: "bigint";
380
- coerce?: boolean;
381
- }
382
- export interface $ZodBigIntInternals<T = unknown> extends $ZodTypeInternals<bigint, T> {
383
- pattern: RegExp;
384
- /** @internal Internal API, use with caution */
385
- def: $ZodBigIntDef;
386
- isst: errors.$ZodIssueInvalidType;
387
- bag: util.LoosePartial<{
388
- minimum: bigint;
389
- maximum: bigint;
390
- format: string;
391
- }>;
392
- }
393
- export interface $ZodBigInt<T = unknown> extends $ZodType {
394
- _zod: $ZodBigIntInternals<T>;
395
- }
396
- export declare const $ZodBigInt: core.$constructor<$ZodBigInt>;
397
- export interface $ZodBigIntFormatDef extends $ZodBigIntDef, checks.$ZodCheckBigIntFormatDef {
398
- check: "bigint_format";
399
- }
400
- export interface $ZodBigIntFormatInternals extends $ZodBigIntInternals<bigint>, checks.$ZodCheckBigIntFormatInternals {
401
- def: $ZodBigIntFormatDef;
402
- }
403
- export interface $ZodBigIntFormat extends $ZodType {
404
- _zod: $ZodBigIntFormatInternals;
405
- }
406
- export declare const $ZodBigIntFormat: core.$constructor<$ZodBigIntFormat>;
407
- export interface $ZodSymbolDef extends $ZodTypeDef {
408
- type: "symbol";
409
- }
410
- export interface $ZodSymbolInternals extends $ZodTypeInternals<symbol, symbol> {
411
- def: $ZodSymbolDef;
412
- isst: errors.$ZodIssueInvalidType;
413
- }
414
- export interface $ZodSymbol extends $ZodType {
415
- _zod: $ZodSymbolInternals;
416
- }
417
- export declare const $ZodSymbol: core.$constructor<$ZodSymbol>;
418
- export interface $ZodUndefinedDef extends $ZodTypeDef {
419
- type: "undefined";
420
- }
421
- export interface $ZodUndefinedInternals extends $ZodTypeInternals<undefined, undefined> {
422
- pattern: RegExp;
423
- def: $ZodUndefinedDef;
424
- values: util.PrimitiveSet;
425
- isst: errors.$ZodIssueInvalidType;
426
- }
427
- export interface $ZodUndefined extends $ZodType {
428
- _zod: $ZodUndefinedInternals;
429
- }
430
- export declare const $ZodUndefined: core.$constructor<$ZodUndefined>;
431
- export interface $ZodNullDef extends $ZodTypeDef {
432
- type: "null";
433
- }
434
- export interface $ZodNullInternals extends $ZodTypeInternals<null, null> {
435
- pattern: RegExp;
436
- def: $ZodNullDef;
437
- values: util.PrimitiveSet;
438
- isst: errors.$ZodIssueInvalidType;
439
- }
440
- export interface $ZodNull extends $ZodType {
441
- _zod: $ZodNullInternals;
442
- }
443
- export declare const $ZodNull: core.$constructor<$ZodNull>;
444
- export interface $ZodAnyDef extends $ZodTypeDef {
445
- type: "any";
446
- }
447
- export interface $ZodAnyInternals extends $ZodTypeInternals<any, any> {
448
- def: $ZodAnyDef;
449
- isst: never;
450
- }
451
- export interface $ZodAny extends $ZodType {
452
- _zod: $ZodAnyInternals;
453
- }
454
- export declare const $ZodAny: core.$constructor<$ZodAny>;
455
- export interface $ZodUnknownDef extends $ZodTypeDef {
456
- type: "unknown";
457
- }
458
- export interface $ZodUnknownInternals extends $ZodTypeInternals<unknown, unknown> {
459
- def: $ZodUnknownDef;
460
- isst: never;
461
- }
462
- export interface $ZodUnknown extends $ZodType {
463
- _zod: $ZodUnknownInternals;
464
- }
465
- export declare const $ZodUnknown: core.$constructor<$ZodUnknown>;
466
- export interface $ZodNeverDef extends $ZodTypeDef {
467
- type: "never";
468
- }
469
- export interface $ZodNeverInternals extends $ZodTypeInternals<never, never> {
470
- def: $ZodNeverDef;
471
- isst: errors.$ZodIssueInvalidType;
472
- }
473
- export interface $ZodNever extends $ZodType {
474
- _zod: $ZodNeverInternals;
475
- }
476
- export declare const $ZodNever: core.$constructor<$ZodNever>;
477
- export interface $ZodVoidDef extends $ZodTypeDef {
478
- type: "void";
479
- }
480
- export interface $ZodVoidInternals extends $ZodTypeInternals<void, void> {
481
- def: $ZodVoidDef;
482
- isst: errors.$ZodIssueInvalidType;
483
- }
484
- export interface $ZodVoid extends $ZodType {
485
- _zod: $ZodVoidInternals;
486
- }
487
- export declare const $ZodVoid: core.$constructor<$ZodVoid>;
488
- export interface $ZodDateDef extends $ZodTypeDef {
489
- type: "date";
490
- coerce?: boolean;
491
- }
492
- export interface $ZodDateInternals<T = unknown> extends $ZodTypeInternals<Date, T> {
493
- def: $ZodDateDef;
494
- isst: errors.$ZodIssueInvalidType;
495
- bag: util.LoosePartial<{
496
- minimum: Date;
497
- maximum: Date;
498
- format: string;
499
- }>;
500
- }
501
- export interface $ZodDate<T = unknown> extends $ZodType {
502
- _zod: $ZodDateInternals<T>;
503
- }
504
- export declare const $ZodDate: core.$constructor<$ZodDate>;
505
- export interface $ZodArrayDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
506
- type: "array";
507
- element: T;
508
- }
509
- export interface $ZodArrayInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<T>[], core.input<T>[]> {
510
- def: $ZodArrayDef<T>;
511
- isst: errors.$ZodIssueInvalidType;
512
- }
513
- export interface $ZodArray<T extends SomeType = $ZodType> extends $ZodType<core.output<T>[], core.input<T>[], $ZodArrayInternals<T>> {
514
- }
515
- export declare const $ZodArray: core.$constructor<$ZodArray>;
516
- type OptionalOutSchema = {
517
- _zod: {
518
- optout: "optional";
519
- };
520
- };
521
- type OptionalInSchema = {
522
- _zod: {
523
- optin: "optional";
524
- };
525
- };
526
- export type $InferObjectOutput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? object : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
527
- -readonly [k in keyof T as T[k] extends OptionalOutSchema ? never : k]: T[k]["_zod"]["output"];
528
- } & {
529
- -readonly [k in keyof T as T[k] extends OptionalOutSchema ? k : never]?: T[k]["_zod"]["output"];
530
- } & Extra>;
531
- export type $InferObjectInput<T extends $ZodLooseShape, Extra extends Record<string, unknown>> = string extends keyof T ? object : keyof (T & Extra) extends never ? Record<string, never> : util.Prettify<{
532
- -readonly [k in keyof T as T[k] extends OptionalInSchema ? never : k]: T[k]["_zod"]["input"];
533
- } & {
534
- -readonly [k in keyof T as T[k] extends OptionalInSchema ? k : never]?: T[k]["_zod"]["input"];
535
- } & Extra>;
536
- export type $ZodObjectConfig = {
537
- out: Record<string, unknown>;
538
- in: Record<string, unknown>;
539
- };
540
- export type $loose = {
541
- out: Record<string, unknown>;
542
- in: Record<string, unknown>;
543
- };
544
- export type $strict = {
545
- out: {};
546
- in: {};
547
- };
548
- export type $strip = {
549
- out: {};
550
- in: {};
551
- };
552
- export type $catchall<T extends SomeType> = {
553
- out: {
554
- [k: string]: core.output<T>;
555
- };
556
- in: {
557
- [k: string]: core.input<T>;
558
- };
559
- };
560
- export type $ZodShape = Readonly<{
561
- [k: string]: $ZodType;
562
- }>;
563
- export interface $ZodObjectDef<Shape extends $ZodShape = $ZodShape> extends $ZodTypeDef {
564
- type: "object";
565
- shape: Shape;
566
- catchall?: $ZodType | undefined;
567
- }
568
- export interface $ZodObjectInternals<
569
- /** @ts-ignore Cast variance */
570
- out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Config extends $ZodObjectConfig = $ZodObjectConfig> extends _$ZodTypeInternals {
571
- def: $ZodObjectDef<Shape>;
572
- config: Config;
573
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueUnrecognizedKeys;
574
- propValues: util.PropValues;
575
- output: $InferObjectOutput<Shape, Config["out"]>;
576
- input: $InferObjectInput<Shape, Config["in"]>;
577
- }
578
- export type $ZodLooseShape = Record<string, any>;
579
- export interface $ZodObject<
580
- /** @ts-ignore Cast variance */
581
- out Shape extends Readonly<$ZodShape> = Readonly<$ZodShape>, out Params extends $ZodObjectConfig = $ZodObjectConfig> extends $ZodType<any, any, $ZodObjectInternals<Shape, Params>> {
582
- "~standard": $ZodStandardSchema<this>;
583
- }
584
- export declare const $ZodObject: core.$constructor<$ZodObject>;
585
- export type $InferUnionOutput<T extends SomeType> = T extends any ? core.output<T> : never;
586
- export type $InferUnionInput<T extends SomeType> = T extends any ? core.input<T> : never;
587
- export interface $ZodUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeDef {
588
- type: "union";
589
- options: Options;
590
- }
591
- export interface $ZodUnionInternals<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodTypeInternals<$InferUnionOutput<T[number]>, $InferUnionInput<T[number]>> {
592
- def: $ZodUnionDef<T>;
593
- isst: errors.$ZodIssueInvalidUnion;
594
- pattern: T[number]["_zod"]["pattern"];
595
- }
596
- export interface $ZodUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType {
597
- _zod: $ZodUnionInternals<T>;
598
- }
599
- export declare const $ZodUnion: core.$constructor<$ZodUnion>;
600
- export interface $ZodDiscriminatedUnionDef<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodUnionDef<Options> {
601
- discriminator: string;
602
- unionFallback?: boolean;
603
- }
604
- export interface $ZodDiscriminatedUnionInternals<Options extends readonly SomeType[] = readonly $ZodType[]> extends $ZodUnionInternals<Options> {
605
- def: $ZodDiscriminatedUnionDef<Options>;
606
- propValues: util.PropValues;
607
- }
608
- export interface $ZodDiscriminatedUnion<T extends readonly SomeType[] = readonly $ZodType[]> extends $ZodType {
609
- _zod: $ZodDiscriminatedUnionInternals<T>;
610
- }
611
- export declare const $ZodDiscriminatedUnion: core.$constructor<$ZodDiscriminatedUnion>;
612
- export interface $ZodIntersectionDef<Left extends SomeType = $ZodType, Right extends SomeType = $ZodType> extends $ZodTypeDef {
613
- type: "intersection";
614
- left: Left;
615
- right: Right;
616
- }
617
- export interface $ZodIntersectionInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<A> & core.output<B>, core.input<A> & core.input<B>> {
618
- def: $ZodIntersectionDef<A, B>;
619
- isst: never;
620
- }
621
- export interface $ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
622
- _zod: $ZodIntersectionInternals<A, B>;
623
- }
624
- export declare const $ZodIntersection: core.$constructor<$ZodIntersection>;
625
- export interface $ZodTupleDef<T extends util.TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeDef {
626
- type: "tuple";
627
- items: T;
628
- rest: Rest;
629
- }
630
- export type $InferTupleInputType<T extends util.TupleItems, Rest extends SomeType | null> = [
631
- ...TupleInputTypeWithOptionals<T>,
632
- ...(Rest extends SomeType ? core.input<Rest>[] : [])
633
- ];
634
- type TupleInputTypeNoOptionals<T extends util.TupleItems> = {
635
- [k in keyof T]: core.input<T[k]>;
636
- };
637
- type TupleInputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
638
- ...infer Prefix extends SomeType[],
639
- infer Tail extends SomeType
640
- ] ? Tail["_zod"]["optin"] extends "optional" ? [...TupleInputTypeWithOptionals<Prefix>, core.input<Tail>?] : TupleInputTypeNoOptionals<T> : [];
641
- export type $InferTupleOutputType<T extends util.TupleItems, Rest extends SomeType | null> = [
642
- ...TupleOutputTypeWithOptionals<T>,
643
- ...(Rest extends SomeType ? core.output<Rest>[] : [])
644
- ];
645
- type TupleOutputTypeNoOptionals<T extends util.TupleItems> = {
646
- [k in keyof T]: core.output<T[k]>;
647
- };
648
- type TupleOutputTypeWithOptionals<T extends util.TupleItems> = T extends readonly [
649
- ...infer Prefix extends SomeType[],
650
- infer Tail extends SomeType
651
- ] ? Tail["_zod"]["optout"] extends "optional" ? [...TupleOutputTypeWithOptionals<Prefix>, core.output<Tail>?] : TupleOutputTypeNoOptionals<T> : [];
652
- export interface $ZodTupleInternals<T extends util.TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodTypeInternals<$InferTupleOutputType<T, Rest>, $InferTupleInputType<T, Rest>> {
653
- def: $ZodTupleDef<T, Rest>;
654
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueTooBig<unknown[]> | errors.$ZodIssueTooSmall<unknown[]>;
655
- }
656
- export interface $ZodTuple<T extends util.TupleItems = readonly $ZodType[], Rest extends SomeType | null = $ZodType | null> extends $ZodType {
657
- _zod: $ZodTupleInternals<T, Rest>;
658
- }
659
- export declare const $ZodTuple: core.$constructor<$ZodTuple>;
660
- export type $ZodRecordKey = $ZodType<string | number | symbol, string | number | symbol>;
661
- export interface $ZodRecordDef<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeDef {
662
- type: "record";
663
- keyType: Key;
664
- valueType: Value;
665
- }
666
- export type $InferZodRecordOutput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = undefined extends Key["_zod"]["values"] ? string extends core.output<Key> ? Record<core.output<Key>, core.output<Value>> : number extends core.output<Key> ? Record<core.output<Key>, core.output<Value>> : symbol extends core.output<Key> ? Record<core.output<Key>, core.output<Value>> : Partial<Record<core.output<Key>, core.output<Value>>> : Record<core.output<Key>, core.output<Value>>;
667
- export type $InferZodRecordInput<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> = undefined extends Key["_zod"]["values"] ? string extends core.input<Key> ? Record<core.input<Key>, core.input<Value>> : number extends core.input<Key> ? Record<core.input<Key>, core.input<Value>> : symbol extends core.input<Key> ? Record<core.input<Key>, core.input<Value>> : Partial<Record<core.input<Key>, core.input<Value>>> : Record<core.input<Key>, core.input<Value>>;
668
- export interface $ZodRecordInternals<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodTypeInternals<$InferZodRecordOutput<Key, Value>, $InferZodRecordInput<Key, Value>> {
669
- def: $ZodRecordDef<Key, Value>;
670
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueInvalidKey<Record<PropertyKey, unknown>>;
671
- }
672
- export interface $ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends $ZodType {
673
- _zod: $ZodRecordInternals<Key, Value>;
674
- }
675
- export declare const $ZodRecord: core.$constructor<$ZodRecord>;
676
- export interface $ZodMapDef<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeDef {
677
- type: "map";
678
- keyType: Key;
679
- valueType: Value;
680
- }
681
- export interface $ZodMapInternals<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodTypeInternals<Map<core.output<Key>, core.output<Value>>, Map<core.input<Key>, core.input<Value>>> {
682
- def: $ZodMapDef<Key, Value>;
683
- isst: errors.$ZodIssueInvalidType | errors.$ZodIssueInvalidKey | errors.$ZodIssueInvalidElement<unknown>;
684
- }
685
- export interface $ZodMap<Key extends SomeType = $ZodType, Value extends SomeType = $ZodType> extends $ZodType {
686
- _zod: $ZodMapInternals<Key, Value>;
687
- }
688
- export declare const $ZodMap: core.$constructor<$ZodMap>;
689
- export interface $ZodSetDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
690
- type: "set";
691
- valueType: T;
692
- }
693
- export interface $ZodSetInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<Set<core.output<T>>, Set<core.input<T>>> {
694
- def: $ZodSetDef<T>;
695
- isst: errors.$ZodIssueInvalidType;
696
- }
697
- export interface $ZodSet<T extends SomeType = $ZodType> extends $ZodType {
698
- _zod: $ZodSetInternals<T>;
699
- }
700
- export declare const $ZodSet: core.$constructor<$ZodSet>;
701
- export type $InferEnumOutput<T extends util.EnumLike> = T[keyof T] & {};
702
- export type $InferEnumInput<T extends util.EnumLike> = T[keyof T] & {};
703
- export interface $ZodEnumDef<T extends util.EnumLike = util.EnumLike> extends $ZodTypeDef {
704
- type: "enum";
705
- entries: T;
706
- }
707
- export interface $ZodEnumInternals<
708
- /** @ts-ignore Cast variance */
709
- out T extends util.EnumLike = util.EnumLike> extends $ZodTypeInternals<$InferEnumOutput<T>, $InferEnumInput<T>> {
710
- def: $ZodEnumDef<T>;
711
- /** @deprecated Internal API, use with caution (not deprecated) */
712
- values: util.PrimitiveSet;
713
- /** @deprecated Internal API, use with caution (not deprecated) */
714
- pattern: RegExp;
715
- isst: errors.$ZodIssueInvalidValue;
716
- }
717
- export interface $ZodEnum<T extends util.EnumLike = util.EnumLike> extends $ZodType {
718
- _zod: $ZodEnumInternals<T>;
719
- }
720
- export declare const $ZodEnum: core.$constructor<$ZodEnum>;
721
- export interface $ZodLiteralDef extends $ZodTypeDef {
722
- type: "literal";
723
- values: util.LiteralArray;
724
- }
725
- export interface $ZodLiteralInternals<T extends util.Primitive = util.Primitive> extends $ZodTypeInternals<T, T> {
726
- def: $ZodLiteralDef;
727
- values: Set<T>;
728
- pattern: RegExp;
729
- isst: errors.$ZodIssueInvalidValue;
730
- }
731
- export interface $ZodLiteral<T extends util.Primitive = util.Primitive> extends $ZodType {
732
- _zod: $ZodLiteralInternals<T>;
733
- }
734
- export declare const $ZodLiteral: core.$constructor<$ZodLiteral>;
735
- declare global {
736
- interface File {
737
- }
738
- }
739
- export interface $ZodFileDef extends $ZodTypeDef {
740
- type: "file";
741
- }
742
- export interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
743
- def: $ZodFileDef;
744
- isst: errors.$ZodIssueInvalidType;
745
- bag: util.LoosePartial<{
746
- minimum: number;
747
- maximum: number;
748
- mime: util.MimeTypes[];
749
- }>;
750
- }
751
- export interface $ZodFile extends $ZodType {
752
- _zod: $ZodFileInternals;
753
- }
754
- export declare const $ZodFile: core.$constructor<$ZodFile>;
755
- export interface $ZodTransformDef extends $ZodTypeDef {
756
- type: "transform";
757
- transform: (input: unknown, payload: ParsePayload<unknown>) => util.MaybeAsync<unknown>;
758
- }
759
- export interface $ZodTransformInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I> {
760
- def: $ZodTransformDef;
761
- isst: never;
762
- }
763
- export interface $ZodTransform<O = unknown, I = unknown> extends $ZodType {
764
- _zod: $ZodTransformInternals<O, I>;
765
- }
766
- export declare const $ZodTransform: core.$constructor<$ZodTransform>;
767
- export interface $ZodOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
768
- type: "optional";
769
- innerType: T;
770
- }
771
- export interface $ZodOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<T> | undefined, core.input<T> | undefined> {
772
- def: $ZodOptionalDef<T>;
773
- optin: "optional";
774
- optout: "optional";
775
- isst: never;
776
- values: T["_zod"]["values"];
777
- pattern: T["_zod"]["pattern"];
778
- }
779
- export interface $ZodOptional<T extends SomeType = $ZodType> extends $ZodType {
780
- _zod: $ZodOptionalInternals<T>;
781
- }
782
- export declare const $ZodOptional: core.$constructor<$ZodOptional>;
783
- export interface $ZodNullableDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
784
- type: "nullable";
785
- innerType: T;
786
- }
787
- export interface $ZodNullableInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<T> | null, core.input<T> | null> {
788
- def: $ZodNullableDef<T>;
789
- optin: T["_zod"]["optin"];
790
- optout: T["_zod"]["optout"];
791
- isst: never;
792
- values: T["_zod"]["values"];
793
- pattern: T["_zod"]["pattern"];
794
- }
795
- export interface $ZodNullable<T extends SomeType = $ZodType> extends $ZodType {
796
- _zod: $ZodNullableInternals<T>;
797
- }
798
- export declare const $ZodNullable: core.$constructor<$ZodNullable>;
799
- export interface $ZodDefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
800
- type: "default";
801
- innerType: T;
802
- /** The default value. May be a getter. */
803
- defaultValue: util.NoUndefined<core.output<T>>;
804
- }
805
- export interface $ZodDefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.NoUndefined<core.output<T>>, core.input<T> | undefined> {
806
- def: $ZodDefaultDef<T>;
807
- optin: "optional";
808
- isst: never;
809
- values: T["_zod"]["values"];
810
- }
811
- export interface $ZodDefault<T extends SomeType = $ZodType> extends $ZodType {
812
- _zod: $ZodDefaultInternals<T>;
813
- }
814
- export declare const $ZodDefault: core.$constructor<$ZodDefault>;
815
- export interface $ZodPrefaultDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
816
- type: "prefault";
817
- innerType: T;
818
- /** The default value. May be a getter. */
819
- defaultValue: core.input<T>;
820
- }
821
- export interface $ZodPrefaultInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.NoUndefined<core.output<T>>, core.input<T> | undefined> {
822
- def: $ZodPrefaultDef<T>;
823
- optin: "optional";
824
- isst: never;
825
- values: T["_zod"]["values"];
826
- }
827
- export interface $ZodPrefault<T extends SomeType = $ZodType> extends $ZodType {
828
- _zod: $ZodPrefaultInternals<T>;
829
- }
830
- export declare const $ZodPrefault: core.$constructor<$ZodPrefault>;
831
- export interface $ZodNonOptionalDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
832
- type: "nonoptional";
833
- innerType: T;
834
- }
835
- export interface $ZodNonOptionalInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.NoUndefined<core.output<T>>, util.NoUndefined<core.input<T>>> {
836
- def: $ZodNonOptionalDef<T>;
837
- isst: errors.$ZodIssueInvalidType;
838
- values: T["_zod"]["values"];
839
- }
840
- export interface $ZodNonOptional<T extends SomeType = $ZodType> extends $ZodType {
841
- _zod: $ZodNonOptionalInternals<T>;
842
- }
843
- export declare const $ZodNonOptional: core.$constructor<$ZodNonOptional>;
844
- export interface $ZodSuccessDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
845
- type: "success";
846
- innerType: T;
847
- }
848
- export interface $ZodSuccessInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<boolean, core.input<T>> {
849
- def: $ZodSuccessDef<T>;
850
- isst: never;
851
- }
852
- export interface $ZodSuccess<T extends SomeType = $ZodType> extends $ZodType {
853
- _zod: $ZodSuccessInternals<T>;
854
- }
855
- export declare const $ZodSuccess: core.$constructor<$ZodSuccess>;
856
- export interface $ZodCatchCtx extends ParsePayload {
857
- /** @deprecated Use `ctx.issues` */
858
- error: {
859
- issues: errors.$ZodIssue[];
860
- };
861
- /** @deprecated Use `ctx.value` */
862
- input: unknown;
863
- }
864
- export interface $ZodCatchDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
865
- type: "catch";
866
- innerType: T;
867
- catchValue: (ctx: $ZodCatchCtx) => unknown;
868
- }
869
- export interface $ZodCatchInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<T>, core.input<T> | util.Whatever> {
870
- def: $ZodCatchDef<T>;
871
- optin: T["_zod"]["optin"];
872
- optout: T["_zod"]["optout"];
873
- isst: never;
874
- values: T["_zod"]["values"];
875
- }
876
- export interface $ZodCatch<T extends SomeType = $ZodType> extends $ZodType {
877
- _zod: $ZodCatchInternals<T>;
878
- }
879
- export declare const $ZodCatch: core.$constructor<$ZodCatch>;
880
- export interface $ZodNaNDef extends $ZodTypeDef {
881
- type: "nan";
882
- }
883
- export interface $ZodNaNInternals extends $ZodTypeInternals<number, number> {
884
- def: $ZodNaNDef;
885
- isst: errors.$ZodIssueInvalidType;
886
- }
887
- export interface $ZodNaN extends $ZodType {
888
- _zod: $ZodNaNInternals;
889
- }
890
- export declare const $ZodNaN: core.$constructor<$ZodNaN>;
891
- export interface $ZodPipeDef<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeDef {
892
- type: "pipe";
893
- in: A;
894
- out: B;
895
- }
896
- export interface $ZodPipeInternals<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<B>, core.input<A>> {
897
- def: $ZodPipeDef<A, B>;
898
- isst: never;
899
- values: A["_zod"]["values"];
900
- optin: A["_zod"]["optin"];
901
- optout: B["_zod"]["optout"];
902
- }
903
- export interface $ZodPipe<A extends SomeType = $ZodType, B extends SomeType = $ZodType> extends $ZodType {
904
- _zod: $ZodPipeInternals<A, B>;
905
- }
906
- export declare const $ZodPipe: core.$constructor<$ZodPipe>;
907
- export interface $ZodReadonlyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
908
- type: "readonly";
909
- innerType: T;
910
- }
911
- export interface $ZodReadonlyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<util.MakeReadonly<core.output<T>>, util.MakeReadonly<core.input<T>>> {
912
- def: $ZodReadonlyDef<T>;
913
- optin: T["_zod"]["optin"];
914
- optout: T["_zod"]["optout"];
915
- isst: never;
916
- propValues: T["_zod"]["propValues"];
917
- }
918
- export interface $ZodReadonly<T extends SomeType = $ZodType> extends $ZodType {
919
- _zod: $ZodReadonlyInternals<T>;
920
- }
921
- export declare const $ZodReadonly: core.$constructor<$ZodReadonly>;
922
- export interface $ZodTemplateLiteralDef extends $ZodTypeDef {
923
- type: "template_literal";
924
- parts: $ZodTemplateLiteralPart[];
925
- }
926
- export interface $ZodTemplateLiteralInternals<Template extends string = string> extends $ZodTypeInternals<Template, Template> {
927
- pattern: RegExp;
928
- def: $ZodTemplateLiteralDef;
929
- isst: errors.$ZodIssueInvalidType;
930
- }
931
- export interface $ZodTemplateLiteral<Template extends string = string> extends $ZodType {
932
- _zod: $ZodTemplateLiteralInternals<Template>;
933
- }
934
- type LiteralPart = Exclude<util.Literal, symbol>;
935
- interface SchemaPartInternals extends $ZodTypeInternals<LiteralPart, LiteralPart> {
936
- pattern: RegExp;
937
- }
938
- interface SchemaPart extends $ZodType {
939
- _zod: SchemaPartInternals;
940
- }
941
- export type $ZodTemplateLiteralPart = LiteralPart | SchemaPart;
942
- type UndefinedToEmptyString<T> = T extends undefined ? "" : T;
943
- type AppendToTemplateLiteral<Template extends string, Suffix extends LiteralPart | $ZodType> = Suffix extends LiteralPart ? `${Template}${UndefinedToEmptyString<Suffix>}` : Suffix extends $ZodType ? `${Template}${core.output<Suffix> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}` : never;
944
- export type ConcatenateTupleOfStrings<T extends string[]> = T extends [
945
- infer First extends string,
946
- ...infer Rest extends string[]
947
- ] ? Rest extends string[] ? First extends "" ? ConcatenateTupleOfStrings<Rest> : `${First}${ConcatenateTupleOfStrings<Rest>}` : never : "";
948
- export type ConvertPartsToStringTuple<Parts extends $ZodTemplateLiteralPart[]> = {
949
- [K in keyof Parts]: Parts[K] extends LiteralPart ? `${UndefinedToEmptyString<Parts[K]>}` : Parts[K] extends $ZodType ? `${core.output<Parts[K]> extends infer T extends LiteralPart ? UndefinedToEmptyString<T> : never}` : never;
950
- };
951
- export type ToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = ConcatenateTupleOfStrings<ConvertPartsToStringTuple<Parts>>;
952
- export type $PartsToTemplateLiteral<Parts extends $ZodTemplateLiteralPart[]> = [] extends Parts ? `` : Parts extends [...infer Rest, infer Last extends $ZodTemplateLiteralPart] ? Rest extends $ZodTemplateLiteralPart[] ? AppendToTemplateLiteral<$PartsToTemplateLiteral<Rest>, Last> : never : never;
953
- export declare const $ZodTemplateLiteral: core.$constructor<$ZodTemplateLiteral>;
954
- export interface $ZodPromiseDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
955
- type: "promise";
956
- innerType: T;
957
- }
958
- export interface $ZodPromiseInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<T>, util.MaybeAsync<core.input<T>>> {
959
- def: $ZodPromiseDef<T>;
960
- isst: never;
961
- }
962
- export interface $ZodPromise<T extends SomeType = $ZodType> extends $ZodType {
963
- _zod: $ZodPromiseInternals<T>;
964
- }
965
- export declare const $ZodPromise: core.$constructor<$ZodPromise>;
966
- export interface $ZodLazyDef<T extends SomeType = $ZodType> extends $ZodTypeDef {
967
- type: "lazy";
968
- getter: () => T;
969
- }
970
- export interface $ZodLazyInternals<T extends SomeType = $ZodType> extends $ZodTypeInternals<core.output<T>, core.input<T>> {
971
- def: $ZodLazyDef<T>;
972
- isst: never;
973
- /** Auto-cached way to retrieve the inner schema */
974
- innerType: T;
975
- pattern: T["_zod"]["pattern"];
976
- propValues: T["_zod"]["propValues"];
977
- optin: T["_zod"]["optin"];
978
- optout: T["_zod"]["optout"];
979
- }
980
- export interface $ZodLazy<T extends SomeType = $ZodType> extends $ZodType {
981
- _zod: $ZodLazyInternals<T>;
982
- }
983
- export declare const $ZodLazy: core.$constructor<$ZodLazy>;
984
- export interface $ZodCustomDef<O = unknown> extends $ZodTypeDef, checks.$ZodCheckDef {
985
- type: "custom";
986
- check: "custom";
987
- path?: PropertyKey[] | undefined;
988
- error?: errors.$ZodErrorMap | undefined;
989
- params?: Record<string, any> | undefined;
990
- fn: (arg: O) => unknown;
991
- }
992
- export interface $ZodCustomInternals<O = unknown, I = unknown> extends $ZodTypeInternals<O, I>, checks.$ZodCheckInternals<O> {
993
- def: $ZodCustomDef;
994
- issc: errors.$ZodIssue;
995
- isst: never;
996
- bag: util.LoosePartial<{
997
- Class: typeof util.Class;
998
- }>;
999
- }
1000
- export interface $ZodCustom<O = unknown, I = unknown> extends $ZodType {
1001
- _zod: $ZodCustomInternals<O, I>;
1002
- }
1003
- export declare const $ZodCustom: core.$constructor<$ZodCustom>;
1004
- export type $ZodTypes = $ZodString | $ZodNumber | $ZodBigInt | $ZodBoolean | $ZodDate | $ZodSymbol | $ZodUndefined | $ZodNullable | $ZodNull | $ZodAny | $ZodUnknown | $ZodNever | $ZodVoid | $ZodArray | $ZodObject | $ZodUnion | $ZodIntersection | $ZodTuple | $ZodRecord | $ZodMap | $ZodSet | $ZodLiteral | $ZodEnum | $ZodPromise | $ZodLazy | $ZodOptional | $ZodDefault | $ZodPrefault | $ZodTemplateLiteral | $ZodCustom | $ZodTransform | $ZodNonOptional | $ZodReadonly | $ZodNaN | $ZodPipe | $ZodSuccess | $ZodCatch | $ZodFile;
1005
- export type $ZodStringFormatTypes = $ZodGUID | $ZodUUID | $ZodEmail | $ZodURL | $ZodEmoji | $ZodNanoID | $ZodCUID | $ZodCUID2 | $ZodULID | $ZodXID | $ZodKSUID | $ZodISODateTime | $ZodISODate | $ZodISOTime | $ZodISODuration | $ZodIPv4 | $ZodIPv6 | $ZodCIDRv4 | $ZodCIDRv6 | $ZodBase64 | $ZodBase64URL | $ZodE164 | $ZodJWT;