@tsgonest/types 0.9.2 → 0.10.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,13 @@
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) __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true
8
+ });
9
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
+ return target;
11
+ };
12
+ //#endregion
13
+ export { __exportAll as t };
package/dist/index.cjs CHANGED
@@ -1,9 +1,8 @@
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
- });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_tags = require("./tags.cjs");
3
+ Object.defineProperty(exports, "tags", {
4
+ enumerable: true,
5
+ get: function() {
6
+ return require_tags.tags_exports;
7
+ }
8
+ });
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as tags_d_exports } from "./tags.cjs";
1
+ import { lt as tags_d_exports } from "./tags-Bjy_mpjh.cjs";
2
2
  export { tags_d_exports as tags };
package/dist/index.mjs CHANGED
@@ -1,3 +1,2 @@
1
1
  import { t as tags_exports } from "./tags.mjs";
2
-
3
- export { tags_exports as tags };
2
+ export { tags_exports as tags };
@@ -0,0 +1,544 @@
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
+ }
4
+ /**
5
+ * @tsgonest/types — Zero-runtime branded types for type-safe validation.
6
+ *
7
+ * These types exist purely at compile time. They produce NO runtime code.
8
+ * The tsgonest compiler reads phantom properties (`__tsgonest_*`) to generate validators.
9
+ *
10
+ * All phantom properties are optional (`?`) so that branded types remain
11
+ * assignable from their base types (e.g. `string` → `string & Email`).
12
+ * This follows the same pattern as typia's optional `"typia.tag"` property.
13
+ *
14
+ * Every constraint supports two forms:
15
+ * - Simple: Min<0> — clean, no custom error
16
+ * - Extended: Min<{value: 0, error: "Must be positive"}> — with per-constraint error
17
+ *
18
+ * @example
19
+ * import { Email, Min, Max, Trim, Coerce } from "@tsgonest/types";
20
+ *
21
+ * interface CreateUserDto {
22
+ * email: string & Email;
23
+ * name: string & Trim & Min<1> & Max<255>;
24
+ * age: number & Min<0> & Max<150>;
25
+ * }
26
+ *
27
+ * // With per-constraint errors:
28
+ * interface StrictDto {
29
+ * email: string & Format<{type: "email", error: "Must be a valid email"}>;
30
+ * age: number & Min<{value: 0, error: "Age cannot be negative"}>;
31
+ * }
32
+ *
33
+ * // Query params with coercion:
34
+ * interface QueryDto {
35
+ * page: number & Coerce;
36
+ * active: boolean & Coerce;
37
+ * }
38
+ */
39
+ /** All supported string format values. */
40
+ 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";
41
+ /**
42
+ * Validate a string matches a specific format.
43
+ *
44
+ * @example
45
+ * Format<"email">
46
+ * Format<{type: "email", error: "Must be a valid email"}>
47
+ */
48
+ type Format<F extends FormatValue | {
49
+ type: FormatValue;
50
+ error?: string;
51
+ }> = F extends {
52
+ type: infer V;
53
+ error: infer E extends string;
54
+ } ? {
55
+ readonly __tsgonest_format?: V;
56
+ readonly __tsgonest_format_error?: E;
57
+ } : {
58
+ readonly __tsgonest_format?: F extends {
59
+ type: infer V;
60
+ } ? V : F;
61
+ };
62
+ /**
63
+ * Minimum string length.
64
+ * @example MinLength<1> or MinLength<{value: 1, error: "Cannot be empty"}>
65
+ */
66
+ type MinLength<N extends number | {
67
+ value: number;
68
+ error?: string;
69
+ }> = N extends {
70
+ value: infer V extends number;
71
+ error: infer E extends string;
72
+ } ? {
73
+ readonly __tsgonest_minLength?: V;
74
+ readonly __tsgonest_minLength_error?: E;
75
+ } : {
76
+ readonly __tsgonest_minLength?: N extends {
77
+ value: infer V;
78
+ } ? V : N;
79
+ };
80
+ /**
81
+ * Maximum string length.
82
+ * @example MaxLength<255> or MaxLength<{value: 255, error: "Too long"}>
83
+ */
84
+ type MaxLength<N extends number | {
85
+ value: number;
86
+ error?: string;
87
+ }> = N extends {
88
+ value: infer V extends number;
89
+ error: infer E extends string;
90
+ } ? {
91
+ readonly __tsgonest_maxLength?: V;
92
+ readonly __tsgonest_maxLength_error?: E;
93
+ } : {
94
+ readonly __tsgonest_maxLength?: N extends {
95
+ value: infer V;
96
+ } ? V : N;
97
+ };
98
+ /**
99
+ * Regex pattern constraint.
100
+ * @example Pattern<"^[a-z]+$"> or Pattern<{value: "^[a-z]+$", error: "Letters only"}>
101
+ */
102
+ type Pattern<P extends string | {
103
+ value: string;
104
+ error?: string;
105
+ }> = P extends {
106
+ value: infer V extends string;
107
+ error: infer E extends string;
108
+ } ? {
109
+ readonly __tsgonest_pattern?: V;
110
+ readonly __tsgonest_pattern_error?: E;
111
+ } : {
112
+ readonly __tsgonest_pattern?: P extends {
113
+ value: infer V;
114
+ } ? V : P;
115
+ };
116
+ /**
117
+ * String must start with prefix.
118
+ * @example StartsWith<"https://">
119
+ */
120
+ type StartsWith<S extends string | {
121
+ value: string;
122
+ error?: string;
123
+ }> = S extends {
124
+ value: infer V extends string;
125
+ error: infer E extends string;
126
+ } ? {
127
+ readonly __tsgonest_startsWith?: V;
128
+ readonly __tsgonest_startsWith_error?: E;
129
+ } : {
130
+ readonly __tsgonest_startsWith?: S extends {
131
+ value: infer V;
132
+ } ? V : S;
133
+ };
134
+ /**
135
+ * String must end with suffix.
136
+ * @example EndsWith<".json">
137
+ */
138
+ type EndsWith<S extends string | {
139
+ value: string;
140
+ error?: string;
141
+ }> = S extends {
142
+ value: infer V extends string;
143
+ error: infer E extends string;
144
+ } ? {
145
+ readonly __tsgonest_endsWith?: V;
146
+ readonly __tsgonest_endsWith_error?: E;
147
+ } : {
148
+ readonly __tsgonest_endsWith?: S extends {
149
+ value: infer V;
150
+ } ? V : S;
151
+ };
152
+ /**
153
+ * String must contain substring.
154
+ * @example Includes<"@">
155
+ */
156
+ type Includes<S extends string | {
157
+ value: string;
158
+ error?: string;
159
+ }> = S extends {
160
+ value: infer V extends string;
161
+ error: infer E extends string;
162
+ } ? {
163
+ readonly __tsgonest_includes?: V;
164
+ readonly __tsgonest_includes_error?: E;
165
+ } : {
166
+ readonly __tsgonest_includes?: S extends {
167
+ value: infer V;
168
+ } ? V : S;
169
+ };
170
+ /**
171
+ * Minimum value (inclusive): value >= N.
172
+ * @example Minimum<0> or Min<0> or Min<{value: 0, error: "Must be non-negative"}>
173
+ */
174
+ type Minimum<N extends number | {
175
+ value: number;
176
+ error?: string;
177
+ }> = N extends {
178
+ value: infer V extends number;
179
+ error: infer E extends string;
180
+ } ? {
181
+ readonly __tsgonest_minimum?: V;
182
+ readonly __tsgonest_minimum_error?: E;
183
+ } : {
184
+ readonly __tsgonest_minimum?: N extends {
185
+ value: infer V;
186
+ } ? V : N;
187
+ };
188
+ /**
189
+ * Maximum value (inclusive): value <= N.
190
+ * @example Maximum<100> or Max<100>
191
+ */
192
+ type Maximum<N extends number | {
193
+ value: number;
194
+ error?: string;
195
+ }> = N extends {
196
+ value: infer V extends number;
197
+ error: infer E extends string;
198
+ } ? {
199
+ readonly __tsgonest_maximum?: V;
200
+ readonly __tsgonest_maximum_error?: E;
201
+ } : {
202
+ readonly __tsgonest_maximum?: N extends {
203
+ value: infer V;
204
+ } ? V : N;
205
+ };
206
+ /**
207
+ * Exclusive minimum: value > N.
208
+ * @example ExclusiveMinimum<0> or Gt<0>
209
+ */
210
+ type ExclusiveMinimum<N extends number | {
211
+ value: number;
212
+ error?: string;
213
+ }> = N extends {
214
+ value: infer V extends number;
215
+ error: infer E extends string;
216
+ } ? {
217
+ readonly __tsgonest_exclusiveMinimum?: V;
218
+ readonly __tsgonest_exclusiveMinimum_error?: E;
219
+ } : {
220
+ readonly __tsgonest_exclusiveMinimum?: N extends {
221
+ value: infer V;
222
+ } ? V : N;
223
+ };
224
+ /**
225
+ * Exclusive maximum: value < N.
226
+ * @example ExclusiveMaximum<100> or Lt<100>
227
+ */
228
+ type ExclusiveMaximum<N extends number | {
229
+ value: number;
230
+ error?: string;
231
+ }> = N extends {
232
+ value: infer V extends number;
233
+ error: infer E extends string;
234
+ } ? {
235
+ readonly __tsgonest_exclusiveMaximum?: V;
236
+ readonly __tsgonest_exclusiveMaximum_error?: E;
237
+ } : {
238
+ readonly __tsgonest_exclusiveMaximum?: N extends {
239
+ value: infer V;
240
+ } ? V : N;
241
+ };
242
+ /**
243
+ * Value must be a multiple of N.
244
+ * @example MultipleOf<2> or Step<0.01>
245
+ */
246
+ type MultipleOf<N extends number | {
247
+ value: number;
248
+ error?: string;
249
+ }> = N extends {
250
+ value: infer V extends number;
251
+ error: infer E extends string;
252
+ } ? {
253
+ readonly __tsgonest_multipleOf?: V;
254
+ readonly __tsgonest_multipleOf_error?: E;
255
+ } : {
256
+ readonly __tsgonest_multipleOf?: N extends {
257
+ value: infer V;
258
+ } ? V : N;
259
+ };
260
+ /** Valid numeric type values. */
261
+ type NumericTypeValue = "int32" | "uint32" | "int64" | "uint64" | "float" | "double";
262
+ /**
263
+ * Constrain number to a specific numeric type.
264
+ * @example Type<"int32"> or Type<{type: "int32", error: "Must be integer"}>
265
+ */
266
+ type Type<T extends NumericTypeValue | {
267
+ type: NumericTypeValue;
268
+ error?: string;
269
+ }> = T extends {
270
+ type: infer V;
271
+ error: infer E extends string;
272
+ } ? {
273
+ readonly __tsgonest_type?: V;
274
+ readonly __tsgonest_type_error?: E;
275
+ } : {
276
+ readonly __tsgonest_type?: T extends {
277
+ type: infer V;
278
+ } ? V : T;
279
+ };
280
+ /**
281
+ * Minimum array length.
282
+ * @example MinItems<1>
283
+ */
284
+ type MinItems<N extends number | {
285
+ value: number;
286
+ error?: string;
287
+ }> = N extends {
288
+ value: infer V extends number;
289
+ error: infer E extends string;
290
+ } ? {
291
+ readonly __tsgonest_minItems?: V;
292
+ readonly __tsgonest_minItems_error?: E;
293
+ } : {
294
+ readonly __tsgonest_minItems?: N extends {
295
+ value: infer V;
296
+ } ? V : N;
297
+ };
298
+ /**
299
+ * Maximum array length.
300
+ * @example MaxItems<100>
301
+ */
302
+ type MaxItems<N extends number | {
303
+ value: number;
304
+ error?: string;
305
+ }> = N extends {
306
+ value: infer V extends number;
307
+ error: infer E extends string;
308
+ } ? {
309
+ readonly __tsgonest_maxItems?: V;
310
+ readonly __tsgonest_maxItems_error?: E;
311
+ } : {
312
+ readonly __tsgonest_maxItems?: N extends {
313
+ value: infer V;
314
+ } ? V : N;
315
+ };
316
+ /**
317
+ * Array items must be unique.
318
+ * @example UniqueItems or Unique or Unique<{error: "No duplicates"}>
319
+ */
320
+ type UniqueItems<C extends {
321
+ error?: string;
322
+ } = {}> = C extends {
323
+ error: infer E extends string;
324
+ } ? {
325
+ readonly __tsgonest_uniqueItems?: true;
326
+ readonly __tsgonest_uniqueItems_error?: E;
327
+ } : {
328
+ readonly __tsgonest_uniqueItems?: true;
329
+ };
330
+ /**
331
+ * String must be all uppercase.
332
+ * @example Uppercase or Uppercase<{error: "Must be uppercase"}>
333
+ */
334
+ type Uppercase<C extends {
335
+ error?: string;
336
+ } = {}> = C extends {
337
+ error: infer E extends string;
338
+ } ? {
339
+ readonly __tsgonest_uppercase?: true;
340
+ readonly __tsgonest_uppercase_error?: E;
341
+ } : {
342
+ readonly __tsgonest_uppercase?: true;
343
+ };
344
+ /**
345
+ * String must be all lowercase.
346
+ * @example Lowercase or Lowercase<{error: "Must be lowercase"}>
347
+ */
348
+ type Lowercase<C extends {
349
+ error?: string;
350
+ } = {}> = C extends {
351
+ error: infer E extends string;
352
+ } ? {
353
+ readonly __tsgonest_lowercase?: true;
354
+ readonly __tsgonest_lowercase_error?: E;
355
+ } : {
356
+ readonly __tsgonest_lowercase?: true;
357
+ };
358
+ /** Trim whitespace before validation. */
359
+ type Trim = {
360
+ readonly __tsgonest_transform_trim?: true;
361
+ };
362
+ /** Convert to lowercase before validation. */
363
+ type ToLowerCase = {
364
+ readonly __tsgonest_transform_toLowerCase?: true;
365
+ };
366
+ /** Convert to uppercase before validation. */
367
+ type ToUpperCase = {
368
+ readonly __tsgonest_transform_toUpperCase?: true;
369
+ };
370
+ /**
371
+ * Coerce string inputs to the declared type before validation.
372
+ * - "123" → 123 (string to number)
373
+ * - "true"/"false" → true/false (string to boolean)
374
+ *
375
+ * @example
376
+ * page: number & Coerce
377
+ * active: boolean & Coerce
378
+ */
379
+ type Coerce = {
380
+ readonly __tsgonest_coerce?: true;
381
+ };
382
+ /**
383
+ * Validate using a custom function. The function must be a predicate:
384
+ * `(value: T) => boolean`. tsgonest resolves the function's source file
385
+ * and emits an import + call in the generated validator.
386
+ *
387
+ * @example
388
+ * import { isValidCard } from "./validators/credit-card";
389
+ *
390
+ * interface PaymentDto {
391
+ * card: string & Validate<typeof isValidCard>;
392
+ * card: string & Validate<{fn: typeof isValidCard, error: "Invalid card"}>;
393
+ * }
394
+ */
395
+ type Validate<F extends ((...args: any[]) => boolean) | {
396
+ fn: (...args: any[]) => boolean;
397
+ error?: string;
398
+ }> = F extends {
399
+ fn: infer Fn;
400
+ error: infer E extends string;
401
+ } ? {
402
+ readonly __tsgonest_validate?: Fn;
403
+ readonly __tsgonest_validate_error?: E;
404
+ } : {
405
+ readonly __tsgonest_validate?: F extends {
406
+ fn: infer Fn;
407
+ } ? Fn : F;
408
+ };
409
+ /**
410
+ * Global error message — applies to all validation failures on this property.
411
+ * Per-constraint errors (via `error` field) take precedence.
412
+ * @example string & Format<"email"> & Error<"Invalid email">
413
+ */
414
+ type Error<M extends string> = {
415
+ readonly __tsgonest_error?: M;
416
+ };
417
+ /**
418
+ * Default value for optional properties. Assigned when value is undefined.
419
+ * @example theme?: string & Default<"light">
420
+ */
421
+ type Default<V extends string | number | boolean> = {
422
+ readonly __tsgonest_default?: V;
423
+ };
424
+ /**
425
+ * Exact length (sets both MinLength and MaxLength).
426
+ * @example Length<2> or Length<{value: 2, error: "Must be exactly 2 chars"}>
427
+ */
428
+ type Length<N extends number | {
429
+ value: number;
430
+ error?: string;
431
+ }> = MinLength<N> & MaxLength<N>;
432
+ /**
433
+ * Numeric range (inclusive). Sets Minimum and Maximum.
434
+ * @example Range<{min: 0, max: 100}> or Range<{min: 0, max: 100, error: "Out of range"}>
435
+ */
436
+ type Range<R extends {
437
+ min: number;
438
+ max: number;
439
+ error?: string;
440
+ }> = Minimum<R extends {
441
+ error: string;
442
+ } ? {
443
+ value: R["min"];
444
+ error: R["error"];
445
+ } : R["min"]> & Maximum<R extends {
446
+ error: string;
447
+ } ? {
448
+ value: R["max"];
449
+ error: R["error"];
450
+ } : R["max"]>;
451
+ /**
452
+ * String length range. Sets MinLength and MaxLength.
453
+ * @example Between<{min: 1, max: 255}> or Between<{min: 1, max: 255, error: "Bad length"}>
454
+ */
455
+ type Between<R extends {
456
+ min: number;
457
+ max: number;
458
+ error?: string;
459
+ }> = MinLength<R extends {
460
+ error: string;
461
+ } ? {
462
+ value: R["min"];
463
+ error: R["error"];
464
+ } : R["min"]> & MaxLength<R extends {
465
+ error: string;
466
+ } ? {
467
+ value: R["max"];
468
+ error: R["error"];
469
+ } : R["max"]>;
470
+ /** Alias for Minimum. `Min<0>` = `Minimum<0>` */
471
+ type Min<N extends number | {
472
+ value: number;
473
+ error?: string;
474
+ }> = Minimum<N>;
475
+ /** Alias for Maximum. `Max<100>` = `Maximum<100>` */
476
+ type Max<N extends number | {
477
+ value: number;
478
+ error?: string;
479
+ }> = Maximum<N>;
480
+ /** Alias for ExclusiveMinimum. `Gt<0>` = "greater than 0" */
481
+ type Gt<N extends number | {
482
+ value: number;
483
+ error?: string;
484
+ }> = ExclusiveMinimum<N>;
485
+ /** Alias for ExclusiveMaximum. `Lt<100>` = "less than 100" */
486
+ type Lt<N extends number | {
487
+ value: number;
488
+ error?: string;
489
+ }> = ExclusiveMaximum<N>;
490
+ /** Alias for Minimum + ExclusiveMinimum combo. `Gte<0>` = `Min<0>` */
491
+ type Gte<N extends number | {
492
+ value: number;
493
+ error?: string;
494
+ }> = Minimum<N>;
495
+ /** Alias for Maximum + ExclusiveMaximum combo. `Lte<100>` = `Max<100>` */
496
+ type Lte<N extends number | {
497
+ value: number;
498
+ error?: string;
499
+ }> = Maximum<N>;
500
+ /** Alias for MultipleOf. `Step<0.01>` */
501
+ type Step<N extends number | {
502
+ value: number;
503
+ error?: string;
504
+ }> = MultipleOf<N>;
505
+ /** Alias for UniqueItems. `Unique` */
506
+ type Unique<C extends {
507
+ error?: string;
508
+ } = {}> = UniqueItems<C>;
509
+ type Email = Format<"email">;
510
+ type Uuid = Format<"uuid">;
511
+ type Url = Format<"url">;
512
+ type Uri = Format<"uri">;
513
+ type IPv4 = Format<"ipv4">;
514
+ type IPv6 = Format<"ipv6">;
515
+ type DateTime = Format<"date-time">;
516
+ type DateOnly = Format<"date">;
517
+ type Time = Format<"time">;
518
+ type Duration = Format<"duration">;
519
+ type Jwt = Format<"jwt">;
520
+ type Ulid = Format<"ulid">;
521
+ type Cuid = Format<"cuid">;
522
+ type Cuid2 = Format<"cuid2">;
523
+ type NanoId = Format<"nanoid">;
524
+ /** number & Gt<0> */
525
+ type Positive = ExclusiveMinimum<0>;
526
+ /** number & Lt<0> */
527
+ type Negative = ExclusiveMaximum<0>;
528
+ /** number & Min<0> */
529
+ type NonNegative = Minimum<0>;
530
+ /** number & Max<0> */
531
+ type NonPositive = Maximum<0>;
532
+ /** number & Type<"int32"> */
533
+ type Int = Type<"int32">;
534
+ /** number & Type<"int64"> (JS safe integer range) */
535
+ type SafeInt = Type<"int64">;
536
+ /** number & Type<"float"> (finite, no Infinity/NaN) */
537
+ type Finite = Type<"float">;
538
+ /** number & Type<"uint32"> */
539
+ type Uint = Type<"uint32">;
540
+ /** number & Type<"double"> */
541
+ type Double = Type<"double">;
542
+ //#endregion
543
+ export { Type as $, MaxItems as A, NonNegative as B, Int as C, Lt as D, Lowercase as E, MinLength as F, Range as G, NumericTypeValue as H, Minimum as I, Step as J, SafeInt as K, MultipleOf as L, Maximum as M, Min as N, Lte as O, MinItems as P, Trim as Q, NanoId as R, Includes as S, Length as T, Pattern as U, NonPositive as V, Positive as W, ToLowerCase as X, Time as Y, ToUpperCase as Z, FormatValue as _, DateOnly as a, Uri as at, IPv4 as b, Double as c, Validate as ct, EndsWith as d, Uint as et, Error as f, Format as g, Finite as h, Cuid2 as i, Uppercase as it, MaxLength as j, Max as k, Duration as l, tags_d_exports as lt, ExclusiveMinimum as m, Coerce as n, Unique as nt, DateTime as o, Url as ot, ExclusiveMaximum as p, StartsWith as q, Cuid as r, UniqueItems as rt, Default as s, Uuid as st, Between as t, Ulid as tt, Email as u, Gt as v, Jwt as w, IPv6 as x, Gte as y, Negative as z };
544
+ //# sourceMappingURL=tags-Bjy_mpjh.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags-Bjy_mpjh.d.cts","names":[],"sources":["../src/tags.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAoDY,WAAA;;;;;;;;KA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KACN,IAAA,GAAO,MAAA;AAAA,KACP,IAAA,GAAO,MAAA;AAAA,KACP,QAAA,GAAW,MAAA;AAAA,KACX,QAAA,GAAW,MAAA;AAAA,KACX,IAAA,GAAO,MAAA;AAAA,KACP,QAAA,GAAW,MAAA;AAAA,KACX,GAAA,GAAM,MAAA;AAAA,KACN,IAAA,GAAO,MAAA;AAAA,KACP,IAAA,GAAO,MAAA;AAAA,KACP,KAAA,GAAQ,MAAA;AAAA,KACR,MAAA,GAAS,MAAA;AAnLrB;AAAA,KA0LY,QAAA,GAAW,gBAAA;;KAGX,QAAA,GAAW,gBAAA;;KAGX,WAAA,GAAc,OAAA;;KAGd,WAAA,GAAc,OAAA;;KAGd,GAAA,GAAM,IAAA;;KAGN,OAAA,GAAU,IAAA;;KAGV,MAAA,GAAS,IAAA;;KAGT,IAAA,GAAO,IAAA;;KAGP,MAAA,GAAS,IAAA"}
package/dist/tags.cjs CHANGED
@@ -1,29 +1,22 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __defProp = Object.defineProperty;
4
4
  var __exportAll = (all, no_symbols) => {
5
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
- }
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
15
11
  return target;
