@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,4 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export default function (): {
3
- localeError: errors.$ZodErrorMap;
4
- };
@@ -1,4 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export default function (): {
3
- localeError: errors.$ZodErrorMap;
4
- };
@@ -1,5 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export declare const parsedType: (data: any) => string;
3
- export default function (): {
4
- localeError: errors.$ZodErrorMap;
5
- };
@@ -1,4 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export default function (): {
3
- localeError: errors.$ZodErrorMap;
4
- };
@@ -1,4 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export default function (): {
3
- localeError: errors.$ZodErrorMap;
4
- };
@@ -1,4 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export default function (): {
3
- localeError: errors.$ZodErrorMap;
4
- };
@@ -1,4 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export default function (): {
3
- localeError: errors.$ZodErrorMap;
4
- };
@@ -1,4 +0,0 @@
1
- import type * as errors from "../core/errors.js";
2
- export default function (): {
3
- localeError: errors.$ZodErrorMap;
4
- };
@@ -1 +0,0 @@
1
- export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "zod/v4/core";
@@ -1,7 +0,0 @@
1
- import * as core from "zod/v4/core";
2
- import * as schemas from "./schemas.js";
3
- export declare function string<T = unknown>(params?: string | core.$ZodStringParams): schemas.ZodMiniString<T>;
4
- export declare function number<T = unknown>(params?: string | core.$ZodNumberParams): schemas.ZodMiniNumber<T>;
5
- export declare function boolean<T = unknown>(params?: string | core.$ZodBooleanParams): schemas.ZodMiniBoolean<T>;
6
- export declare function bigint<T = unknown>(params?: string | core.$ZodBigIntParams): schemas.ZodMiniBigInt<T>;
7
- export declare function date<T = unknown>(params?: string | core.$ZodDateParams): schemas.ZodMiniDate<T>;
@@ -1,11 +0,0 @@
1
- export * as core from "zod/v4/core";
2
- export * from "./parse.js";
3
- export * from "./schemas.js";
4
- export * from "./checks.js";
5
- export type { infer, output, input } from "zod/v4/core";
6
- export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, } from "zod/v4/core";
7
- export * as locales from "../locales/index.js";
8
- /** A special constant with type `never` */
9
- export * as iso from "./iso.js";
10
- export { ZodMiniISODateTime, ZodMiniISODate, ZodMiniISOTime, ZodMiniISODuration, } from "./iso.js";
11
- export * as coerce from "./coerce.js";
@@ -1,3 +0,0 @@
1
- import * as z from "./external.js";
2
- export * from "./external.js";
3
- export { z };
@@ -1,22 +0,0 @@
1
- import * as core from "zod/v4/core";
2
- import * as schemas from "./schemas.js";
3
- export interface ZodMiniISODateTime extends schemas.ZodMiniStringFormat<"datetime"> {
4
- _zod: core.$ZodISODateTimeInternals;
5
- }
6
- export declare const ZodMiniISODateTime: core.$constructor<ZodMiniISODateTime>;
7
- export declare function datetime(params?: string | core.$ZodISODateTimeParams): ZodMiniISODateTime;
8
- export interface ZodMiniISODate extends schemas.ZodMiniStringFormat<"date"> {
9
- _zod: core.$ZodISODateInternals;
10
- }
11
- export declare const ZodMiniISODate: core.$constructor<ZodMiniISODate>;
12
- export declare function date(params?: string | core.$ZodISODateParams): ZodMiniISODate;
13
- export interface ZodMiniISOTime extends schemas.ZodMiniStringFormat<"time"> {
14
- _zod: core.$ZodISOTimeInternals;
15
- }
16
- export declare const ZodMiniISOTime: core.$constructor<ZodMiniISOTime>;
17
- export declare function time(params?: string | core.$ZodISOTimeParams): ZodMiniISOTime;
18
- export interface ZodMiniISODuration extends schemas.ZodMiniStringFormat<"duration"> {
19
- _zod: core.$ZodISODurationInternals;
20
- }
21
- export declare const ZodMiniISODuration: core.$constructor<ZodMiniISODuration>;
22
- export declare function duration(params?: string | core.$ZodISODurationParams): ZodMiniISODuration;
@@ -1 +0,0 @@
1
- export { parse, safeParse, parseAsync, safeParseAsync } from "zod/v4/core";
@@ -1,350 +0,0 @@
1
- import * as core from "zod/v4/core";
2
- import { util } from "zod/v4/core";
3
- type SomeType = core.SomeType;
4
- export interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {
5
- check(...checks: (core.CheckFn<core.output<this>> | core.$ZodCheck<core.output<this>>)[]): this;
6
- clone(def?: Internals["def"], params?: {
7
- parent: boolean;
8
- }): this;
9
- register<R extends core.$ZodRegistry>(registry: R, ...meta: this extends R["_schema"] ? undefined extends R["_meta"] ? [core.$replace<R["_meta"], this>?] : [core.$replace<R["_meta"], this>] : ["Incompatible schema"]): this;
10
- brand<T extends PropertyKey = PropertyKey>(value?: T): PropertyKey extends T ? this : this & Record<"_zod", Record<"output", core.output<this> & core.$brand<T>>>;
11
- def: Internals["def"];
12
- parse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): core.output<this>;
13
- safeParse(data: unknown, params?: core.ParseContext<core.$ZodIssue>): util.SafeParseResult<core.output<this>>;
14
- parseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<core.output<this>>;
15
- safeParseAsync(data: unknown, params?: core.ParseContext<core.$ZodIssue>): Promise<util.SafeParseResult<core.output<this>>>;
16
- }
17
- interface _ZodMiniType<out Internals extends core.$ZodTypeInternals = core.$ZodTypeInternals> extends ZodMiniType<any, any, Internals> {
18
- }
19
- export declare const ZodMiniType: core.$constructor<ZodMiniType>;
20
- export interface _ZodMiniString<T extends core.$ZodStringInternals<unknown> = core.$ZodStringInternals<unknown>> extends _ZodMiniType<T>, core.$ZodString<T["input"]> {
21
- _zod: T;
22
- }
23
- export interface ZodMiniString<Input = unknown> extends _ZodMiniString<core.$ZodStringInternals<Input>>, core.$ZodString<Input> {
24
- }
25
- export declare const ZodMiniString: core.$constructor<ZodMiniString>;
26
- export declare function string(params?: string | core.$ZodStringParams): ZodMiniString<string>;
27
- export interface ZodMiniStringFormat<Format extends core.$ZodStringFormats = core.$ZodStringFormats> extends _ZodMiniString<core.$ZodStringFormatInternals<Format>>, core.$ZodStringFormat<Format> {
28
- }
29
- export declare const ZodMiniStringFormat: core.$constructor<ZodMiniStringFormat>;
30
- export interface ZodMiniEmail extends _ZodMiniString<core.$ZodEmailInternals> {
31
- }
32
- export declare const ZodMiniEmail: core.$constructor<ZodMiniEmail>;
33
- export declare function email(params?: string | core.$ZodEmailParams): ZodMiniEmail;
34
- export interface ZodMiniGUID extends _ZodMiniString<core.$ZodGUIDInternals> {
35
- }
36
- export declare const ZodMiniGUID: core.$constructor<ZodMiniGUID>;
37
- export declare function guid(params?: string | core.$ZodGUIDParams): ZodMiniGUID;
38
- export interface ZodMiniUUID extends _ZodMiniString<core.$ZodUUIDInternals> {
39
- }
40
- export declare const ZodMiniUUID: core.$constructor<ZodMiniUUID>;
41
- export declare function uuid(params?: string | core.$ZodUUIDParams): ZodMiniUUID;
42
- export declare function uuidv4(params?: string | core.$ZodUUIDv4Params): ZodMiniUUID;
43
- export declare function uuidv6(params?: string | core.$ZodUUIDv6Params): ZodMiniUUID;
44
- export declare function uuidv7(params?: string | core.$ZodUUIDv7Params): ZodMiniUUID;
45
- export interface ZodMiniURL extends _ZodMiniString<core.$ZodURLInternals> {
46
- }
47
- export declare const ZodMiniURL: core.$constructor<ZodMiniURL>;
48
- export declare function url(params?: string | core.$ZodURLParams): ZodMiniURL;
49
- export interface ZodMiniEmoji extends _ZodMiniString<core.$ZodEmojiInternals> {
50
- }
51
- export declare const ZodMiniEmoji: core.$constructor<ZodMiniEmoji>;
52
- export declare function emoji(params?: string | core.$ZodEmojiParams): ZodMiniEmoji;
53
- export interface ZodMiniNanoID extends _ZodMiniString<core.$ZodNanoIDInternals> {
54
- }
55
- export declare const ZodMiniNanoID: core.$constructor<ZodMiniNanoID>;
56
- export declare function nanoid(params?: string | core.$ZodNanoIDParams): ZodMiniNanoID;
57
- export interface ZodMiniCUID extends _ZodMiniString<core.$ZodCUIDInternals> {
58
- }
59
- export declare const ZodMiniCUID: core.$constructor<ZodMiniCUID>;
60
- export declare function cuid(params?: string | core.$ZodCUIDParams): ZodMiniCUID;
61
- export interface ZodMiniCUID2 extends _ZodMiniString<core.$ZodCUID2Internals> {
62
- }
63
- export declare const ZodMiniCUID2: core.$constructor<ZodMiniCUID2>;
64
- export declare function cuid2(params?: string | core.$ZodCUID2Params): ZodMiniCUID2;
65
- export interface ZodMiniULID extends _ZodMiniString<core.$ZodULIDInternals> {
66
- }
67
- export declare const ZodMiniULID: core.$constructor<ZodMiniULID>;
68
- export declare function ulid(params?: string | core.$ZodULIDParams): ZodMiniULID;
69
- export interface ZodMiniXID extends _ZodMiniString<core.$ZodXIDInternals> {
70
- }
71
- export declare const ZodMiniXID: core.$constructor<ZodMiniXID>;
72
- export declare function xid(params?: string | core.$ZodXIDParams): ZodMiniXID;
73
- export interface ZodMiniKSUID extends _ZodMiniString<core.$ZodKSUIDInternals> {
74
- }
75
- export declare const ZodMiniKSUID: core.$constructor<ZodMiniKSUID>;
76
- export declare function ksuid(params?: string | core.$ZodKSUIDParams): ZodMiniKSUID;
77
- export interface ZodMiniIPv4 extends _ZodMiniString<core.$ZodIPv4Internals> {
78
- }
79
- export declare const ZodMiniIPv4: core.$constructor<ZodMiniIPv4>;
80
- export declare function ipv4(params?: string | core.$ZodIPv4Params): ZodMiniIPv4;
81
- export interface ZodMiniIPv6 extends _ZodMiniString<core.$ZodIPv6Internals> {
82
- }
83
- export declare const ZodMiniIPv6: core.$constructor<ZodMiniIPv6>;
84
- export declare function ipv6(params?: string | core.$ZodIPv6Params): ZodMiniIPv6;
85
- export interface ZodMiniCIDRv4 extends _ZodMiniString<core.$ZodCIDRv4Internals> {
86
- }
87
- export declare const ZodMiniCIDRv4: core.$constructor<ZodMiniCIDRv4>;
88
- export declare function cidrv4(params?: string | core.$ZodCIDRv4Params): ZodMiniCIDRv4;
89
- export interface ZodMiniCIDRv6 extends _ZodMiniString<core.$ZodCIDRv6Internals> {
90
- }
91
- export declare const ZodMiniCIDRv6: core.$constructor<ZodMiniCIDRv6>;
92
- export declare function cidrv6(params?: string | core.$ZodCIDRv6Params): ZodMiniCIDRv6;
93
- export interface ZodMiniBase64 extends _ZodMiniString<core.$ZodBase64Internals> {
94
- }
95
- export declare const ZodMiniBase64: core.$constructor<ZodMiniBase64>;
96
- export declare function base64(params?: string | core.$ZodBase64Params): ZodMiniBase64;
97
- export interface ZodMiniBase64URL extends _ZodMiniString<core.$ZodBase64URLInternals> {
98
- }
99
- export declare const ZodMiniBase64URL: core.$constructor<ZodMiniBase64URL>;
100
- export declare function base64url(params?: string | core.$ZodBase64URLParams): ZodMiniBase64URL;
101
- export interface ZodMiniE164 extends _ZodMiniString<core.$ZodE164Internals> {
102
- }
103
- export declare const ZodMiniE164: core.$constructor<ZodMiniE164>;
104
- export declare function e164(params?: string | core.$ZodE164Params): ZodMiniE164;
105
- export interface ZodMiniJWT extends _ZodMiniString<core.$ZodJWTInternals> {
106
- }
107
- export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
108
- export declare function jwt(params?: string | core.$ZodJWTParams): ZodMiniJWT;
109
- interface _ZodMiniNumber<T extends core.$ZodNumberInternals<unknown> = core.$ZodNumberInternals<unknown>> extends _ZodMiniType<T>, core.$ZodNumber<T["input"]> {
110
- _zod: T;
111
- }
112
- export interface ZodMiniNumber<Input = unknown> extends _ZodMiniNumber<core.$ZodNumberInternals<Input>>, core.$ZodNumber<Input> {
113
- }
114
- export declare const ZodMiniNumber: core.$constructor<ZodMiniNumber>;
115
- export declare function number(params?: string | core.$ZodNumberParams): ZodMiniNumber<number>;
116
- export interface ZodMiniNumberFormat extends _ZodMiniNumber<core.$ZodNumberFormatInternals>, core.$ZodNumberFormat {
117
- }
118
- export declare const ZodMiniNumberFormat: core.$constructor<ZodMiniNumberFormat>;
119
- export declare function int(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
120
- export declare function float32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
121
- export declare function float64(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
122
- export declare function int32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
123
- export declare function uint32(params?: string | core.$ZodCheckNumberFormatParams): ZodMiniNumberFormat;
124
- export interface ZodMiniBoolean<T = unknown> extends _ZodMiniType<core.$ZodBooleanInternals<T>> {
125
- }
126
- export declare const ZodMiniBoolean: core.$constructor<ZodMiniBoolean>;
127
- export declare function boolean(params?: string | core.$ZodBooleanParams): ZodMiniBoolean<boolean>;
128
- export interface ZodMiniBigInt<T = unknown> extends _ZodMiniType<core.$ZodBigIntInternals<T>>, core.$ZodBigInt<T> {
129
- }
130
- export declare const ZodMiniBigInt: core.$constructor<ZodMiniBigInt>;
131
- export declare function bigint(params?: string | core.$ZodBigIntParams): ZodMiniBigInt<bigint>;
132
- export interface ZodMiniBigIntFormat extends _ZodMiniType<core.$ZodBigIntFormatInternals> {
133
- }
134
- export declare const ZodMiniBigIntFormat: core.$constructor<ZodMiniBigIntFormat>;
135
- export declare function int64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat;
136
- export declare function uint64(params?: string | core.$ZodBigIntFormatParams): ZodMiniBigIntFormat;
137
- export interface ZodMiniSymbol extends _ZodMiniType<core.$ZodSymbolInternals> {
138
- }
139
- export declare const ZodMiniSymbol: core.$constructor<ZodMiniSymbol>;
140
- export declare function symbol(params?: string | core.$ZodSymbolParams): ZodMiniSymbol;
141
- export interface ZodMiniUndefined extends _ZodMiniType<core.$ZodUndefinedInternals> {
142
- }
143
- export declare const ZodMiniUndefined: core.$constructor<ZodMiniUndefined>;
144
- declare function _undefined(params?: string | core.$ZodUndefinedParams): ZodMiniUndefined;
145
- export { _undefined as undefined };
146
- export interface ZodMiniNull extends _ZodMiniType<core.$ZodNullInternals> {
147
- }
148
- export declare const ZodMiniNull: core.$constructor<ZodMiniNull>;
149
- declare function _null(params?: string | core.$ZodNullParams): ZodMiniNull;
150
- export { _null as null };
151
- export interface ZodMiniAny extends _ZodMiniType<core.$ZodAnyInternals> {
152
- }
153
- export declare const ZodMiniAny: core.$constructor<ZodMiniAny>;
154
- export declare function any(): ZodMiniAny;
155
- export interface ZodMiniUnknown extends _ZodMiniType<core.$ZodUnknownInternals> {
156
- }
157
- export declare const ZodMiniUnknown: core.$constructor<ZodMiniUnknown>;
158
- export declare function unknown(): ZodMiniUnknown;
159
- export interface ZodMiniNever extends _ZodMiniType<core.$ZodNeverInternals> {
160
- }
161
- export declare const ZodMiniNever: core.$constructor<ZodMiniNever>;
162
- export declare function never(params?: string | core.$ZodNeverParams): ZodMiniNever;
163
- export interface ZodMiniVoid extends _ZodMiniType<core.$ZodVoidInternals> {
164
- }
165
- export declare const ZodMiniVoid: core.$constructor<ZodMiniVoid>;
166
- declare function _void(params?: string | core.$ZodVoidParams): ZodMiniVoid;
167
- export { _void as void };
168
- export interface ZodMiniDate<T = unknown> extends _ZodMiniType<core.$ZodDateInternals<T>> {
169
- }
170
- export declare const ZodMiniDate: core.$constructor<ZodMiniDate>;
171
- export declare function date(params?: string | core.$ZodDateParams): ZodMiniDate<Date>;
172
- export interface ZodMiniArray<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodArrayInternals<T>>, core.$ZodArray<T> {
173
- }
174
- export declare const ZodMiniArray: core.$constructor<ZodMiniArray>;
175
- export declare function array<T extends SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodMiniArray<T>;
176
- export declare function keyof<T extends ZodMiniObject>(schema: T): ZodMiniLiteral<keyof T["shape"]>;
177
- export interface ZodMiniObject<
178
- /** @ts-ignore Cast variance */
179
- out Shape extends core.$ZodShape = core.$ZodShape, out Config extends core.$ZodObjectConfig = core.$ZodObjectConfig> extends ZodMiniType<any, any, core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
180
- shape: Shape;
181
- }
182
- export declare const ZodMiniObject: core.$constructor<ZodMiniObject>;
183
- export declare function object<T extends core.$ZodLooseShape = Record<never, SomeType>>(shape?: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$strip>;
184
- export declare function strictObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$strict>;
185
- export declare function looseObject<T extends core.$ZodLooseShape>(shape: T, params?: string | core.$ZodObjectParams): ZodMiniObject<T, core.$loose>;
186
- export declare function extend<T extends ZodMiniObject, U extends core.$ZodLooseShape>(schema: T, shape: U): ZodMiniObject<util.Extend<T["shape"], U>, T["_zod"]["config"]>;
187
- /** @deprecated Identical to `z.extend(A, B)` */
188
- export declare function merge<T extends ZodMiniObject, U extends ZodMiniObject>(a: T, b: U): ZodMiniObject<util.Extend<T["shape"], U["shape"]>, T["_zod"]["config"]>;
189
- export declare function pick<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Flatten<Pick<T["shape"], keyof T["shape"] & keyof M>>, T["_zod"]["config"]>;
190
- export declare function omit<T extends ZodMiniObject, const M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Flatten<Omit<T["shape"], keyof M>>, T["_zod"]["config"]>;
191
- export declare function partial<T extends ZodMiniObject>(schema: T): ZodMiniObject<{
192
- [k in keyof T["shape"]]: ZodMiniOptional<T["shape"][k]>;
193
- }, T["_zod"]["config"]>;
194
- export declare function partial<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<{
195
- [k in keyof T["shape"]]: k extends keyof M ? ZodMiniOptional<T["shape"][k]> : T["shape"][k];
196
- }, T["_zod"]["config"]>;
197
- export type RequiredInterfaceShape<Shape extends core.$ZodLooseShape, Keys extends PropertyKey = keyof Shape> = util.Identity<{
198
- [k in keyof Shape as k extends Keys ? k : never]: ZodMiniNonOptional<Shape[k]>;
199
- } & {
200
- [k in keyof Shape as k extends Keys ? never : k]: Shape[k];
201
- }>;
202
- export declare function required<T extends ZodMiniObject>(schema: T): ZodMiniObject<{
203
- [k in keyof T["shape"]]: ZodMiniNonOptional<T["shape"][k]>;
204
- }, T["_zod"]["config"]>;
205
- export declare function required<T extends ZodMiniObject, M extends util.Mask<keyof T["shape"]>>(schema: T, mask: M): ZodMiniObject<util.Extend<T["shape"], {
206
- [k in keyof M & keyof T["shape"]]: ZodMiniNonOptional<T["shape"][k]>;
207
- }>, T["_zod"]["config"]>;
208
- export interface ZodMiniUnion<T extends readonly SomeType[] = readonly core.$ZodType[]> extends _ZodMiniType<core.$ZodUnionInternals<T>> {
209
- }
210
- export declare const ZodMiniUnion: core.$constructor<ZodMiniUnion>;
211
- export declare function union<const T extends readonly SomeType[]>(options: T, params?: string | core.$ZodUnionParams): ZodMiniUnion<T>;
212
- export interface ZodMiniDiscriminatedUnion<Options extends readonly SomeType[] = readonly core.$ZodType[]> extends ZodMiniUnion<Options> {
213
- _zod: core.$ZodDiscriminatedUnionInternals<Options>;
214
- }
215
- export declare const ZodMiniDiscriminatedUnion: core.$constructor<ZodMiniDiscriminatedUnion>;
216
- export declare function discriminatedUnion<Types extends readonly [core.$ZodTypeDiscriminable, ...core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | core.$ZodDiscriminatedUnionParams): ZodMiniDiscriminatedUnion<Types>;
217
- export interface ZodMiniIntersection<A extends SomeType = core.$ZodType, B extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodIntersectionInternals<A, B>> {
218
- }
219
- export declare const ZodMiniIntersection: core.$constructor<ZodMiniIntersection>;
220
- export declare function intersection<T extends SomeType, U extends SomeType>(left: T, right: U): ZodMiniIntersection<T, U>;
221
- export interface ZodMiniTuple<T extends util.TupleItems = readonly core.$ZodType[], Rest extends SomeType | null = core.$ZodType | null> extends _ZodMiniType<core.$ZodTupleInternals<T, Rest>> {
222
- }
223
- export declare const ZodMiniTuple: core.$constructor<ZodMiniTuple>;
224
- export declare function tuple<const T extends readonly [SomeType, ...SomeType[]]>(items: T, params?: string | core.$ZodTupleParams): ZodMiniTuple<T, null>;
225
- export declare function tuple<const T extends readonly [SomeType, ...SomeType[]], Rest extends SomeType>(items: T, rest: Rest, params?: string | core.$ZodTupleParams): ZodMiniTuple<T, Rest>;
226
- export declare function tuple(items: [], params?: string | core.$ZodTupleParams): ZodMiniTuple<[], null>;
227
- export interface ZodMiniRecord<Key extends core.$ZodRecordKey = core.$ZodRecordKey, Value extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodRecordInternals<Key, Value>> {
228
- }
229
- export declare const ZodMiniRecord: core.$constructor<ZodMiniRecord>;
230
- export declare function record<Key extends core.$ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodMiniRecord<Key, Value>;
231
- export declare function partialRecord<Key extends core.$ZodRecordKey, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodRecordParams): ZodMiniRecord<ZodMiniUnion<[Key, ZodMiniNever]>, Value>;
232
- export interface ZodMiniMap<Key extends SomeType = core.$ZodType, Value extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodMapInternals<Key, Value>> {
233
- }
234
- export declare const ZodMiniMap: core.$constructor<ZodMiniMap>;
235
- export declare function map<Key extends SomeType, Value extends SomeType>(keyType: Key, valueType: Value, params?: string | core.$ZodMapParams): ZodMiniMap<Key, Value>;
236
- export interface ZodMiniSet<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodSetInternals<T>> {
237
- }
238
- export declare const ZodMiniSet: core.$constructor<ZodMiniSet>;
239
- export declare function set<Value extends SomeType>(valueType: Value, params?: string | core.$ZodSetParams): ZodMiniSet<Value>;
240
- export interface ZodMiniEnum<T extends util.EnumLike = util.EnumLike> extends _ZodMiniType<core.$ZodEnumInternals<T>> {
241
- }
242
- export declare const ZodMiniEnum: core.$constructor<ZodMiniEnum>;
243
- declare function _enum<const T extends readonly string[]>(values: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<util.ToEnum<T[number]>>;
244
- declare function _enum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<T>;
245
- export { _enum as enum };
246
- /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
247
- *
248
- * ```ts
249
- * enum Colors { red, green, blue }
250
- * z.enum(Colors);
251
- * ```
252
- */
253
- export declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<T>;
254
- export interface ZodMiniLiteral<T extends util.Primitive = util.Primitive> extends _ZodMiniType<core.$ZodLiteralInternals<T>> {
255
- }
256
- export declare const ZodMiniLiteral: core.$constructor<ZodMiniLiteral>;
257
- export declare function literal<const T extends ReadonlyArray<util.Literal>>(value: T, params?: string | core.$ZodLiteralParams): ZodMiniLiteral<T[number]>;
258
- export declare function literal<const T extends util.Literal>(value: T, params?: string | core.$ZodLiteralParams): ZodMiniLiteral<T>;
259
- export interface ZodMiniFile extends _ZodMiniType<core.$ZodFileInternals> {
260
- }
261
- export declare const ZodMiniFile: core.$constructor<ZodMiniFile>;
262
- export declare function file(params?: string | core.$ZodFileParams): ZodMiniFile;
263
- export interface ZodMiniTransform<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodTransformInternals<O, I>> {
264
- }
265
- export declare const ZodMiniTransform: core.$constructor<ZodMiniTransform>;
266
- export declare function transform<I = unknown, O = I>(fn: (input: I, ctx: core.ParsePayload) => O): ZodMiniTransform<Awaited<O>, I>;
267
- export interface ZodMiniOptional<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodOptionalInternals<T>>, core.$ZodOptional<T> {
268
- }
269
- export declare const ZodMiniOptional: core.$constructor<ZodMiniOptional>;
270
- export declare function optional<T extends SomeType>(innerType: T): ZodMiniOptional<T>;
271
- export interface ZodMiniNullable<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodNullableInternals<T>> {
272
- }
273
- export declare const ZodMiniNullable: core.$constructor<ZodMiniNullable>;
274
- export declare function nullable<T extends SomeType>(innerType: T): ZodMiniNullable<T>;
275
- export declare function nullish<T extends SomeType>(innerType: T): ZodMiniOptional<ZodMiniNullable<T>>;
276
- export interface ZodMiniDefault<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodDefaultInternals<T>> {
277
- }
278
- export declare const ZodMiniDefault: core.$constructor<ZodMiniDefault>;
279
- export declare function _default<T extends SomeType>(innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): ZodMiniDefault<T>;
280
- export interface ZodMiniPrefault<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodPrefaultInternals<T>> {
281
- }
282
- export declare const ZodMiniPrefault: core.$constructor<ZodMiniPrefault>;
283
- export declare function prefault<T extends SomeType>(innerType: T, defaultValue: util.NoUndefined<core.input<T>> | (() => util.NoUndefined<core.input<T>>)): ZodMiniPrefault<T>;
284
- export interface ZodMiniNonOptional<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodNonOptionalInternals<T>> {
285
- }
286
- export declare const ZodMiniNonOptional: core.$constructor<ZodMiniNonOptional>;
287
- export declare function nonoptional<T extends SomeType>(innerType: T, params?: string | core.$ZodNonOptionalParams): ZodMiniNonOptional<T>;
288
- export interface ZodMiniSuccess<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodSuccessInternals<T>> {
289
- }
290
- export declare const ZodMiniSuccess: core.$constructor<ZodMiniSuccess>;
291
- export declare function success<T extends SomeType>(innerType: T): ZodMiniSuccess<T>;
292
- export interface ZodMiniCatch<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodCatchInternals<T>> {
293
- }
294
- export declare const ZodMiniCatch: core.$constructor<ZodMiniCatch>;
295
- declare function _catch<T extends SomeType>(innerType: T, catchValue: core.output<T> | ((ctx: core.$ZodCatchCtx) => core.output<T>)): ZodMiniCatch<T>;
296
- export { _catch as catch };
297
- export interface ZodMiniNaN extends _ZodMiniType<core.$ZodNaNInternals> {
298
- }
299
- export declare const ZodMiniNaN: core.$constructor<ZodMiniNaN>;
300
- export declare function nan(params?: string | core.$ZodNaNParams): ZodMiniNaN;
301
- export interface ZodMiniPipe<A extends SomeType = core.$ZodType, B extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodPipeInternals<A, B>> {
302
- }
303
- export declare const ZodMiniPipe: core.$constructor<ZodMiniPipe>;
304
- export declare function pipe<const A extends SomeType, B extends core.$ZodType<unknown, core.output<A>> = core.$ZodType<unknown, core.output<A>>>(in_: A, out: B | core.$ZodType<unknown, core.output<A>>): ZodMiniPipe<A, B>;
305
- export interface ZodMiniReadonly<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodReadonlyInternals<T>> {
306
- }
307
- export declare const ZodMiniReadonly: core.$constructor<ZodMiniReadonly>;
308
- export declare function readonly<T extends SomeType>(innerType: T): ZodMiniReadonly<T>;
309
- export interface ZodMiniTemplateLiteral<Template extends string = string> extends _ZodMiniType<core.$ZodTemplateLiteralInternals<Template>> {
310
- }
311
- export declare const ZodMiniTemplateLiteral: core.$constructor<ZodMiniTemplateLiteral>;
312
- export declare function templateLiteral<const Parts extends core.$ZodTemplateLiteralPart[]>(parts: Parts, params?: string | core.$ZodTemplateLiteralParams): ZodMiniTemplateLiteral<core.$PartsToTemplateLiteral<Parts>>;
313
- export interface ZodMiniLazy<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodLazyInternals<T>> {
314
- }
315
- export declare const ZodMiniLazy: core.$constructor<ZodMiniLazy>;
316
- declare function _lazy<T extends SomeType>(getter: () => T): ZodMiniLazy<T>;
317
- export { _lazy as lazy };
318
- export interface ZodMiniPromise<T extends SomeType = core.$ZodType> extends _ZodMiniType<core.$ZodPromiseInternals<T>> {
319
- }
320
- export declare const ZodMiniPromise: core.$constructor<ZodMiniPromise>;
321
- export declare function promise<T extends SomeType>(innerType: T): ZodMiniPromise<T>;
322
- export interface ZodMiniCustom<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodCustomInternals<O, I>> {
323
- }
324
- export declare const ZodMiniCustom: core.$constructor<ZodMiniCustom>;
325
- export declare function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O>;
326
- export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodMiniCustom<O, I>;
327
- export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
328
- declare abstract class Class {
329
- constructor(..._args: any[]);
330
- }
331
- declare function _instanceof<T extends typeof Class>(cls: T, params?: core.$ZodCustomParams): ZodMiniCustom<InstanceType<T>, InstanceType<T>>;
332
- export { _instanceof as instanceof };
333
- export declare const stringbool: (_params?: string | core.$ZodStringBoolParams) => ZodMiniPipe<ZodMiniPipe<ZodMiniString, ZodMiniTransform<boolean, string>>, ZodMiniBoolean>;
334
- type _ZodMiniJSONSchema = ZodMiniUnion<[
335
- ZodMiniString,
336
- ZodMiniNumber,
337
- ZodMiniBoolean,
338
- ZodMiniNull,
339
- ZodMiniArray<ZodMiniJSONSchema>,
340
- ZodMiniRecord<ZodMiniString<string>, ZodMiniJSONSchema>
341
- ]>;
342
- type _ZodMiniJSONSchemaInternals = _ZodMiniJSONSchema["_zod"];
343
- export interface ZodMiniJSONSchemaInternals extends _ZodMiniJSONSchemaInternals {
344
- output: util.JSONType;
345
- input: util.JSONType;
346
- }
347
- export interface ZodMiniJSONSchema extends _ZodMiniJSONSchema {
348
- _zod: ZodMiniJSONSchemaInternals;
349
- }
350
- export declare function json(): ZodMiniJSONSchema;