@rspack/core 1.4.0-beta.1 → 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 (125) hide show
  1. package/README.md +1 -1
  2. package/dist/Module.d.ts +0 -1
  3. package/dist/builtin-loader/swc/pluginImport.d.ts +4 -26
  4. package/dist/builtin-loader/swc/types.d.ts +147 -2009
  5. package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +2 -1
  6. package/dist/config/normalization.d.ts +2 -1
  7. package/dist/config/types.d.ts +14 -3
  8. package/dist/config/utils.d.ts +3 -17
  9. package/dist/config/zod.d.ts +682 -4538
  10. package/dist/exports.d.ts +2 -1
  11. package/dist/index.js +3707 -1144
  12. package/dist/util/validate.d.ts +1 -1
  13. package/package.json +4 -4
  14. package/compiled/enhanced-resolve/CachedInputFileSystem.d.ts +0 -0
  15. package/compiled/enhanced-resolve/CachedInputFileSystem.js +0 -664
  16. package/compiled/enhanced-resolve/index.d.ts +0 -1124
  17. package/compiled/enhanced-resolve/license +0 -20
  18. package/compiled/enhanced-resolve/package.json +0 -1
  19. package/compiled/zod/dist/types/index.d.ts +0 -3
  20. package/compiled/zod/dist/types/v3/ZodError.d.ts +0 -164
  21. package/compiled/zod/dist/types/v3/benchmarks/datetime.d.ts +0 -5
  22. package/compiled/zod/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
  23. package/compiled/zod/dist/types/v3/benchmarks/index.d.ts +0 -1
  24. package/compiled/zod/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
  25. package/compiled/zod/dist/types/v3/benchmarks/object.d.ts +0 -5
  26. package/compiled/zod/dist/types/v3/benchmarks/primitives.d.ts +0 -5
  27. package/compiled/zod/dist/types/v3/benchmarks/realworld.d.ts +0 -5
  28. package/compiled/zod/dist/types/v3/benchmarks/string.d.ts +0 -5
  29. package/compiled/zod/dist/types/v3/benchmarks/union.d.ts +0 -5
  30. package/compiled/zod/dist/types/v3/errors.d.ts +0 -5
  31. package/compiled/zod/dist/types/v3/external.d.ts +0 -6
  32. package/compiled/zod/dist/types/v3/helpers/enumUtil.d.ts +0 -8
  33. package/compiled/zod/dist/types/v3/helpers/errorUtil.d.ts +0 -9
  34. package/compiled/zod/dist/types/v3/helpers/parseUtil.d.ts +0 -78
  35. package/compiled/zod/dist/types/v3/helpers/partialUtil.d.ts +0 -8
  36. package/compiled/zod/dist/types/v3/helpers/typeAliases.d.ts +0 -2
  37. package/compiled/zod/dist/types/v3/helpers/util.d.ts +0 -85
  38. package/compiled/zod/dist/types/v3/index.d.ts +0 -4
  39. package/compiled/zod/dist/types/v3/locales/en.d.ts +0 -3
  40. package/compiled/zod/dist/types/v3/standard-schema.d.ts +0 -102
  41. package/compiled/zod/dist/types/v3/tests/Mocker.d.ts +0 -17
  42. package/compiled/zod/dist/types/v3/types.d.ts +0 -1031
  43. package/compiled/zod/dist/types/v4/classic/checks.d.ts +0 -1
  44. package/compiled/zod/dist/types/v4/classic/coerce.d.ts +0 -17
  45. package/compiled/zod/dist/types/v4/classic/compat.d.ts +0 -48
  46. package/compiled/zod/dist/types/v4/classic/errors.d.ts +0 -30
  47. package/compiled/zod/dist/types/v4/classic/external.d.ts +0 -13
  48. package/compiled/zod/dist/types/v4/classic/index.d.ts +0 -4
  49. package/compiled/zod/dist/types/v4/classic/iso.d.ts +0 -22
  50. package/compiled/zod/dist/types/v4/classic/parse.d.ts +0 -23
  51. package/compiled/zod/dist/types/v4/classic/schemas.d.ts +0 -624
  52. package/compiled/zod/dist/types/v4/core/api.d.ts +0 -274
  53. package/compiled/zod/dist/types/v4/core/checks.d.ts +0 -277
  54. package/compiled/zod/dist/types/v4/core/config.d.ts +0 -9
  55. package/compiled/zod/dist/types/v4/core/core.d.ts +0 -47
  56. package/compiled/zod/dist/types/v4/core/doc.d.ts +0 -14
  57. package/compiled/zod/dist/types/v4/core/errors.d.ts +0 -204
  58. package/compiled/zod/dist/types/v4/core/function.d.ts +0 -52
  59. package/compiled/zod/dist/types/v4/core/index.d.ts +0 -15
  60. package/compiled/zod/dist/types/v4/core/json-schema.d.ts +0 -100
  61. package/compiled/zod/dist/types/v4/core/parse.d.ts +0 -25
  62. package/compiled/zod/dist/types/v4/core/regexes.d.ts +0 -62
  63. package/compiled/zod/dist/types/v4/core/registries.d.ts +0 -39
  64. package/compiled/zod/dist/types/v4/core/schemas.d.ts +0 -1005
  65. package/compiled/zod/dist/types/v4/core/standard-schema.d.ts +0 -55
  66. package/compiled/zod/dist/types/v4/core/to-json-schema.d.ts +0 -84
  67. package/compiled/zod/dist/types/v4/core/util.d.ts +0 -182
  68. package/compiled/zod/dist/types/v4/core/versions.d.ts +0 -5
  69. package/compiled/zod/dist/types/v4/core/zsf.d.ts +0 -91
  70. package/compiled/zod/dist/types/v4/index.d.ts +0 -3
  71. package/compiled/zod/dist/types/v4/locales/ar.d.ts +0 -4
  72. package/compiled/zod/dist/types/v4/locales/az.d.ts +0 -4
  73. package/compiled/zod/dist/types/v4/locales/be.d.ts +0 -4
  74. package/compiled/zod/dist/types/v4/locales/ca.d.ts +0 -4
  75. package/compiled/zod/dist/types/v4/locales/cs.d.ts +0 -4
  76. package/compiled/zod/dist/types/v4/locales/de.d.ts +0 -4
  77. package/compiled/zod/dist/types/v4/locales/en.d.ts +0 -5
  78. package/compiled/zod/dist/types/v4/locales/es.d.ts +0 -4
  79. package/compiled/zod/dist/types/v4/locales/fa.d.ts +0 -4
  80. package/compiled/zod/dist/types/v4/locales/fi.d.ts +0 -4
  81. package/compiled/zod/dist/types/v4/locales/fr-CA.d.ts +0 -4
  82. package/compiled/zod/dist/types/v4/locales/fr.d.ts +0 -4
  83. package/compiled/zod/dist/types/v4/locales/he.d.ts +0 -4
  84. package/compiled/zod/dist/types/v4/locales/hu.d.ts +0 -4
  85. package/compiled/zod/dist/types/v4/locales/id.d.ts +0 -4
  86. package/compiled/zod/dist/types/v4/locales/index.d.ts +0 -38
  87. package/compiled/zod/dist/types/v4/locales/it.d.ts +0 -4
  88. package/compiled/zod/dist/types/v4/locales/ja.d.ts +0 -4
  89. package/compiled/zod/dist/types/v4/locales/kh.d.ts +0 -4
  90. package/compiled/zod/dist/types/v4/locales/ko.d.ts +0 -4
  91. package/compiled/zod/dist/types/v4/locales/mk.d.ts +0 -4
  92. package/compiled/zod/dist/types/v4/locales/ms.d.ts +0 -4
  93. package/compiled/zod/dist/types/v4/locales/nl.d.ts +0 -4
  94. package/compiled/zod/dist/types/v4/locales/no.d.ts +0 -4
  95. package/compiled/zod/dist/types/v4/locales/ota.d.ts +0 -4
  96. package/compiled/zod/dist/types/v4/locales/pl.d.ts +0 -4
  97. package/compiled/zod/dist/types/v4/locales/ps.d.ts +0 -4
  98. package/compiled/zod/dist/types/v4/locales/pt.d.ts +0 -4
  99. package/compiled/zod/dist/types/v4/locales/ru.d.ts +0 -4
  100. package/compiled/zod/dist/types/v4/locales/sl.d.ts +0 -4
  101. package/compiled/zod/dist/types/v4/locales/sv.d.ts +0 -4
  102. package/compiled/zod/dist/types/v4/locales/ta.d.ts +0 -4
  103. package/compiled/zod/dist/types/v4/locales/th.d.ts +0 -4
  104. package/compiled/zod/dist/types/v4/locales/tr.d.ts +0 -5
  105. package/compiled/zod/dist/types/v4/locales/ua.d.ts +0 -4
  106. package/compiled/zod/dist/types/v4/locales/ur.d.ts +0 -4
  107. package/compiled/zod/dist/types/v4/locales/vi.d.ts +0 -4
  108. package/compiled/zod/dist/types/v4/locales/zh-CN.d.ts +0 -4
  109. package/compiled/zod/dist/types/v4/locales/zh-TW.d.ts +0 -4
  110. package/compiled/zod/dist/types/v4/mini/checks.d.ts +0 -1
  111. package/compiled/zod/dist/types/v4/mini/coerce.d.ts +0 -7
  112. package/compiled/zod/dist/types/v4/mini/external.d.ts +0 -11
  113. package/compiled/zod/dist/types/v4/mini/index.d.ts +0 -3
  114. package/compiled/zod/dist/types/v4/mini/iso.d.ts +0 -22
  115. package/compiled/zod/dist/types/v4/mini/parse.d.ts +0 -1
  116. package/compiled/zod/dist/types/v4/mini/schemas.d.ts +0 -350
  117. package/compiled/zod/index.js +0 -4513
  118. package/compiled/zod/license +0 -21
  119. package/compiled/zod/package.json +0 -1
  120. package/compiled/zod/v3/index.d.ts +0 -3
  121. package/compiled/zod/v4/core/index.d.ts +0 -1
  122. package/compiled/zod/v4/index.d.ts +0 -3
  123. package/compiled/zod/v4/locales/en.d.ts +0 -2
  124. package/compiled/zod/v4/locales/index.d.ts +0 -1
  125. package/compiled/zod/v4-mini/index.d.ts +0 -1
