@tsgonest/types 0.3.0 → 0.4.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.
@@ -0,0 +1,18 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __exportAll = (all, no_symbols) => {
4
+ let target = {};
5
+ for (var name in all) {
6
+ __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ }
11
+ if (!no_symbols) {
12
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
13
+ }
14
+ return target;
15
+ };
16
+
17
+ //#endregion
18
+ export { __exportAll as t };
package/dist/index.cjs ADDED
@@ -0,0 +1,9 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_tags = require('./tags.cjs');
3
+
4
+ Object.defineProperty(exports, 'tags', {
5
+ enumerable: true,
6
+ get: function () {
7
+ return require_tags.tags_exports;
8
+ }
9
+ });
@@ -0,0 +1,2 @@
1
+ import { t as tags_d_exports } from "./tags.cjs";
2
+ export { tags_d_exports as tags };
@@ -0,0 +1,2 @@
1
+ import { t as tags_d_exports } from "./tags.mjs";
2
+ export { tags_d_exports as tags };
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { t as tags_exports } from "./tags.mjs";
2
+
3
+ export { tags_exports as tags };
package/dist/tags.cjs ADDED
@@ -0,0 +1,29 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region \0rolldown/runtime.js
3
+ var __defProp = Object.defineProperty;
4
+ var __exportAll = (all, no_symbols) => {
5
+ let target = {};
6
+ for (var name in all) {
7
+ __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ }
12
+ if (!no_symbols) {
13
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
14
+ }
15
+ return target;
16
+ };
17
+
18
+ //#endregion
19
+
20
+ //#region src/tags.ts
21
+ var tags_exports = /* @__PURE__ */ __exportAll({});
22
+
23
+ //#endregion
24
+ Object.defineProperty(exports, 'tags_exports', {
25
+ enumerable: true,
26
+ get: function () {
27
+ return tags_exports;
28
+ }
29
+ });
@@ -1,3 +1,6 @@
1
+ declare namespace tags_d_exports {
2
+ export { Between, Coerce, Cuid, Cuid2, DateOnly, DateTime, Default, Double, Duration, Email, EndsWith, Error, ExclusiveMaximum, ExclusiveMinimum, Finite, Format, FormatValue, Gt, Gte, IPv4, IPv6, Includes, Int, Jwt, Length, Lowercase, Lt, Lte, Max, MaxItems, MaxLength, Maximum, Min, MinItems, MinLength, Minimum, MultipleOf, NanoId, Negative, NonNegative, NonPositive, NumericTypeValue, Pattern, Positive, Range, SafeInt, StartsWith, Step, Time, ToLowerCase, ToUpperCase, Trim, Type, Uint, Ulid, Unique, UniqueItems, Uppercase, Uri, Url, Uuid, Validate };
3
+ }
1
4
  /**
2
5
  * @tsgonest/types — Zero-runtime branded types for type-safe validation.
3
6
  *
@@ -31,30 +34,28 @@
31
34
  */
32
35
  /** Extract the value from a dual-form number constraint. */
33
36
  type NumVal<N extends number | {
34
- value: number;
35
- error?: string;
37
+ value: number;
38
+ error?: string;
36
39
  }> = N extends {
37
- value: infer V;
40
+ value: infer V;
38
41
  } ? V : N;
39
42
  /** Extract the value from a dual-form string constraint. */
40
43
  type StrVal<S extends string | {
41
- value: string;
42
- error?: string;
44
+ value: string;
45
+ error?: string;
43
46
  }> = S extends {
44
- value: infer V;
47
+ value: infer V;
45
48
  } ? V : S;
46
49
  /** Extract the type from a dual-form type constraint (Format, Type). */
47
50
  type TypeVal<T, Base> = T extends {
48
- type: infer V;
51
+ type: infer V;
49
52
  } ? V : T;
50
53
  /** Conditionally add a _error phantom property. */