16
12
  };
17
-
18
13
  //#endregion
19
-
20
14
  //#region src/tags.ts
21
15
  var tags_exports = /* @__PURE__ */ __exportAll({});
22
-
23
16
  //#endregion
24
- Object.defineProperty(exports, 'tags_exports', {
25
- enumerable: true,
26
- get: function () {
27
- return tags_exports;
28
- }
29
- });
17
+ Object.defineProperty(exports, "tags_exports", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return tags_exports;
21
+ }
22
+ });
package/dist/tags.d.cts CHANGED
@@ -1,544 +1,2 @@
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
- }
4
- /**
5
- * @tsgonest/types — Zero-runtime branded types for type-safe validation.
6
- *
7
- * These types exist purely at compile time. They produce NO runtime code.
8
- * The tsgonest compiler reads phantom properties (`__tsgonest_*`) to generate validators.
9
- *
10
- * All phantom properties are optional (`?`) so that branded types remain
11
- * assignable from their base types (e.g. `string` → `string & Email`).
12
- * This follows the same pattern as typia's optional `"typia.tag"` property.
13
- *
14
- * Every constraint supports two forms:
15
- * - Simple: Min<0> — clean, no custom error
16
- * - Extended: Min<{value: 0, error: "Must be positive"}> — with per-constraint error
17
- *
18
- * @example
19
- * import { Email, Min, Max, Trim, Coerce } from "@tsgonest/types";
20
- *
21
- * interface CreateUserDto {
22
- * email: string & Email;
23
- * name: string & Trim & Min<1> & Max<255>;
24
- * age: number & Min<0> & Max<150>;
25
- * }
26
- *
27
- * // With per-constraint errors:
28
- * interface StrictDto {
29
- * email: string & Format<{type: "email", error: "Must be a valid email"}>;
30
- * age: number & Min<{value: 0, error: "Age cannot be negative"}>;
31
- * }
32
- *
33
- * // Query params with coercion:
34
- * interface QueryDto {
35
- * page: number & Coerce;
36
- * active: boolean & Coerce;
37
- * }
38
- */
39
- /** All supported string format values. */
40
- 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";
41
- /**
42
- * Validate a string matches a specific format.
43
- *
44
- * @example
45
- * Format<"email">
46
- * Format<{type: "email", error: "Must be a valid email"}>
47
- */
48
- type Format<F extends FormatValue | {
49
- type: FormatValue;
50
- error?: string;
51
- }> = F extends {
52
- type: infer V;
53
- error: infer E extends string;
54
- } ? {
55
- readonly __tsgonest_format?: V;
56
- readonly __tsgonest_format_error?: E;
57
- } : {
58
- readonly __tsgonest_format?: F extends {
59
- type: infer V;
60
- } ? V : F;
61
- };
62
- /**
63
- * Minimum string length.
64
- * @example MinLength<1> or MinLength<{value: 1, error: "Cannot be empty"}>
65
- */
66
- type MinLength<N extends number | {
67
- value: number;
68
- error?: string;
69
- }> = N extends {
70
- value: infer V extends number;
71
- error: infer E extends string;
72
- } ? {
73
- readonly __tsgonest_minLength?: V;
74
- readonly __tsgonest_minLength_error?: E;
75
- } : {
76
- readonly __tsgonest_minLength?: N extends {
77
- value: infer V;
78
- } ? V : N;
79
- };
80
- /**
81
- * Maximum string length.
82
- * @example MaxLength<255> or MaxLength<{value: 255, error: "Too long"}>
83
- */
84
- type MaxLength<N extends number | {
85
- value: number;
86
- error?: string;
87
- }> = N extends {
88
- value: infer V extends number;
89
- error: infer E extends string;
90
- } ? {
91
- readonly __tsgonest_maxLength?: V;
92
- readonly __tsgonest_maxLength_error?: E;
93
- } : {
94
- readonly __tsgonest_maxLength?: N extends {
95
- value: infer V;
96
- } ? V : N;
97
- };
98
- /**
99
- * Regex pattern constraint.
100
- * @example Pattern<"^[a-z]+$"> or Pattern<{value: "^[a-z]+$", error: "Letters only"}>
101
- */
102
- type Pattern<P extends string | {
103
- value: string;
104
- error?: string;
105
- }> = P extends {
106
- value: infer V extends string;
107
- error: infer E extends string;
108
- } ? {
109
- readonly __tsgonest_pattern?: V;
110
- readonly __tsgonest_pattern_error?: E;
111
- } : {
112
- readonly __tsgonest_pattern?: P extends {
113
- value: infer V;
114
- } ? V : P;
115
- };
116
- /**
117
- * String must start with prefix.
118
- * @example StartsWith<"https://">
119
- */
120
- type StartsWith<S extends string | {
121
- value: string;
122
- error?: string;
123
- }> = S extends {
124
- value: infer V extends string;
125
- error: infer E extends string;
126
- } ? {
127
- readonly __tsgonest_startsWith?: V;
128
- readonly __tsgonest_startsWith_error?: E;
129
- } : {
130
- readonly __tsgonest_startsWith?: S extends {
131
- value: infer V;
132
- } ? V : S;
133
- };
134
- /**
135
- * String must end with suffix.
136
- * @example EndsWith<".json">
137
- */
138
- type EndsWith<S extends string | {
139
- value: string;
140
- error?: string;
141
- }> = S extends {
142
- value: infer V extends string;
143
- error: infer E extends string;
144
- } ? {
145
- readonly __tsgonest_endsWith?: V;
146
- readonly __tsgonest_endsWith_error?: E;
147
- } : {
148
- readonly __tsgonest_endsWith?: S extends {
149
- value: infer V;
150
- } ? V : S;
151
- };
152
- /**
153
- * String must contain substring.
154
- * @example Includes<"@">
155
- */
156
- type Includes<S extends string | {
157
- value: string;
158
- error?: string;
159
- }> = S extends {
160
- value: infer V extends string;
161
- error: infer E extends string;
162
- } ? {
163
- readonly __tsgonest_includes?: V;
164
- readonly __tsgonest_includes_error?: E;
165
- } : {
166
- readonly __tsgonest_includes?: S extends {
167
- value: infer V;
168
- } ? V : S;
169
- };
170
- /**
171
- * Minimum value (inclusive): value >= N.
172
- * @example Minimum<0> or Min<0> or Min<{value: 0, error: "Must be non-negative"}>
173
- */
174
- type Minimum<N extends number | {
175
- value: number;
176
- error?: string;
177
- }> = N extends {
178
- value: infer V extends number;
179
- error: infer E extends string;
180
- } ? {
181
- readonly __tsgonest_minimum?: V;
182
- readonly __tsgonest_minimum_error?: E;
183
- } : {
184
- readonly __tsgonest_minimum?: N extends {
185
- value: infer V;
186
- } ? V : N;
187
- };
188
- /**
189
- * Maximum value (inclusive): value <= N.
190
- * @example Maximum<100> or Max<100>
191
- */
192
- type Maximum<N extends number | {
193
- value: number;
194
- error?: string;
195
- }> = N extends {
196
- value: infer V extends number;
197
- error: infer E extends string;
198
- } ? {
199
- readonly __tsgonest_maximum?: V;
200
- readonly __tsgonest_maximum_error?: E;
201
- } : {
202
- readonly __tsgonest_maximum?: N extends {
203
- value: infer V;
204
- } ? V : N;
205
- };
206
- /**
207
- * Exclusive minimum: value > N.
208
- * @example ExclusiveMinimum<0> or Gt<0>
209
- */
210
- type ExclusiveMinimum<N extends number | {
211
- value: number;
212
- error?: string;
213
- }> = N extends {
214
- value: infer V extends number;
215
- error: infer E extends string;
216
- } ? {
217
- readonly __tsgonest_exclusiveMinimum?: V;
218
- readonly __tsgonest_exclusiveMinimum_error?: E;
219
- } : {
220
- readonly __tsgonest_exclusiveMinimum?: N extends {
221
- value: infer V;
222
- } ? V : N;
223
- };
224
- /**
225
- * Exclusive maximum: value < N.
226
- * @example ExclusiveMaximum<100> or Lt<100>
227
- */
228
- type ExclusiveMaximum<N extends number | {
229
- value: number;
230
- error?: string;
231
- }> = N extends {
232
- value: infer V extends number;
233
- error: infer E extends string;
234
- } ? {
235
- readonly __tsgonest_exclusiveMaximum?: V;
236
- readonly __tsgonest_exclusiveMaximum_error?: E;
237
- } : {
238
- readonly __tsgonest_exclusiveMaximum?: N extends {
239
- value: infer V;
240
- } ? V : N;
241
- };
242
- /**
243
- * Value must be a multiple of N.
244
- * @example MultipleOf<2> or Step<0.01>
245
- */
246
- type MultipleOf<N extends number | {
247
- value: number;
248
- error?: string;
249
- }> = N extends {
250
- value: infer V extends number;
251
- error: infer E extends string;
252
- } ? {
253
- readonly __tsgonest_multipleOf?: V;
254
- readonly __tsgonest_multipleOf_error?: E;
255
- } : {
256
- readonly __tsgonest_multipleOf?: N extends {
257
- value: infer V;
258
- } ? V : N;
259
- };
260
- /** Valid numeric type values. */
261
- type NumericTypeValue = "int32" | "uint32" | "int64" | "uint64" | "float" | "double";
262
- /**
263
- * Constrain number to a specific numeric type.
264
- * @example Type<"int32"> or Type<{type: "int32", error: "Must be integer"}>
265
- */
266
- type Type<T extends NumericTypeValue | {
267
- type: NumericTypeValue;
268
- error?: string;
269
- }> = T extends {
270
- type: infer V;
271
- error: infer E extends string;
272
- } ? {
273
- readonly __tsgonest_type?: V;
274
- readonly __tsgonest_type_error?: E;
275
- } : {
276
- readonly __tsgonest_type?: T extends {
277
- type: infer V;
278
- } ? V : T;
279
- };
280
- /**
281
- * Minimum array length.
282
- * @example MinItems<1>
283
- */
284
- type MinItems<N extends number | {
285
- value: number;
286
- error?: string;
287
- }> = N extends {
288
- value: infer V extends number;
289
- error: infer E extends string;
290
- } ? {
291
- readonly __tsgonest_minItems?: V;
292
- readonly __tsgonest_minItems_error?: E;
293
- } : {
294
- readonly __tsgonest_minItems?: N extends {
295
- value: infer V;
296
- } ? V : N;
297
- };
298
- /**
299
- * Maximum array length.
300
- * @example MaxItems<100>
301
- */
302
- type MaxItems<N extends number | {
303
- value: number;
304
- error?: string;
305
- }> = N extends {
306
- value: infer V extends number;
307
- error: infer E extends string;
308
- } ? {
309
- readonly __tsgonest_maxItems?: V;
310
- readonly __tsgonest_maxItems_error?: E;
311
- } : {
312
- readonly __tsgonest_maxItems?: N extends {
313
- value: infer V;
314
- } ? V : N;
315
- };
316
- /**
317
- * Array items must be unique.
318
- * @example UniqueItems or Unique or Unique<{error: "No duplicates"}>
319
- */
320
- type UniqueItems<C extends {
321
- error?: string;
322
- } = {}> = C extends {
323
- error: infer E extends string;
324
- } ? {
325
- readonly __tsgonest_uniqueItems?: true;
326
- readonly __tsgonest_uniqueItems_error?: E;
327
- } : {
328
- readonly __tsgonest_uniqueItems?: true;
329
- };
330
- /**
331
- * String must be all uppercase.
332
- * @example Uppercase or Uppercase<{error: "Must be uppercase"}>
333
- */
334
- type Uppercase<C extends {
335
- error?: string;
336
- } = {}> = C extends {
337
- error: infer E extends string;
338
- } ? {
339
- readonly __tsgonest_uppercase?: true;
340
- readonly __tsgonest_uppercase_error?: E;
341
- } : {
342
- readonly __tsgonest_uppercase?: true;
343
- };
344
- /**
345
- * String must be all lowercase.
346
- * @example Lowercase or Lowercase<{error: "Must be lowercase"}>
347
- */
348
- type Lowercase<C extends {
349
- error?: string;
350
- } = {}> = C extends {
351
- error: infer E extends string;
352
- } ? {
353
- readonly __tsgonest_lowercase?: true;
354
- readonly __tsgonest_lowercase_error?: E;
355
- } : {
356
- readonly __tsgonest_lowercase?: true;
357
- };
358
- /** Trim whitespace before validation. */
359
- type Trim = {
360
- readonly __tsgonest_transform_trim?: true;
361
- };
362
- /** Convert to lowercase before validation. */
363
- type ToLowerCase = {
364
- readonly __tsgonest_transform_toLowerCase?: true;
365
- };
366
- /** Convert to uppercase before validation. */
367
- type ToUpperCase = {
368
- readonly __tsgonest_transform_toUpperCase?: true;
369
- };
370
- /**
371
- * Coerce string inputs to the declared type before validation.
372
- * - "123" → 123 (string to number)
373
- * - "true"/"false" → true/false (string to boolean)
374
- *
375
- * @example
376
- * page: number & Coerce
377
- * active: boolean & Coerce
378
- */
379
- type Coerce = {
380
- readonly __tsgonest_coerce?: true;
381
- };
382
- /**
383
- * Validate using a custom function. The function must be a predicate:
384
- * `(value: T) => boolean`. tsgonest resolves the function's source file
385
- * and emits an import + call in the generated validator.
386
- *
387
- * @example
388
- * import { isValidCard } from "./validators/credit-card";
389
- *
390
- * interface PaymentDto {
391
- * card: string & Validate<typeof isValidCard>;
392
- * card: string & Validate<{fn: typeof isValidCard, error: "Invalid card"}>;
393
- * }
394
- */
395
- type Validate<F extends ((...args: any[]) => boolean) | {
396
- fn: (...args: any[]) => boolean;
397
- error?: string;
398
- }> = F extends {
399
- fn: infer Fn;
400
- error: infer E extends string;
401
- } ? {
402
- readonly __tsgonest_validate?: Fn;
403
- readonly __tsgonest_validate_error?: E;
404
- } : {
405
- readonly __tsgonest_validate?: F extends {
406
- fn: infer Fn;
407
- } ? Fn : F;
408
- };
409
- /**
410
- * Global error message — applies to all validation failures on this property.
411
- * Per-constraint errors (via `error` field) take precedence.
412
- * @example string & Format<"email"> & Error<"Invalid email">
413
- */
414
- type Error<M extends string> = {
415
- readonly __tsgonest_error?: M;
416
- };
417
- /**
418
- * Default value for optional properties. Assigned when value is undefined.
419
- * @example theme?: string & Default<"light">
420
- */
421
- type Default<V extends string | number | boolean> = {
422
- readonly __tsgonest_default?: V;
423
- };
424
- /**
425
- * Exact length (sets both MinLength and MaxLength).
426
- * @example Length<2> or Length<{value: 2, error: "Must be exactly 2 chars"}>
427
- */
428
- type Length<N extends number | {
429
- value: number;
430
- error?: string;
431
- }> = MinLength<N> & MaxLength<N>;
432
- /**
433
- * Numeric range (inclusive). Sets Minimum and Maximum.
434
- * @example Range<{min: 0, max: 100}> or Range<{min: 0, max: 100, error: "Out of range"}>
435
- */
436
- type Range<R extends {
437
- min: number;
438
- max: number;
439
- error?: string;
440
- }> = Minimum<R extends {
441
- error: string;
442
- } ? {
443
- value: R["min"];
444
- error: R["error"];
445
- } : R["min"]> & Maximum<R extends {
446
- error: string;
447
- } ? {
448
- value: R["max"];
449
- error: R["error"];
450
- } : R["max"]>;
451
- /**
452
- * String length range. Sets MinLength and MaxLength.
453
- * @example Between<{min: 1, max: 255}> or Between<{min: 1, max: 255, error: "Bad length"}>
454
- */
455
- type Between<R extends {
456
- min: number;
457
- max: number;
458
- error?: string;
459
- }> = MinLength<R extends {
460
- error: string;
461
- } ? {
462
- value: R["min"];
463
- error: R["error"];
464
- } : R["min"]> & MaxLength<R extends {
465
- error: string;
466
- } ? {
467
- value: R["max"];
468
- error: R["error"];
469
- } : R["max"]>;
470
- /** Alias for Minimum. `Min<0>` = `Minimum<0>` */
471
- type Min<N extends number | {
472
- value: number;
473
- error?: string;
474
- }> = Minimum<N>;
475
- /** Alias for Maximum. `Max<100>` = `Maximum<100>` */
476
- type Max<N extends number | {
477
- value: number;
478
- error?: string;
479
- }> = Maximum<N>;
480
- /** Alias for ExclusiveMinimum. `Gt<0>` = "greater than 0" */
481
- type Gt<N extends number | {
482
- value: number;
483
- error?: string;
484
- }> = ExclusiveMinimum<N>;
485
- /** Alias for ExclusiveMaximum. `Lt<100>` = "less than 100" */
486
- type Lt<N extends number | {
487
- value: number;
488
- error?: string;
489
- }> = ExclusiveMaximum<N>;
490
- /** Alias for Minimum + ExclusiveMinimum combo. `Gte<0>` = `Min<0>` */
491
- type Gte<N extends number | {
492
- value: number;
493
- error?: string;
494
- }> = Minimum<N>;
495
- /** Alias for Maximum + ExclusiveMaximum combo. `Lte<100>` = `Max<100>` */
496
- type Lte<N extends number | {
497
- value: number;
498
- error?: string;
499
- }> = Maximum<N>;
500
- /** Alias for MultipleOf. `Step<0.01>` */
501
- type Step<N extends number | {
502
- value: number;
503
- error?: string;
504
- }> = MultipleOf<N>;
505
- /** Alias for UniqueItems. `Unique` */
506
- type Unique<C extends {
507
- error?: string;
508
- } = {}> = UniqueItems<C>;
509
- type Email = Format<"email">;
510
- type Uuid = Format<"uuid">;
511
- type Url = Format<"url">;
512
- type Uri = Format<"uri">;
513
- type IPv4 = Format<"ipv4">;
514
- type IPv6 = Format<"ipv6">;
515
- type DateTime = Format<"date-time">;
516
- type DateOnly = Format<"date">;
517
- type Time = Format<"time">;
518
- type Duration = Format<"duration">;
519
- type Jwt = Format<"jwt">;
520
- type Ulid = Format<"ulid">;
521
- type Cuid = Format<"cuid">;
522
- type Cuid2 = Format<"cuid2">;
523
- type NanoId = Format<"nanoid">;
524
- /** number & Gt<0> */
525
- type Positive = ExclusiveMinimum<0>;
526
- /** number & Lt<0> */
527
- type Negative = ExclusiveMaximum<0>;
528
- /** number & Min<0> */
529
- type NonNegative = Minimum<0>;
530
- /** number & Max<0> */
531
- type NonPositive = Maximum<0>;
532
- /** number & Type<"int32"> */
533
- type Int = Type<"int32">;
534
- /** number & Type<"int64"> (JS safe integer range) */
535
- type SafeInt = Type<"int64">;
536
- /** number & Type<"float"> (finite, no Infinity/NaN) */
537
- type Finite = Type<"float">;
538
- /** number & Type<"uint32"> */
539
- type Uint = Type<"uint32">;
540
- /** number & Type<"double"> */
541
- type Double = Type<"double">;
542
- //#endregion
543
- 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, tags_d_exports as t };
544
- //# sourceMappingURL=tags.d.cts.map
1
+ import { $ as Type, A as MaxItems, B as NonNegative, C as Int, D as Lt, E as Lowercase, F as MinLength, G as Range, H as NumericTypeValue, I as Minimum, J as Step, K as SafeInt, L as MultipleOf, M as Maximum, N as Min, O as Lte, P as MinItems, Q as Trim, R as NanoId, S as Includes, T as Length, U as Pattern, V as NonPositive, W as Positive, X as ToLowerCase, Y as Time, Z as ToUpperCase, _ as FormatValue, a as DateOnly, at as Uri, b as IPv4, c as Double, ct as Validate, d as EndsWith, et as Uint, f as Error, g as Format, h as Finite, i as Cuid2, it as Uppercase, j as MaxLength, k as Max, l as Duration, m as ExclusiveMinimum, n as Coerce, nt as Unique, o as DateTime, ot as Url, p as ExclusiveMaximum, q as StartsWith, r as Cuid, rt as UniqueItems, s as Default, st as Uuid, t as Between, tt as Ulid, u as Email, v as Gt, w as Jwt, x as IPv6, y as Gte, z as Negative } from "./tags-Bjy_mpjh.cjs";
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 };
package/dist/tags.mjs CHANGED
@@ -1,8 +1,7 @@
1
- import { t as __exportAll } from "./chunk-DQk6qfdC.mjs";
2
-
1
+ import { t as __exportAll } from "./chunk-CfYAbeIz.mjs";
3
2
  //#region src/tags.ts
4
3
  var tags_exports = /* @__PURE__ */ __exportAll({});
5
-
6
4
  //#endregion
7
5
  export { tags_exports as t };
6
+
8
7
  //# sourceMappingURL=tags.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsgonest/types",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
4
4
  "description": "Zero-runtime branded types for tsgonest validation constraints — type-safe alternative to JSDoc tags",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -45,7 +45,7 @@
45
45
  "url": "https://github.com/tsgonest/tsgonest"
46
46
  },
47
47
  "devDependencies": {
48
- "tsdown": "^0.20.3",
48
+ "tsdown": "^0.21.4",
49
49
  "typescript": "^5.7.0"
50
50
  },
51
51
  "scripts": {
@@ -1,18 +0,0 @@
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 };
@@ -1 +0,0 @@
1
- {"version":3,"file":"tags.d.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