@@ -1,274 +0,0 @@
1
- import * as checks from "./checks.js";
2
- import type * as core from "./core.js";
3
- import type * as errors from "./errors.js";
4
- import * as schemas from "./schemas.js";
5
- import * as util from "./util.js";
6
- export type Params<T extends schemas.$ZodType | checks.$ZodCheck, IssueTypes extends errors.$ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = util.Flatten<Partial<util.EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
7
- error?: string | errors.$ZodErrorMap<IssueTypes> | undefined;
8
- /** @deprecated This parameter is deprecated. Use `error` instead. */
9
- message?: string | undefined;
10
- })>>>;
11
- export type TypeParams<T extends schemas.$ZodType = schemas.$ZodType & {
12
- _isst: never;
13
- }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
14
- export type CheckParams<T extends checks.$ZodCheck = checks.$ZodCheck, // & { _issc: never },
15
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
16
- export type StringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
17
- export type CheckStringFormatParams<T extends schemas.$ZodStringFormat = schemas.$ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
18
- export type CheckTypeParams<T extends schemas.$ZodType & checks.$ZodCheck = schemas.$ZodType & checks.$ZodCheck, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
19
- export type $ZodStringParams = TypeParams<schemas.$ZodString<string>, "coerce">;
20
- export declare function _string<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
21
- export declare function _coercedString<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
22
- export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail>;
23
- export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail>;
24
- export declare function _email<T extends schemas.$ZodEmail>(Class: util.SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;
25
- export type $ZodGUIDParams = StringFormatParams<schemas.$ZodGUID, "pattern">;
26
- export type $ZodCheckGUIDParams = CheckStringFormatParams<schemas.$ZodGUID, "pattern">;
27
- export declare function _guid<T extends schemas.$ZodGUID>(Class: util.SchemaClass<T>, params?: string | $ZodGUIDParams | $ZodCheckGUIDParams): T;
28
- export type $ZodUUIDParams = StringFormatParams<schemas.$ZodUUID, "pattern">;
29
- export type $ZodCheckUUIDParams = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
30
- export declare function _uuid<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDParams | $ZodCheckUUIDParams): T;
31
- export type $ZodUUIDv4Params = StringFormatParams<schemas.$ZodUUID, "pattern">;
32
- export type $ZodCheckUUIDv4Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
33
- export declare function _uuidv4<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv4Params | $ZodCheckUUIDv4Params): T;
34
- export type $ZodUUIDv6Params = StringFormatParams<schemas.$ZodUUID, "pattern">;
35
- export type $ZodCheckUUIDv6Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
36
- export declare function _uuidv6<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv6Params | $ZodCheckUUIDv6Params): T;
37
- export type $ZodUUIDv7Params = StringFormatParams<schemas.$ZodUUID, "pattern">;
38
- export type $ZodCheckUUIDv7Params = CheckStringFormatParams<schemas.$ZodUUID, "pattern">;
39
- export declare function _uuidv7<T extends schemas.$ZodUUID>(Class: util.SchemaClass<T>, params?: string | $ZodUUIDv7Params | $ZodCheckUUIDv7Params): T;
40
- export type $ZodURLParams = StringFormatParams<schemas.$ZodURL>;
41
- export type $ZodCheckURLParams = CheckStringFormatParams<schemas.$ZodURL>;
42
- export declare function _url<T extends schemas.$ZodURL>(Class: util.SchemaClass<T>, params?: string | $ZodURLParams | $ZodCheckURLParams): T;
43
- export type $ZodEmojiParams = StringFormatParams<schemas.$ZodEmoji>;
44
- export type $ZodCheckEmojiParams = CheckStringFormatParams<schemas.$ZodEmoji>;
45
- export declare function _emoji<T extends schemas.$ZodEmoji>(Class: util.SchemaClass<T>, params?: string | $ZodEmojiParams | $ZodCheckEmojiParams): T;
46
- export type $ZodNanoIDParams = StringFormatParams<schemas.$ZodNanoID>;
47
- export type $ZodCheckNanoIDParams = CheckStringFormatParams<schemas.$ZodNanoID>;
48
- export declare function _nanoid<T extends schemas.$ZodNanoID>(Class: util.SchemaClass<T>, params?: string | $ZodNanoIDParams | $ZodCheckNanoIDParams): T;
49
- export type $ZodCUIDParams = StringFormatParams<schemas.$ZodCUID>;
50
- export type $ZodCheckCUIDParams = CheckStringFormatParams<schemas.$ZodCUID>;
51
- export declare function _cuid<T extends schemas.$ZodCUID>(Class: util.SchemaClass<T>, params?: string | $ZodCUIDParams | $ZodCheckCUIDParams): T;
52
- export type $ZodCUID2Params = StringFormatParams<schemas.$ZodCUID2>;
53
- export type $ZodCheckCUID2Params = CheckStringFormatParams<schemas.$ZodCUID2>;
54
- export declare function _cuid2<T extends schemas.$ZodCUID2>(Class: util.SchemaClass<T>, params?: string | $ZodCUID2Params | $ZodCheckCUID2Params): T;
55
- export type $ZodULIDParams = StringFormatParams<schemas.$ZodULID>;
56
- export type $ZodCheckULIDParams = CheckStringFormatParams<schemas.$ZodULID>;
57
- export declare function _ulid<T extends schemas.$ZodULID>(Class: util.SchemaClass<T>, params?: string | $ZodULIDParams | $ZodCheckULIDParams): T;
58
- export type $ZodXIDParams = StringFormatParams<schemas.$ZodXID>;
59
- export type $ZodCheckXIDParams = CheckStringFormatParams<schemas.$ZodXID>;
60
- export declare function _xid<T extends schemas.$ZodXID>(Class: util.SchemaClass<T>, params?: string | $ZodXIDParams | $ZodCheckXIDParams): T;
61
- export type $ZodKSUIDParams = StringFormatParams<schemas.$ZodKSUID>;
62
- export type $ZodCheckKSUIDParams = CheckStringFormatParams<schemas.$ZodKSUID>;
63
- export declare function _ksuid<T extends schemas.$ZodKSUID>(Class: util.SchemaClass<T>, params?: string | $ZodKSUIDParams | $ZodCheckKSUIDParams): T;
64
- export type $ZodIPv4Params = StringFormatParams<schemas.$ZodIPv4, "pattern">;
65
- export type $ZodCheckIPv4Params = CheckStringFormatParams<schemas.$ZodIPv4, "pattern">;
66
- export declare function _ipv4<T extends schemas.$ZodIPv4>(Class: util.SchemaClass<T>, params?: string | $ZodIPv4Params | $ZodCheckIPv4Params): T;
67
- export type $ZodIPv6Params = StringFormatParams<schemas.$ZodIPv6, "pattern">;
68
- export type $ZodCheckIPv6Params = CheckStringFormatParams<schemas.$ZodIPv6, "pattern">;
69
- export declare function _ipv6<T extends schemas.$ZodIPv6>(Class: util.SchemaClass<T>, params?: string | $ZodIPv6Params | $ZodCheckIPv6Params): T;
70
- export type $ZodCIDRv4Params = StringFormatParams<schemas.$ZodCIDRv4, "pattern">;
71
- export type $ZodCheckCIDRv4Params = CheckStringFormatParams<schemas.$ZodCIDRv4, "pattern">;
72
- export declare function _cidrv4<T extends schemas.$ZodCIDRv4>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv4Params | $ZodCheckCIDRv4Params): T;
73
- export type $ZodCIDRv6Params = StringFormatParams<schemas.$ZodCIDRv6, "pattern">;
74
- export type $ZodCheckCIDRv6Params = CheckStringFormatParams<schemas.$ZodCIDRv6, "pattern">;
75
- export declare function _cidrv6<T extends schemas.$ZodCIDRv6>(Class: util.SchemaClass<T>, params?: string | $ZodCIDRv6Params | $ZodCheckCIDRv6Params): T;
76
- export type $ZodBase64Params = StringFormatParams<schemas.$ZodBase64, "pattern">;
77
- export type $ZodCheckBase64Params = CheckStringFormatParams<schemas.$ZodBase64, "pattern">;
78
- export declare function _base64<T extends schemas.$ZodBase64>(Class: util.SchemaClass<T>, params?: string | $ZodBase64Params | $ZodCheckBase64Params): T;
79
- export type $ZodBase64URLParams = StringFormatParams<schemas.$ZodBase64URL, "pattern">;
80
- export type $ZodCheckBase64URLParams = CheckStringFormatParams<schemas.$ZodBase64URL, "pattern">;
81
- export declare function _base64url<T extends schemas.$ZodBase64URL>(Class: util.SchemaClass<T>, params?: string | $ZodBase64URLParams | $ZodCheckBase64URLParams): T;
82
- export type $ZodE164Params = StringFormatParams<schemas.$ZodE164>;
83
- export type $ZodCheckE164Params = CheckStringFormatParams<schemas.$ZodE164>;
84
- export declare function _e164<T extends schemas.$ZodE164>(Class: util.SchemaClass<T>, params?: string | $ZodE164Params | $ZodCheckE164Params): T;
85
- export type $ZodJWTParams = StringFormatParams<schemas.$ZodJWT, "pattern">;
86
- export type $ZodCheckJWTParams = CheckStringFormatParams<schemas.$ZodJWT, "pattern">;
87
- export declare function _jwt<T extends schemas.$ZodJWT>(Class: util.SchemaClass<T>, params?: string | $ZodJWTParams | $ZodCheckJWTParams): T;
88
- export type $ZodISODateTimeParams = StringFormatParams<schemas.$ZodISODateTime, "pattern">;
89
- export type $ZodCheckISODateTimeParams = CheckStringFormatParams<schemas.$ZodISODateTime, "pattern">;
90
- export declare function _isoDateTime<T extends schemas.$ZodISODateTime>(Class: util.SchemaClass<T>, params?: string | $ZodISODateTimeParams | $ZodCheckISODateTimeParams): T;
91
- export type $ZodISODateParams = StringFormatParams<schemas.$ZodISODate, "pattern">;
92
- export type $ZodCheckISODateParams = CheckStringFormatParams<schemas.$ZodISODate, "pattern">;
93
- export declare function _isoDate<T extends schemas.$ZodISODate>(Class: util.SchemaClass<T>, params?: string | $ZodISODateParams | $ZodCheckISODateParams): T;
94
- export type $ZodISOTimeParams = StringFormatParams<schemas.$ZodISOTime, "pattern">;
95
- export type $ZodCheckISOTimeParams = CheckStringFormatParams<schemas.$ZodISOTime, "pattern">;
96
- export declare function _isoTime<T extends schemas.$ZodISOTime>(Class: util.SchemaClass<T>, params?: string | $ZodISOTimeParams | $ZodCheckISOTimeParams): T;
97
- export type $ZodISODurationParams = StringFormatParams<schemas.$ZodISODuration>;
98
- export type $ZodCheckISODurationParams = CheckStringFormatParams<schemas.$ZodISODuration>;
99
- export declare function _isoDuration<T extends schemas.$ZodISODuration>(Class: util.SchemaClass<T>, params?: string | $ZodISODurationParams | $ZodCheckISODurationParams): T;
100
- export type $ZodNumberParams = TypeParams<schemas.$ZodNumber<number>, "coerce">;
101
- export type $ZodNumberFormatParams = CheckTypeParams<schemas.$ZodNumberFormat, "format" | "coerce">;
102
- export type $ZodCheckNumberFormatParams = CheckParams<checks.$ZodCheckNumberFormat, "format">;
103
- export declare function _number<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
104
- export declare function _coercedNumber<T extends schemas.$ZodNumber>(Class: util.SchemaClass<T>, params?: string | $ZodNumberParams): T;
105
- export declare function _int<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
106
- export declare function _float32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
107
- export declare function _float64<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
108
- export declare function _int32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
109
- export declare function _uint32<T extends schemas.$ZodNumberFormat>(Class: util.SchemaClass<T>, params?: string | $ZodCheckNumberFormatParams): T;
110
- export type $ZodBooleanParams = TypeParams<schemas.$ZodBoolean<boolean>, "coerce">;
111
- export declare function _boolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;
112
- export declare function _coercedBoolean<T extends schemas.$ZodBoolean>(Class: util.SchemaClass<T>, params?: string | $ZodBooleanParams): T;
113
- export type $ZodBigIntParams = TypeParams<schemas.$ZodBigInt<bigint>>;
114
- export type $ZodBigIntFormatParams = CheckTypeParams<schemas.$ZodBigIntFormat, "format" | "coerce">;
115
- export type $ZodCheckBigIntFormatParams = CheckParams<checks.$ZodCheckBigIntFormat, "format">;
116
- export declare function _bigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
117
- export declare function _coercedBigint<T extends schemas.$ZodBigInt>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntParams): T;
118
- export declare function _int64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
119
- export declare function _uint64<T extends schemas.$ZodBigIntFormat>(Class: util.SchemaClass<T>, params?: string | $ZodBigIntFormatParams): T;
120
- export type $ZodSymbolParams = TypeParams<schemas.$ZodSymbol>;
121
- export declare function _symbol<T extends schemas.$ZodSymbol>(Class: util.SchemaClass<T>, params?: string | $ZodSymbolParams): T;
122
- export type $ZodUndefinedParams = TypeParams<schemas.$ZodUndefined>;
123
- export declare function _undefined<T extends schemas.$ZodUndefined>(Class: util.SchemaClass<T>, params?: string | $ZodUndefinedParams): T;
124
- export type $ZodNullParams = TypeParams<schemas.$ZodNull>;
125
- export declare function _null<T extends schemas.$ZodNull>(Class: util.SchemaClass<T>, params?: string | $ZodNullParams): T;
126
- export type $ZodAnyParams = TypeParams<schemas.$ZodAny>;
127
- export declare function _any<T extends schemas.$ZodAny>(Class: util.SchemaClass<T>): T;
128
- export type $ZodUnknownParams = TypeParams<schemas.$ZodUnknown>;
129
- export declare function _unknown<T extends schemas.$ZodUnknown>(Class: util.SchemaClass<T>): T;
130
- export type $ZodNeverParams = TypeParams<schemas.$ZodNever>;
131
- export declare function _never<T extends schemas.$ZodNever>(Class: util.SchemaClass<T>, params?: string | $ZodNeverParams): T;
132
- export type $ZodVoidParams = TypeParams<schemas.$ZodVoid>;
133
- export declare function _void<T extends schemas.$ZodVoid>(Class: util.SchemaClass<T>, params?: string | $ZodVoidParams): T;
134
- export type $ZodDateParams = TypeParams<schemas.$ZodDate, "coerce">;
135
- export declare function _date<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;
136
- export declare function _coercedDate<T extends schemas.$ZodDate>(Class: util.SchemaClass<T>, params?: string | $ZodDateParams): T;
137
- export type $ZodNaNParams = TypeParams<schemas.$ZodNaN>;
138
- export declare function _nan<T extends schemas.$ZodNaN>(Class: util.SchemaClass<T>, params?: string | $ZodNaNParams): T;
139
- export type $ZodCheckLessThanParams = CheckParams<checks.$ZodCheckLessThan, "inclusive" | "value">;
140
- export declare function _lt(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;
141
- export declare function _lte(value: util.Numeric, params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan<util.Numeric>;
142
- export {
143
- /** @deprecated Use `z.lte()` instead. */
144
- _lte as _max, };
145
- export type $ZodCheckGreaterThanParams = CheckParams<checks.$ZodCheckGreaterThan, "inclusive" | "value">;
146
- export declare function _gt(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
147
- export declare function _gte(value: util.Numeric, params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
148
- export {
149
- /** @deprecated Use `z.gte()` instead. */
150
- _gte as _min, };
151
- export declare function _positive(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
152
- export declare function _negative(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;
153
- export declare function _nonpositive(params?: string | $ZodCheckLessThanParams): checks.$ZodCheckLessThan;
154
- export declare function _nonnegative(params?: string | $ZodCheckGreaterThanParams): checks.$ZodCheckGreaterThan;
155
- export type $ZodCheckMultipleOfParams = CheckParams<checks.$ZodCheckMultipleOf, "value">;
156
- export declare function _multipleOf(value: number | bigint, params?: string | $ZodCheckMultipleOfParams): checks.$ZodCheckMultipleOf;
157
- export type $ZodCheckMaxSizeParams = CheckParams<checks.$ZodCheckMaxSize, "maximum">;
158
- export declare function _maxSize(maximum: number, params?: string | $ZodCheckMaxSizeParams): checks.$ZodCheckMaxSize<util.HasSize>;
159
- export type $ZodCheckMinSizeParams = CheckParams<checks.$ZodCheckMinSize, "minimum">;
160
- export declare function _minSize(minimum: number, params?: string | $ZodCheckMinSizeParams): checks.$ZodCheckMinSize<util.HasSize>;
161
- export type $ZodCheckSizeEqualsParams = CheckParams<checks.$ZodCheckSizeEquals, "size">;
162
- export declare function _size(size: number, params?: string | $ZodCheckSizeEqualsParams): checks.$ZodCheckSizeEquals<util.HasSize>;
163
- export type $ZodCheckMaxLengthParams = CheckParams<checks.$ZodCheckMaxLength, "maximum">;
164
- export declare function _maxLength(maximum: number, params?: string | $ZodCheckMaxLengthParams): checks.$ZodCheckMaxLength<util.HasLength>;
165
- export type $ZodCheckMinLengthParams = CheckParams<checks.$ZodCheckMinLength, "minimum">;
166
- export declare function _minLength(minimum: number, params?: string | $ZodCheckMinLengthParams): checks.$ZodCheckMinLength<util.HasLength>;
167
- export type $ZodCheckLengthEqualsParams = CheckParams<checks.$ZodCheckLengthEquals, "length">;
168
- export declare function _length(length: number, params?: string | $ZodCheckLengthEqualsParams): checks.$ZodCheckLengthEquals<util.HasLength>;
169
- export type $ZodCheckRegexParams = CheckParams<checks.$ZodCheckRegex, "format" | "pattern">;
170
- export declare function _regex(pattern: RegExp, params?: string | $ZodCheckRegexParams): checks.$ZodCheckRegex;
171
- export type $ZodCheckLowerCaseParams = CheckParams<checks.$ZodCheckLowerCase, "format">;
172
- export declare function _lowercase(params?: string | $ZodCheckLowerCaseParams): checks.$ZodCheckLowerCase;
173
- export type $ZodCheckUpperCaseParams = CheckParams<checks.$ZodCheckUpperCase, "format">;
174
- export declare function _uppercase(params?: string | $ZodCheckUpperCaseParams): checks.$ZodCheckUpperCase;
175
- export type $ZodCheckIncludesParams = CheckParams<checks.$ZodCheckIncludes, "includes" | "format" | "pattern">;
176
- export declare function _includes(includes: string, params?: string | $ZodCheckIncludesParams): checks.$ZodCheckIncludes;
177
- export type $ZodCheckStartsWithParams = CheckParams<checks.$ZodCheckStartsWith, "prefix" | "format" | "pattern">;
178
- export declare function _startsWith(prefix: string, params?: string | $ZodCheckStartsWithParams): checks.$ZodCheckStartsWith;
179
- export type $ZodCheckEndsWithParams = CheckParams<checks.$ZodCheckEndsWith, "suffix" | "format" | "pattern">;
180
- export declare function _endsWith(suffix: string, params?: string | $ZodCheckEndsWithParams): checks.$ZodCheckEndsWith;
181
- export type $ZodCheckPropertyParams = CheckParams<checks.$ZodCheckProperty, "property" | "schema">;
182
- export declare function _property<K extends string, T extends schemas.$ZodType>(property: K, schema: T, params?: string | $ZodCheckPropertyParams): checks.$ZodCheckProperty<{
183
- [k in K]: core.output<T>;
184
- }>;
185
- export type $ZodCheckMimeTypeParams = CheckParams<checks.$ZodCheckMimeType, "mime">;
186
- export declare function _mime(types: util.MimeTypes[], params?: string | $ZodCheckMimeTypeParams): checks.$ZodCheckMimeType;
187
- export declare function _overwrite<T>(tx: (input: T) => T): checks.$ZodCheckOverwrite<T>;
188
- export declare function _normalize(form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})): checks.$ZodCheckOverwrite<string>;
189
- export declare function _trim(): checks.$ZodCheckOverwrite<string>;
190
- export declare function _toLowerCase(): checks.$ZodCheckOverwrite<string>;
191
- export declare function _toUpperCase(): checks.$ZodCheckOverwrite<string>;
192
- export type $ZodArrayParams = TypeParams<schemas.$ZodArray, "element">;
193
- export declare function _array<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodArray>, element: T, params?: string | $ZodArrayParams): schemas.$ZodArray<T>;
194
- export type $ZodObjectParams = TypeParams<schemas.$ZodObject, "shape" | "catchall">;
195
- export type $ZodUnionParams = TypeParams<schemas.$ZodUnion, "options">;
196
- export declare function _union<const T extends readonly schemas.$ZodObject[]>(Class: util.SchemaClass<schemas.$ZodUnion>, options: T, params?: string | $ZodUnionParams): schemas.$ZodUnion<T>;
197
- export interface $ZodTypeDiscriminableInternals extends schemas.$ZodTypeInternals {
198
- propValues: util.PropValues;
199
- }
200
- export interface $ZodTypeDiscriminable extends schemas.$ZodType {
201
- _zod: $ZodTypeDiscriminableInternals;
202
- }
203
- export type $ZodDiscriminatedUnionParams = TypeParams<schemas.$ZodDiscriminatedUnion, "options" | "discriminator">;
204
- export declare function _discriminatedUnion<Types extends [$ZodTypeDiscriminable, ...$ZodTypeDiscriminable[]]>(Class: util.SchemaClass<schemas.$ZodDiscriminatedUnion>, discriminator: string, options: Types, params?: string | $ZodDiscriminatedUnionParams): schemas.$ZodDiscriminatedUnion<Types>;
205
- export type $ZodIntersectionParams = TypeParams<schemas.$ZodIntersection, "left" | "right">;
206
- export declare function _intersection<T extends schemas.$ZodObject, U extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodIntersection>, left: T, right: U): schemas.$ZodIntersection<T, U>;
207
- export type $ZodTupleParams = TypeParams<schemas.$ZodTuple, "items" | "rest">;
208
- export declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]]>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, null>;
209
- export declare function _tuple<T extends readonly [schemas.$ZodType, ...schemas.$ZodType[]], Rest extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodTuple>, items: T, rest: Rest, params?: string | $ZodTupleParams): schemas.$ZodTuple<T, Rest>;
210
- export type $ZodRecordParams = TypeParams<schemas.$ZodRecord, "keyType" | "valueType">;
211
- export declare function _record<Key extends schemas.$ZodRecordKey, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodRecord>, keyType: Key, valueType: Value, params?: string | $ZodRecordParams): schemas.$ZodRecord<Key, Value>;
212
- export type $ZodMapParams = TypeParams<schemas.$ZodMap, "keyType" | "valueType">;
213
- export declare function _map<Key extends schemas.$ZodObject, Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodMap>, keyType: Key, valueType: Value, params?: string | $ZodMapParams): schemas.$ZodMap<Key, Value>;
214
- export type $ZodSetParams = TypeParams<schemas.$ZodSet, "valueType">;
215
- export declare function _set<Value extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSet>, valueType: Value, params?: string | $ZodSetParams): schemas.$ZodSet<Value>;
216
- export type $ZodEnumParams = TypeParams<schemas.$ZodEnum, "entries">;
217
- export declare function _enum<const T extends string[]>(Class: util.SchemaClass<schemas.$ZodEnum>, values: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<util.ToEnum<T[number]>>;
218
- export declare function _enum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;
219
- /** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.
220
- *
221
- * ```ts
222
- * enum Colors { red, green, blue }
223
- * z.enum(Colors);
224
- * ```
225
- */
226
- export declare function _nativeEnum<T extends util.EnumLike>(Class: util.SchemaClass<schemas.$ZodEnum>, entries: T, params?: string | $ZodEnumParams): schemas.$ZodEnum<T>;
227
- export type $ZodLiteralParams = TypeParams<schemas.$ZodLiteral, "values">;
228
- export declare function _literal<const T extends Array<util.Literal>>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T[number]>;
229
- export declare function _literal<const T extends util.Literal>(Class: util.SchemaClass<schemas.$ZodLiteral>, value: T, params?: string | $ZodLiteralParams): schemas.$ZodLiteral<T>;
230
- export type $ZodFileParams = TypeParams<schemas.$ZodFile>;
231
- export declare function _file(Class: util.SchemaClass<schemas.$ZodFile>, params?: string | $ZodFileParams): schemas.$ZodFile;
232
- export type $ZodTransformParams = TypeParams<schemas.$ZodTransform, "transform">;
233
- export declare function _transform<I = unknown, O = I>(Class: util.SchemaClass<schemas.$ZodTransform>, fn: (input: I, ctx?: schemas.ParsePayload) => O): schemas.$ZodTransform<Awaited<O>, I>;
234
- export type $ZodOptionalParams = TypeParams<schemas.$ZodOptional, "innerType">;
235
- export declare function _optional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodOptional>, innerType: T): schemas.$ZodOptional<T>;
236
- export type $ZodNullableParams = TypeParams<schemas.$ZodNullable, "innerType">;
237
- export declare function _nullable<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNullable>, innerType: T): schemas.$ZodNullable<T>;
238
- export type $ZodDefaultParams = TypeParams<schemas.$ZodDefault, "innerType" | "defaultValue">;
239
- export declare function _default<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodDefault>, innerType: T, defaultValue: util.NoUndefined<core.output<T>> | (() => util.NoUndefined<core.output<T>>)): schemas.$ZodDefault<T>;
240
- export type $ZodNonOptionalParams = TypeParams<schemas.$ZodNonOptional, "innerType">;
241
- export declare function _nonoptional<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodNonOptional>, innerType: T, params?: string | $ZodNonOptionalParams): schemas.$ZodNonOptional<T>;
242
- export type $ZodSuccessParams = TypeParams<schemas.$ZodSuccess, "innerType">;
243
- export declare function _success<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodSuccess>, innerType: T): schemas.$ZodSuccess<T>;
244
- export type $ZodCatchParams = TypeParams<schemas.$ZodCatch, "innerType" | "catchValue">;
245
- export declare function _catch<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodCatch>, innerType: T, catchValue: core.output<T> | ((ctx: schemas.$ZodCatchCtx) => core.output<T>)): schemas.$ZodCatch<T>;
246
- export type $ZodPipeParams = TypeParams<schemas.$ZodPipe, "in" | "out">;
247
- export declare function _pipe<const A extends schemas.$ZodType, B extends schemas.$ZodType<unknown, core.output<A>> = schemas.$ZodType<unknown, core.output<A>>>(Class: util.SchemaClass<schemas.$ZodPipe>, in_: A, out: B | schemas.$ZodType<unknown, core.output<A>>): schemas.$ZodPipe<A, B>;
248
- export type $ZodReadonlyParams = TypeParams<schemas.$ZodReadonly, "innerType">;
249
- export declare function _readonly<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodReadonly>, innerType: T): schemas.$ZodReadonly<T>;
250
- export type $ZodTemplateLiteralParams = TypeParams<schemas.$ZodTemplateLiteral, "parts">;
251
- export declare function _templateLiteral<const Parts extends schemas.$ZodTemplateLiteralPart[]>(Class: util.SchemaClass<schemas.$ZodTemplateLiteral>, parts: Parts, params?: string | $ZodTemplateLiteralParams): schemas.$ZodTemplateLiteral<schemas.$PartsToTemplateLiteral<Parts>>;
252
- export type $ZodLazyParams = TypeParams<schemas.$ZodLazy, "getter">;
253
- export declare function _lazy<T extends schemas.$ZodType>(Class: util.SchemaClass<schemas.$ZodLazy>, getter: () => T): schemas.$ZodLazy<T>;
254
- export type $ZodPromiseParams = TypeParams<schemas.$ZodPromise, "innerType">;
255
- export declare function _promise<T extends schemas.$ZodObject>(Class: util.SchemaClass<schemas.$ZodPromise>, innerType: T): schemas.$ZodPromise<T>;
256
- export type $ZodCustomParams = CheckTypeParams<schemas.$ZodCustom, "fn">;
257
- export declare function _custom<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
258
- export declare function _refine<O = unknown, I = O>(Class: util.SchemaClass<schemas.$ZodCustom>, fn: (data: O) => unknown, _params: string | $ZodCustomParams | undefined): schemas.$ZodCustom<O, I>;
259
- export interface $ZodStringBoolParams extends TypeParams {
260
- truthy?: string[];
261
- falsy?: string[];
262
- /**
263
- * Options: `"sensitive"`, `"insensitive"`
264
- *
265
- * @default `"insensitive"`
266
- */
267
- case?: "sensitive" | "insensitive" | undefined;
268
- }
269
- export declare function _stringbool(Classes: {
270
- Pipe?: typeof schemas.$ZodPipe;
271
- Boolean?: typeof schemas.$ZodBoolean;
272
- Transform?: typeof schemas.$ZodTransform;
273
- String?: typeof schemas.$ZodString;
274
- }, _params?: string | $ZodStringBoolParams): schemas.$ZodPipe<schemas.$ZodPipe<schemas.$ZodString, schemas.$ZodTransform<boolean, string>>, schemas.$ZodBoolean<boolean>>;
@@ -1,277 +0,0 @@
1
- import * as core from "./core.js";
2
- import type * as errors from "./errors.js";
3
- import type * as schemas from "./schemas.js";
4
- import * as util from "./util.js";
5
- export interface $ZodCheckDef {
6
- check: string;
7
- error?: errors.$ZodErrorMap<never> | undefined;
8
- /** If true, no later checks will be executed if this check fails. Default `false`. */
9
- abort?: boolean | undefined;
10
- }
11
- export interface $ZodCheckInternals<T> {
12
- def: $ZodCheckDef;
13
- /** The set of issues this check might throw. */
14
- issc?: errors.$ZodIssueBase;
15
- check(payload: schemas.ParsePayload<T>): util.MaybeAsync<void>;
16
- onattach: ((schema: schemas.$ZodType) => void)[];
17
- when?: ((payload: schemas.ParsePayload) => boolean) | undefined;
18
- }
19
- export interface $ZodCheck<in T = never> {
20
- _zod: $ZodCheckInternals<T>;
21
- }
22
- export declare const $ZodCheck: core.$constructor<$ZodCheck<any>>;
23
- export interface $ZodCheckLessThanDef extends $ZodCheckDef {
24
- check: "less_than";
25
- value: util.Numeric;
26
- inclusive: boolean;
27
- }
28
- export interface $ZodCheckLessThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
29
- def: $ZodCheckLessThanDef;
30
- issc: errors.$ZodIssueTooBig<T>;
31
- }
32
- export interface $ZodCheckLessThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
33
- _zod: $ZodCheckLessThanInternals<T>;
34
- }
35
- export declare const $ZodCheckLessThan: core.$constructor<$ZodCheckLessThan>;
36
- export interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
37
- check: "greater_than";
38
- value: util.Numeric;
39
- inclusive: boolean;
40
- }
41
- export interface $ZodCheckGreaterThanInternals<T extends util.Numeric = util.Numeric> extends $ZodCheckInternals<T> {
42
- def: $ZodCheckGreaterThanDef;
43
- issc: errors.$ZodIssueTooSmall<T>;
44
- }
45
- export interface $ZodCheckGreaterThan<T extends util.Numeric = util.Numeric> extends $ZodCheck<T> {
46
- _zod: $ZodCheckGreaterThanInternals<T>;
47
- }
48
- export declare const $ZodCheckGreaterThan: core.$constructor<$ZodCheckGreaterThan>;
49
- export interface $ZodCheckMultipleOfDef<T extends number | bigint = number | bigint> extends $ZodCheckDef {
50
- check: "multiple_of";
51
- value: T;
52
- }
53
- export interface $ZodCheckMultipleOfInternals<T extends number | bigint = number | bigint> extends $ZodCheckInternals<T> {
54
- def: $ZodCheckMultipleOfDef<T>;
55
- issc: errors.$ZodIssueNotMultipleOf;
56
- }
57
- export interface $ZodCheckMultipleOf<T extends number | bigint = number | bigint> extends $ZodCheck<T> {
58
- _zod: $ZodCheckMultipleOfInternals<T>;
59
- }
60
- export declare const $ZodCheckMultipleOf: core.$constructor<$ZodCheckMultipleOf<number | bigint>>;
61
- export type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
62
- export interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
63
- check: "number_format";
64
- format: $ZodNumberFormats;
65
- }
66
- export interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
67
- def: $ZodCheckNumberFormatDef;
68
- issc: errors.$ZodIssueInvalidType | errors.$ZodIssueTooBig<"number"> | errors.$ZodIssueTooSmall<"number">;
69
- }
70
- export interface $ZodCheckNumberFormat extends $ZodCheck<number> {
71
- _zod: $ZodCheckNumberFormatInternals;
72
- }
73
- export declare const $ZodCheckNumberFormat: core.$constructor<$ZodCheckNumberFormat>;
74
- export type $ZodBigIntFormats = "int64" | "uint64";
75
- export interface $ZodCheckBigIntFormatDef extends $ZodCheckDef {
76
- check: "bigint_format";
77
- format: $ZodBigIntFormats | undefined;
78
- }
79
- export interface $ZodCheckBigIntFormatInternals extends $ZodCheckInternals<bigint> {
80
- def: $ZodCheckBigIntFormatDef;
81
- issc: errors.$ZodIssueTooBig<"bigint"> | errors.$ZodIssueTooSmall<"bigint">;
82
- }
83
- export interface $ZodCheckBigIntFormat extends $ZodCheck<bigint> {
84
- _zod: $ZodCheckBigIntFormatInternals;
85
- }
86
- export declare const $ZodCheckBigIntFormat: core.$constructor<$ZodCheckBigIntFormat>;
87
- export interface $ZodCheckMaxSizeDef extends $ZodCheckDef {
88
- check: "max_size";
89
- maximum: number;
90
- }
91
- export interface $ZodCheckMaxSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
92
- def: $ZodCheckMaxSizeDef;
93
- issc: errors.$ZodIssueTooBig<T>;
94
- }
95
- export interface $ZodCheckMaxSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
96
- _zod: $ZodCheckMaxSizeInternals<T>;
97
- }
98
- export declare const $ZodCheckMaxSize: core.$constructor<$ZodCheckMaxSize>;
99
- export interface $ZodCheckMinSizeDef extends $ZodCheckDef {
100
- check: "min_size";
101
- minimum: number;
102
- }
103
- export interface $ZodCheckMinSizeInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
104
- def: $ZodCheckMinSizeDef;
105
- issc: errors.$ZodIssueTooSmall<T>;
106
- }
107
- export interface $ZodCheckMinSize<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
108
- _zod: $ZodCheckMinSizeInternals<T>;
109
- }
110
- export declare const $ZodCheckMinSize: core.$constructor<$ZodCheckMinSize>;
111
- export interface $ZodCheckSizeEqualsDef extends $ZodCheckDef {
112
- check: "size_equals";
113
- size: number;
114
- }
115
- export interface $ZodCheckSizeEqualsInternals<T extends util.HasSize = util.HasSize> extends $ZodCheckInternals<T> {
116
- def: $ZodCheckSizeEqualsDef;
117
- issc: errors.$ZodIssueTooBig<T> | errors.$ZodIssueTooSmall<T>;
118
- }
119
- export interface $ZodCheckSizeEquals<T extends util.HasSize = util.HasSize> extends $ZodCheck<T> {
120
- _zod: $ZodCheckSizeEqualsInternals<T>;
121
- }
122
- export declare const $ZodCheckSizeEquals: core.$constructor<$ZodCheckSizeEquals>;
123
- export interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
124
- check: "max_length";
125
- maximum: number;
126
- }
127
- export interface $ZodCheckMaxLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
128
- def: $ZodCheckMaxLengthDef;
129
- issc: errors.$ZodIssueTooBig<T>;
130
- }
131
- export interface $ZodCheckMaxLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
132
- _zod: $ZodCheckMaxLengthInternals<T>;
133
- }
134
- export declare const $ZodCheckMaxLength: core.$constructor<$ZodCheckMaxLength>;
135
- export interface $ZodCheckMinLengthDef extends $ZodCheckDef {
136
- check: "min_length";
137
- minimum: number;
138
- }
139
- export interface $ZodCheckMinLengthInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
140
- def: $ZodCheckMinLengthDef;
141
- issc: errors.$ZodIssueTooSmall<T>;
142
- }
143
- export interface $ZodCheckMinLength<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
144
- _zod: $ZodCheckMinLengthInternals<T>;
145
- }
146
- export declare const $ZodCheckMinLength: core.$constructor<$ZodCheckMinLength>;
147
- export interface $ZodCheckLengthEqualsDef extends $ZodCheckDef {
148
- check: "length_equals";
149
- length: number;
150
- }
151
- export interface $ZodCheckLengthEqualsInternals<T extends util.HasLength = util.HasLength> extends $ZodCheckInternals<T> {
152
- def: $ZodCheckLengthEqualsDef;
153
- issc: errors.$ZodIssueTooBig<T> | errors.$ZodIssueTooSmall<T>;
154
- }
155
- export interface $ZodCheckLengthEquals<T extends util.HasLength = util.HasLength> extends $ZodCheck<T> {
156
- _zod: $ZodCheckLengthEqualsInternals<T>;
157
- }
158
- export declare const $ZodCheckLengthEquals: core.$constructor<$ZodCheckLengthEquals>;
159
- export type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
160
- export interface $ZodCheckStringFormatDef<Format extends $ZodStringFormats = $ZodStringFormats> extends $ZodCheckDef {
161
- check: "string_format";
162
- format: Format;
163
- pattern?: RegExp | undefined;
164
- }
165
- export interface $ZodCheckStringFormatInternals extends $ZodCheckInternals<string> {
166
- def: $ZodCheckStringFormatDef;
167
- issc: errors.$ZodIssueInvalidStringFormat;
168
- }
169
- export interface $ZodCheckStringFormat extends $ZodCheck<string> {
170
- _zod: $ZodCheckStringFormatInternals;
171
- }
172
- export declare const $ZodCheckStringFormat: core.$constructor<$ZodCheckStringFormat>;
173
- export interface $ZodCheckRegexDef extends $ZodCheckStringFormatDef {
174
- format: "regex";
175
- pattern: RegExp;
176
- }
177
- export interface $ZodCheckRegexInternals extends $ZodCheckInternals<string> {
178
- def: $ZodCheckRegexDef;
179
- issc: errors.$ZodIssueInvalidStringFormat;
180
- }
181
- export interface $ZodCheckRegex extends $ZodCheck<string> {
182
- _zod: $ZodCheckRegexInternals;
183
- }
184
- export declare const $ZodCheckRegex: core.$constructor<$ZodCheckRegex>;
185
- export interface $ZodCheckLowerCaseDef extends $ZodCheckStringFormatDef<"lowercase"> {
186
- }
187
- export interface $ZodCheckLowerCaseInternals extends $ZodCheckInternals<string> {
188
- def: $ZodCheckLowerCaseDef;
189
- issc: errors.$ZodIssueInvalidStringFormat;
190
- }
191
- export interface $ZodCheckLowerCase extends $ZodCheck<string> {
192
- _zod: $ZodCheckLowerCaseInternals;
193
- }
194
- export declare const $ZodCheckLowerCase: core.$constructor<$ZodCheckLowerCase>;
195
- export interface $ZodCheckUpperCaseDef extends $ZodCheckStringFormatDef<"uppercase"> {
196
- }
197
- export interface $ZodCheckUpperCaseInternals extends $ZodCheckInternals<string> {
198
- def: $ZodCheckUpperCaseDef;
199
- issc: errors.$ZodIssueInvalidStringFormat;
200
- }
201
- export interface $ZodCheckUpperCase extends $ZodCheck<string> {
202
- _zod: $ZodCheckUpperCaseInternals;
203
- }
204
- export declare const $ZodCheckUpperCase: core.$constructor<$ZodCheckUpperCase>;
205
- export interface $ZodCheckIncludesDef extends $ZodCheckStringFormatDef<"includes"> {
206
- includes: string;
207
- position?: number | undefined;
208
- }
209
- export interface $ZodCheckIncludesInternals extends $ZodCheckInternals<string> {
210
- def: $ZodCheckIncludesDef;
211
- issc: errors.$ZodIssueInvalidStringFormat;
212
- }
213
- export interface $ZodCheckIncludes extends $ZodCheck<string> {
214
- _zod: $ZodCheckIncludesInternals;
215
- }
216
- export declare const $ZodCheckIncludes: core.$constructor<$ZodCheckIncludes>;
217
- export interface $ZodCheckStartsWithDef extends $ZodCheckStringFormatDef<"starts_with"> {
218
- prefix: string;
219
- }
220
- export interface $ZodCheckStartsWithInternals extends $ZodCheckInternals<string> {
221
- def: $ZodCheckStartsWithDef;
222
- issc: errors.$ZodIssueInvalidStringFormat;
223
- }
224
- export interface $ZodCheckStartsWith extends $ZodCheck<string> {
225
- _zod: $ZodCheckStartsWithInternals;
226
- }
227
- export declare const $ZodCheckStartsWith: core.$constructor<$ZodCheckStartsWith>;
228
- export interface $ZodCheckEndsWithDef extends $ZodCheckStringFormatDef<"ends_with"> {
229
- suffix: string;
230
- }
231
- export interface $ZodCheckEndsWithInternals extends $ZodCheckInternals<string> {
232
- def: $ZodCheckEndsWithDef;
233
- issc: errors.$ZodIssueInvalidStringFormat;
234
- }
235
- export interface $ZodCheckEndsWith extends $ZodCheckInternals<string> {
236
- _zod: $ZodCheckEndsWithInternals;
237
- }
238
- export declare const $ZodCheckEndsWith: core.$constructor<$ZodCheckEndsWith>;
239
- export interface $ZodCheckPropertyDef extends $ZodCheckDef {
240
- check: "property";
241
- property: string;
242
- schema: schemas.$ZodType;
243
- }
244
- export interface $ZodCheckPropertyInternals<T extends object = object> extends $ZodCheckInternals<T> {
245
- def: $ZodCheckPropertyDef;
246
- issc: errors.$ZodIssue;
247
- }
248
- export interface $ZodCheckProperty<T extends object = object> extends $ZodCheck<T> {
249
- _zod: $ZodCheckPropertyInternals<T>;
250
- }
251
- export declare const $ZodCheckProperty: core.$constructor<$ZodCheckProperty>;
252
- export interface $ZodCheckMimeTypeDef extends $ZodCheckDef {
253
- check: "mime_type";
254
- mime: util.MimeTypes[];
255
- }
256
- export interface $ZodCheckMimeTypeInternals<T extends File = File> extends $ZodCheckInternals<T> {
257
- def: $ZodCheckMimeTypeDef;
258
- issc: errors.$ZodIssueInvalidValue;
259
- }
260
- export interface $ZodCheckMimeType<T extends File = File> extends $ZodCheck<T> {
261
- _zod: $ZodCheckMimeTypeInternals<T>;
262
- }
263
- export declare const $ZodCheckMimeType: core.$constructor<$ZodCheckMimeType>;
264
- export interface $ZodCheckOverwriteDef<T = unknown> extends $ZodCheckDef {
265
- check: "overwrite";
266
- tx(value: T): T;
267
- }
268
- export interface $ZodCheckOverwriteInternals<T = unknown> extends $ZodCheckInternals<T> {
269
- def: $ZodCheckOverwriteDef<T>;
270
- issc: never;
271
- }
272
- export interface $ZodCheckOverwrite<T = unknown> extends $ZodCheck<T> {
273
- _zod: $ZodCheckOverwriteInternals<T>;
274
- }
275
- export declare const $ZodCheckOverwrite: core.$constructor<$ZodCheckOverwrite>;
276
- export type $ZodChecks = $ZodCheckLessThan | $ZodCheckGreaterThan | $ZodCheckMultipleOf | $ZodCheckNumberFormat | $ZodCheckBigIntFormat | $ZodCheckMaxSize | $ZodCheckMinSize | $ZodCheckSizeEquals | $ZodCheckMaxLength | $ZodCheckMinLength | $ZodCheckLengthEquals | $ZodCheckStringFormat | $ZodCheckProperty | $ZodCheckMimeType | $ZodCheckOverwrite;
277
- export type $ZodStringFormatChecks = $ZodCheckRegex | $ZodCheckLowerCase | $ZodCheckUpperCase | $ZodCheckIncludes | $ZodCheckStartsWith | $ZodCheckEndsWith | schemas.$ZodGUID | schemas.$ZodUUID | schemas.$ZodEmail | schemas.$ZodURL | schemas.$ZodEmoji | schemas.$ZodNanoID | schemas.$ZodCUID | schemas.$ZodCUID2 | schemas.$ZodULID | schemas.$ZodXID | schemas.$ZodKSUID | schemas.$ZodISODateTime | schemas.$ZodISODate | schemas.$ZodISOTime | schemas.$ZodISODuration | schemas.$ZodIPv4 | schemas.$ZodIPv6 | schemas.$ZodCIDRv4 | schemas.$ZodCIDRv6 | schemas.$ZodBase64 | schemas.$ZodBase64URL | schemas.$ZodE164 | schemas.$ZodJWT;
@@ -1,9 +0,0 @@
1
- import type * as errors from "./errors.js";
2
- export interface $ZodConfig {
3
- /** Custom error map. Overrides `config().localeError`. */
4
- customError?: errors.$ZodErrorMap | undefined;
5
- /** Localized error map. Lowest priority. */
6
- localeError?: errors.$ZodErrorMap | undefined;
7
- }
8
- export declare const globalConfig: $ZodConfig;
9
- export declare function config(config?: Partial<$ZodConfig>): $ZodConfig;
@@ -1,47 +0,0 @@
1
- import type * as errors from "./errors.js";
2
- import type * as schemas from "./schemas.js";
3
- import type { Class } from "./util.js";
4
- type ZodTrait = {
5
- _zod: {
6
- def: any;
7
- [k: string]: any;
8
- };
9
- };
10
- export interface $constructor<T extends ZodTrait, D = T["_zod"]["def"]> {
11
- new (def: D): T;
12
- init(inst: T, def: D): asserts inst is T;
13
- }
14
- export declare function $constructor<T extends ZodTrait, D = T["_zod"]["def"]>(name: string, initializer: (inst: T, def: D) => void, params?: {
15
- Parent?: typeof Class;
16
- }): $constructor<T, D>;
17
- export declare const $brand: unique symbol;
18
- export type $brand<T extends string | number | symbol = string | number | symbol> = {
19
- [$brand]: {
20
- [k in T]: true;
21
- };
22
- };
23
- export type $ZodBranded<T extends schemas.SomeType, Brand extends string | number | symbol> = T & Record<"_zod", Record<"output", output<T> & $brand<Brand>>>;
24
- export declare class $ZodAsyncError extends Error {
25
- constructor();
26
- }
27
- export type input<T> = T extends {
28
- _zod: {
29
- input: any;
30
- };
31
- } ? Required<T["_zod"]>["input"] : unknown;
32
- export type output<T> = T extends {
33
- _zod: {
34
- output: any;
35
- };
36
- } ? Required<T["_zod"]>["output"] : unknown;
37
- export type { output as infer };
38
- export interface $ZodConfig {
39
- /** Custom error map. Overrides `config().localeError`. */
40
- customError?: errors.$ZodErrorMap | undefined;
41
- /** Localized error map. Lowest priority. */
42
- localeError?: errors.$ZodErrorMap | undefined;
43
- /** Disable JIT schema compilation. Useful in environments that disallow `eval`. */
44
- jitless?: boolean | undefined;
45
- }
46
- export declare const globalConfig: $ZodConfig;
47
- export declare function config(newConfig?: Partial<$ZodConfig>): $ZodConfig;
@@ -1,14 +0,0 @@
1
- type ModeWriter = (doc: Doc, modes: {
2
- execution: "sync" | "async";
3
- }) => void;
4
- export declare class Doc {
5
- args: string[];
6
- content: string[];
7
- indent: number;
8
- constructor(args?: string[]);
9
- indented(fn: (doc: Doc) => void): void;
10
- write(fn: ModeWriter): void;
11
- write(line: string): void;
12
- compile(): Function;
13
- }
14
- export {};