51
54
  type WithErr<Prefix extends string, C> = C extends {
52
- error: infer E extends string;
53
- } ? {
54
- readonly [K in `${Prefix}_error`]: E;
55
- } : {};
55
+ error: infer E extends string;
56
+ } ? { readonly [K in `${Prefix}_error`]: E } : {};
56
57
  /** All supported string format values. */
57
- export type FormatValue = "email" | "idn-email" | "url" | "uri" | "uri-reference" | "uri-template" | "iri" | "iri-reference" | "uuid" | "ipv4" | "ipv6" | "hostname" | "idn-hostname" | "date-time" | "date" | "time" | "duration" | "json-pointer" | "relative-json-pointer" | "byte" | "password" | "regex" | "nanoid" | "cuid" | "cuid2" | "ulid" | "jwt" | "base64url" | "hex" | "mac" | "cidrv4" | "cidrv6" | "emoji";
58
+ type FormatValue = "email" | "idn-email" | "url" | "uri" | "uri-reference" | "uri-template" | "iri" | "iri-reference" | "uuid" | "ipv4" | "ipv6" | "hostname" | "idn-hostname" | "date-time" | "date" | "time" | "duration" | "json-pointer" | "relative-json-pointer" | "byte" | "password" | "regex" | "nanoid" | "cuid" | "cuid2" | "ulid" | "jwt" | "base64url" | "hex" | "mac" | "cidrv4" | "cidrv6" | "emoji";
58
59
  /**
59
60
  * Validate a string matches a specific format.
60
61
  *
@@ -62,192 +63,192 @@ export type FormatValue = "email" | "idn-email" | "url" | "uri" | "uri-reference
62
63
  * Format<"email">
63
64
  * Format<{type: "email", error: "Must be a valid email"}>
64
65
  */
65
- export type Format<F extends FormatValue | {
66
- type: FormatValue;
67
- error?: string;
66
+ type Format<F extends FormatValue | {
67
+ type: FormatValue;
68
+ error?: string;
68
69
  }> = {
69
- readonly __tsgonest_format: TypeVal<F, FormatValue>;
70
+ readonly __tsgonest_format: TypeVal<F, FormatValue>;
70
71
  } & WithErr<"__tsgonest_format", F>;
71
72
  /**
72
73
  * Minimum string length.
73
74
  * @example MinLength<1> or MinLength<{value: 1, error: "Cannot be empty"}>
74
75
  */
75
- export type MinLength<N extends number | {
76
- value: number;
77
- error?: string;
76
+ type MinLength<N extends number | {
77
+ value: number;
78
+ error?: string;
78
79
  }> = {
79
- readonly __tsgonest_minLength: NumVal<N>;
80
+ readonly __tsgonest_minLength: NumVal<N>;
80
81
  } & WithErr<"__tsgonest_minLength", N>;
81
82
  /**
82
83
  * Maximum string length.
83
84
  * @example MaxLength<255> or MaxLength<{value: 255, error: "Too long"}>
84
85
  */
85
- export type MaxLength<N extends number | {
86
- value: number;
87
- error?: string;
86
+ type MaxLength<N extends number | {
87
+ value: number;
88
+ error?: string;
88
89
  }> = {
89
- readonly __tsgonest_maxLength: NumVal<N>;
90
+ readonly __tsgonest_maxLength: NumVal<N>;
90
91
  } & WithErr<"__tsgonest_maxLength", N>;
91
92
  /**
92
93
  * Regex pattern constraint.
93
94
  * @example Pattern<"^[a-z]+$"> or Pattern<{value: "^[a-z]+$", error: "Letters only"}>
94
95
  */
95
- export type Pattern<P extends string | {
96
- value: string;
97
- error?: string;
96
+ type Pattern<P extends string | {
97
+ value: string;
98
+ error?: string;
98
99
  }> = {
99
- readonly __tsgonest_pattern: StrVal<P>;
100
+ readonly __tsgonest_pattern: StrVal<P>;
100
101
  } & WithErr<"__tsgonest_pattern", P>;
101
102
  /**
102
103
  * String must start with prefix.
103
104
  * @example StartsWith<"https://">
104
105
  */
105
- export type StartsWith<S extends string | {
106
- value: string;
107
- error?: string;
106
+ type StartsWith<S extends string | {
107
+ value: string;
108
+ error?: string;
108
109
  }> = {
109
- readonly __tsgonest_startsWith: StrVal<S>;
110
+ readonly __tsgonest_startsWith: StrVal<S>;
110
111
  } & WithErr<"__tsgonest_startsWith", S>;
111
112
  /**
112
113
  * String must end with suffix.
113
114
  * @example EndsWith<".json">
114
115
  */
115
- export type EndsWith<S extends string | {
116
- value: string;
117
- error?: string;
116
+ type EndsWith<S extends string | {
117
+ value: string;
118
+ error?: string;
118
119
  }> = {
119
- readonly __tsgonest_endsWith: StrVal<S>;
120
+ readonly __tsgonest_endsWith: StrVal<S>;
120
121
  } & WithErr<"__tsgonest_endsWith", S>;
121
122
  /**
122
123
  * String must contain substring.
123
124
  * @example Includes<"@">
124
125
  */
125
- export type Includes<S extends string | {
126
- value: string;
127
- error?: string;
126
+ type Includes<S extends string | {
127
+ value: string;
128
+ error?: string;
128
129
  }> = {
129
- readonly __tsgonest_includes: StrVal<S>;
130
+ readonly __tsgonest_includes: StrVal<S>;
130
131
  } & WithErr<"__tsgonest_includes", S>;
131
132
  /**
132
133
  * Minimum value (inclusive): value >= N.
133
134
  * @example Minimum<0> or Min<0> or Min<{value: 0, error: "Must be non-negative"}>
134
135
  */
135
- export type Minimum<N extends number | {
136
- value: number;
137
- error?: string;
136
+ type Minimum<N extends number | {
137
+ value: number;
138
+ error?: string;
138
139
  }> = {
139
- readonly __tsgonest_minimum: NumVal<N>;
140
+ readonly __tsgonest_minimum: NumVal<N>;
140
141
  } & WithErr<"__tsgonest_minimum", N>;
141
142
  /**
142
143
  * Maximum value (inclusive): value <= N.
143
144
  * @example Maximum<100> or Max<100>
144
145
  */
145
- export type Maximum<N extends number | {
146
- value: number;
147
- error?: string;
146
+ type Maximum<N extends number | {
147
+ value: number;
148
+ error?: string;
148
149
  }> = {
149
- readonly __tsgonest_maximum: NumVal<N>;
150
+ readonly __tsgonest_maximum: NumVal<N>;
150
151
  } & WithErr<"__tsgonest_maximum", N>;
151
152
  /**
152
153
  * Exclusive minimum: value > N.
153
154
  * @example ExclusiveMinimum<0> or Gt<0>
154
155
  */
155
- export type ExclusiveMinimum<N extends number | {
156
- value: number;
157
- error?: string;
156
+ type ExclusiveMinimum<N extends number | {
157
+ value: number;
158
+ error?: string;
158
159
  }> = {
159
- readonly __tsgonest_exclusiveMinimum: NumVal<N>;
160
+ readonly __tsgonest_exclusiveMinimum: NumVal<N>;
160
161
  } & WithErr<"__tsgonest_exclusiveMinimum", N>;
161
162
  /**
162
163
  * Exclusive maximum: value < N.
163
164
  * @example ExclusiveMaximum<100> or Lt<100>
164
165
  */
165
- export type ExclusiveMaximum<N extends number | {
166
- value: number;
167
- error?: string;
166
+ type ExclusiveMaximum<N extends number | {
167
+ value: number;
168
+ error?: string;
168
169
  }> = {
169
- readonly __tsgonest_exclusiveMaximum: NumVal<N>;
170
+ readonly __tsgonest_exclusiveMaximum: NumVal<N>;
170
171
  } & WithErr<"__tsgonest_exclusiveMaximum", N>;
171
172
  /**
172
173
  * Value must be a multiple of N.
173
174
  * @example MultipleOf<2> or Step<0.01>
174
175
  */
175
- export type MultipleOf<N extends number | {
176
- value: number;
177
- error?: string;
176
+ type MultipleOf<N extends number | {
177
+ value: number;
178
+ error?: string;
178
179
  }> = {
179
- readonly __tsgonest_multipleOf: NumVal<N>;
180
+ readonly __tsgonest_multipleOf: NumVal<N>;
180
181
  } & WithErr<"__tsgonest_multipleOf", N>;
181
182
  /** Valid numeric type values. */
182
- export type NumericTypeValue = "int32" | "uint32" | "int64" | "uint64" | "float" | "double";
183
+ type NumericTypeValue = "int32" | "uint32" | "int64" | "uint64" | "float" | "double";
183
184
  /**
184
185
  * Constrain number to a specific numeric type.
185
186
  * @example Type<"int32"> or Type<{type: "int32", error: "Must be integer"}>
186
187
  */
187
- export type Type<T extends NumericTypeValue | {
188
- type: NumericTypeValue;
189
- error?: string;
188
+ type Type<T extends NumericTypeValue | {
189
+ type: NumericTypeValue;
190
+ error?: string;
190
191
  }> = {
191
- readonly __tsgonest_type: TypeVal<T, NumericTypeValue>;
192
+ readonly __tsgonest_type: TypeVal<T, NumericTypeValue>;
192
193
  } & WithErr<"__tsgonest_type", T>;
193
194
  /**
194
195
  * Minimum array length.
195
196
  * @example MinItems<1>
196
197
  */
197
- export type MinItems<N extends number | {
198
- value: number;
199
- error?: string;
198
+ type MinItems<N extends number | {
199
+ value: number;
200
+ error?: string;
200
201
  }> = {
201
- readonly __tsgonest_minItems: NumVal<N>;
202
+ readonly __tsgonest_minItems: NumVal<N>;
202
203
  } & WithErr<"__tsgonest_minItems", N>;
203
204
  /**
204
205
  * Maximum array length.
205
206
  * @example MaxItems<100>
206
207
  */
207
- export type MaxItems<N extends number | {
208
- value: number;
209
- error?: string;
208
+ type MaxItems<N extends number | {
209
+ value: number;
210
+ error?: string;
210
211
  }> = {
211
- readonly __tsgonest_maxItems: NumVal<N>;
212
+ readonly __tsgonest_maxItems: NumVal<N>;
212
213
  } & WithErr<"__tsgonest_maxItems", N>;
213
214
  /**
214
215
  * Array items must be unique.
215
216
  * @example UniqueItems or Unique or Unique<{error: "No duplicates"}>
216
217
  */
217
- export type UniqueItems<C extends {
218
- error?: string;
218
+ type UniqueItems<C extends {
219
+ error?: string;
219
220
  } = {}> = {
220
- readonly __tsgonest_uniqueItems: true;
221
+ readonly __tsgonest_uniqueItems: true;
221
222
  } & WithErr<"__tsgonest_uniqueItems", C>;
222
223
  /**
223
224
  * String must be all uppercase.
224
225
  * @example Uppercase or Uppercase<{error: "Must be uppercase"}>
225
226
  */
226
- export type Uppercase<C extends {
227
- error?: string;
227
+ type Uppercase<C extends {
228
+ error?: string;
228
229
  } = {}> = {
229
- readonly __tsgonest_uppercase: true;
230
+ readonly __tsgonest_uppercase: true;
230
231
  } & WithErr<"__tsgonest_uppercase", C>;
231
232
  /**
232
233
  * String must be all lowercase.
233
234
  * @example Lowercase or Lowercase<{error: "Must be lowercase"}>
234
235
  */
235
- export type Lowercase<C extends {
236
- error?: string;
236
+ type Lowercase<C extends {
237
+ error?: string;
237
238
  } = {}> = {
238
- readonly __tsgonest_lowercase: true;
239
+ readonly __tsgonest_lowercase: true;
239
240
  } & WithErr<"__tsgonest_lowercase", C>;
240
241
  /** Trim whitespace before validation. */
241
- export type Trim = {
242
- readonly __tsgonest_transform_trim: true;
242
+ type Trim = {
243
+ readonly __tsgonest_transform_trim: true;
243
244
  };
244
245
  /** Convert to lowercase before validation. */
245
- export type ToLowerCase = {
246
- readonly __tsgonest_transform_toLowerCase: true;
246
+ type ToLowerCase = {
247
+ readonly __tsgonest_transform_toLowerCase: true;
247
248
  };
248
249
  /** Convert to uppercase before validation. */
249
- export type ToUpperCase = {
250
- readonly __tsgonest_transform_toUpperCase: true;
250
+ type ToUpperCase = {
251
+ readonly __tsgonest_transform_toUpperCase: true;
251
252
  };
252
253
  /**
253
254
  * Coerce string inputs to the declared type before validation.
@@ -258,8 +259,8 @@ export type ToUpperCase = {
258
259
  * page: number & Coerce
259
260
  * active: boolean & Coerce
260
261
  */
261
- export type Coerce = {
262
- readonly __tsgonest_coerce: true;
262
+ type Coerce = {
263
+ readonly __tsgonest_coerce: true;
263
264
  };
264
265
  /**
265
266
  * Validate using a custom function. The function must be a predicate:
@@ -274,146 +275,147 @@ export type Coerce = {
274
275
  * card: string & Validate<{fn: typeof isValidCard, error: "Invalid card"}>;
275
276
  * }
276
277
  */
277
- export type Validate<F extends ((...args: any[]) => boolean) | {
278
- fn: (...args: any[]) => boolean;
279
- error?: string;
278
+ type Validate<F extends ((...args: any[]) => boolean) | {
279
+ fn: (...args: any[]) => boolean;
280
+ error?: string;
280
281
  }> = {
281
- readonly __tsgonest_validate: F extends {
282
- fn: infer Fn;
283
- } ? Fn : F;
282
+ readonly __tsgonest_validate: F extends {
283
+ fn: infer Fn;
284
+ } ? Fn : F;
284
285
  } & WithErr<"__tsgonest_validate", F>;
285
286
  /**
286
287
  * Global error message — applies to all validation failures on this property.
287
288
  * Per-constraint errors (via `error` field) take precedence.
288
289
  * @example string & Format<"email"> & Error<"Invalid email">
289
290
  */
290
- export type Error<M extends string> = {
291
- readonly __tsgonest_error: M;
291
+ type Error<M extends string> = {
292
+ readonly __tsgonest_error: M;
292
293
  };
293
294
  /**
294
295
  * Default value for optional properties. Assigned when value is undefined.
295
296
  * @example theme?: string & Default<"light">
296
297
  */
297
- export type Default<V extends string | number | boolean> = {
298
- readonly __tsgonest_default: V;
298
+ type Default<V extends string | number | boolean> = {
299
+ readonly __tsgonest_default: V;
299
300
  };
300
301
  /**
301
302
  * Exact length (sets both MinLength and MaxLength).
302
303
  * @example Length<2> or Length<{value: 2, error: "Must be exactly 2 chars"}>
303
304
  */
304
- export type Length<N extends number | {
305
- value: number;
306
- error?: string;
305
+ type Length<N extends number | {
306
+ value: number;
307
+ error?: string;
307
308
  }> = MinLength<N> & MaxLength<N>;
308
309
  /**
309
310
  * Numeric range (inclusive). Sets Minimum and Maximum.
310
311
  * @example Range<{min: 0, max: 100}> or Range<{min: 0, max: 100, error: "Out of range"}>
311
312
  */
312
- export type Range<R extends {
313
- min: number;
314
- max: number;
315
- error?: string;
313
+ type Range<R extends {
314
+ min: number;
315
+ max: number;
316
+ error?: string;
316
317
  }> = Minimum<R extends {
317
- error: string;
318
+ error: string;
318
319
  } ? {
319
- value: R["min"];
320
- error: R["error"];
320
+ value: R["min"];
321
+ error: R["error"];
321
322
  } : R["min"]> & Maximum<R extends {
322
- error: string;
323
+ error: string;
323
324
  } ? {
324
- value: R["max"];
325
- error: R["error"];
325
+ value: R["max"];
326
+ error: R["error"];
326
327
  } : R["max"]>;
327
328
  /**
328
329
  * String length range. Sets MinLength and MaxLength.
329
330
  * @example Between<{min: 1, max: 255}> or Between<{min: 1, max: 255, error: "Bad length"}>
330
331
  */
331
- export type Between<R extends {
332
- min: number;
333
- max: number;
334
- error?: string;
332
+ type Between<R extends {
333
+ min: number;
334
+ max: number;
335
+ error?: string;
335
336
  }> = MinLength<R extends {
336
- error: string;
337
+ error: string;
337
338
  } ? {
338
- value: R["min"];
339
- error: R["error"];
339
+ value: R["min"];
340
+ error: R["error"];
340
341
  } : R["min"]> & MaxLength<R extends {
341
- error: string;
342
+ error: string;
342
343
  } ? {
343
- value: R["max"];
344
- error: R["error"];
344
+ value: R["max"];
345
+ error: R["error"];
345
346
  } : R["max"]>;
346
347
  /** Alias for Minimum. `Min<0>` = `Minimum<0>` */
347
- export type Min<N extends number | {
348
- value: number;
349
- error?: string;
348
+ type Min<N extends number | {
349
+ value: number;
350
+ error?: string;
350
351
  }> = Minimum<N>;
351
352
  /** Alias for Maximum. `Max<100>` = `Maximum<100>` */
352
- export type Max<N extends number | {
353
- value: number;
354
- error?: string;
353
+ type Max<N extends number | {
354
+ value: number;
355
+ error?: string;
355
356
  }> = Maximum<N>;
356
357
  /** Alias for ExclusiveMinimum. `Gt<0>` = "greater than 0" */
357
- export type Gt<N extends number | {
358
- value: number;
359
- error?: string;
358
+ type Gt<N extends number | {
359
+ value: number;
360
+ error?: string;
360
361
  }> = ExclusiveMinimum<N>;
361
362
  /** Alias for ExclusiveMaximum. `Lt<100>` = "less than 100" */
362
- export type Lt<N extends number | {
363
- value: number;
364
- error?: string;
363
+ type Lt<N extends number | {
364
+ value: number;
365
+ error?: string;
365
366
  }> = ExclusiveMaximum<N>;
366
367
  /** Alias for Minimum + ExclusiveMinimum combo. `Gte<0>` = `Min<0>` */
367
- export type Gte<N extends number | {
368
- value: number;
369
- error?: string;
368
+ type Gte<N extends number | {
369
+ value: number;
370
+ error?: string;
370
371
  }> = Minimum<N>;
371
372
  /** Alias for Maximum + ExclusiveMaximum combo. `Lte<100>` = `Max<100>` */
372
- export type Lte<N extends number | {
373
- value: number;
374
- error?: string;
373
+ type Lte<N extends number | {
374
+ value: number;
375
+ error?: string;
375
376
  }> = Maximum<N>;
376
377
  /** Alias for MultipleOf. `Step<0.01>` */
377
- export type Step<N extends number | {
378
- value: number;
379
- error?: string;
378
+ type Step<N extends number | {
379
+ value: number;
380
+ error?: string;
380
381
  }> = MultipleOf<N>;
381
382
  /** Alias for UniqueItems. `Unique` */
382
- export type Unique<C extends {
383
- error?: string;
383
+ type Unique<C extends {
384
+ error?: string;
384
385
  } = {}> = UniqueItems<C>;
385
- export type Email = Format<"email">;
386
- export type Uuid = Format<"uuid">;
387
- export type Url = Format<"url">;
388
- export type Uri = Format<"uri">;
389
- export type IPv4 = Format<"ipv4">;
390
- export type IPv6 = Format<"ipv6">;
391
- export type DateTime = Format<"date-time">;
392
- export type DateOnly = Format<"date">;
393
- export type Time = Format<"time">;
394
- export type Duration = Format<"duration">;
395
- export type Jwt = Format<"jwt">;
396
- export type Ulid = Format<"ulid">;
397
- export type Cuid = Format<"cuid">;
398
- export type Cuid2 = Format<"cuid2">;
399
- export type NanoId = Format<"nanoid">;
386
+ type Email = Format<"email">;
387
+ type Uuid = Format<"uuid">;
388
+ type Url = Format<"url">;
389
+ type Uri = Format<"uri">;
390
+ type IPv4 = Format<"ipv4">;
391
+ type IPv6 = Format<"ipv6">;
392
+ type DateTime = Format<"date-time">;
393
+ type DateOnly = Format<"date">;
394
+ type Time = Format<"time">;
395
+ type Duration = Format<"duration">;
396
+ type Jwt = Format<"jwt">;
397
+ type Ulid = Format<"ulid">;
398
+ type Cuid = Format<"cuid">;
399
+ type Cuid2 = Format<"cuid2">;
400
+ type NanoId = Format<"nanoid">;
400
401
  /** number & Gt<0> */
401
- export type Positive = ExclusiveMinimum<0>;
402
+ type Positive = ExclusiveMinimum<0>;
402
403
  /** number & Lt<0> */
403
- export type Negative = ExclusiveMaximum<0>;
404
+ type Negative = ExclusiveMaximum<0>;
404
405
  /** number & Min<0> */
405
- export type NonNegative = Minimum<0>;
406
+ type NonNegative = Minimum<0>;
406
407
  /** number & Max<0> */
407
- export type NonPositive = Maximum<0>;
408
+ type NonPositive = Maximum<0>;
408
409
  /** number & Type<"int32"> */
409
- export type Int = Type<"int32">;
410
+ type Int = Type<"int32">;
410
411
  /** number & Type<"int64"> (JS safe integer range) */
411
- export type SafeInt = Type<"int64">;
412
+ type SafeInt = Type<"int64">;
412
413
  /** number & Type<"float"> (finite, no Infinity/NaN) */
413
- export type Finite = Type<"float">;
414
+ type Finite = Type<"float">;
414
415
  /** number & Type<"uint32"> */
415
- export type Uint = Type<"uint32">;
416
+ type Uint = Type<"uint32">;
416
417
  /** number & Type<"double"> */
417
- export type Double = Type<"double">;
418
- export {};
419
- //# sourceMappingURL=tags.d.ts.map
418
+ type Double = Type<"double">;
419
+ //#endregion
420
+ export { Between, Coerce, Cuid, Cuid2, DateOnly, DateTime, Default, Double, Duration, Email, EndsWith, Error, ExclusiveMaximum, ExclusiveMinimum, Finite, Format, FormatValue, Gt, Gte, IPv4, IPv6, Includes, Int, Jwt, Length, Lowercase, Lt, Lte, Max, MaxItems, MaxLength, Maximum, Min, MinItems, MinLength, Minimum, MultipleOf, NanoId, Negative, NonNegative, NonPositive, NumericTypeValue, Pattern, Positive, Range, SafeInt, StartsWith, Step, Time, ToLowerCase, ToUpperCase, Trim, Type, Uint, Ulid, Unique, U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