@tsgonest/types 0.2.3 → 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,421 @@
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
+ * Every constraint supports two forms:
11
+ * - Simple: Min<0> — clean, no custom error
12
+ * - Extended: Min<{value: 0, error: "Must be positive"}> — with per-constraint error
13
+ *
14
+ * @example
15
+ * import { Email, Min, Max, Trim, Coerce } from "@tsgonest/types";
16
+ *
17
+ * interface CreateUserDto {
18
+ * email: string & Email;
19
+ * name: string & Trim & Min<1> & Max<255>;
20
+ * age: number & Min<0> & Max<150>;
21
+ * }
22
+ *
23
+ * // With per-constraint errors:
24
+ * interface StrictDto {
25
+ * email: string & Format<{type: "email", error: "Must be a valid email"}>;
26
+ * age: number & Min<{value: 0, error: "Age cannot be negative"}>;
27
+ * }
28
+ *
29
+ * // Query params with coercion:
30
+ * interface QueryDto {
31
+ * page: number & Coerce;
32
+ * active: boolean & Coerce;
33
+ * }
34
+ */
35
+ /** Extract the value from a dual-form number constraint. */
36
+ type NumVal<N extends number | {
37
+ value: number;
38
+ error?: string;
39
+ }> = N extends {
40
+ value: infer V;
41
+ } ? V : N;
42
+ /** Extract the value from a dual-form string constraint. */
43
+ type StrVal<S extends string | {
44
+ value: string;
45
+ error?: string;
46
+ }> = S extends {
47
+ value: infer V;
48
+ } ? V : S;
49
+ /** Extract the type from a dual-form type constraint (Format, Type). */
50
+ type TypeVal<T, Base> = T extends {
51
+ type: infer V;
52
+ } ? V : T;
53
+ /** Conditionally add a _error phantom property. */
54
+ type WithErr<Prefix extends string, C> = C extends {
55
+ error: infer E extends string;
56
+ } ? { readonly [K in `${Prefix}_error`]: E } : {};
57
+ /** All supported string format values. */
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";
59
+ /**
60
+ * Validate a string matches a specific format.
61
+ *
62
+ * @example
63
+ * Format<"email">
64
+ * Format<{type: "email", error: "Must be a valid email"}>
65
+ */
66
+ type Format<F extends FormatValue | {
67
+ type: FormatValue;
68
+ error?: string;
69
+ }> = {
70
+ readonly __tsgonest_format: TypeVal<F, FormatValue>;
71
+ } & WithErr<"__tsgonest_format", F>;
72
+ /**
73
+ * Minimum string length.
74
+ * @example MinLength<1> or MinLength<{value: 1, error: "Cannot be empty"}>
75
+ */
76
+ type MinLength<N extends number | {
77
+ value: number;
78
+ error?: string;
79
+ }> = {
80
+ readonly __tsgonest_minLength: NumVal<N>;
81
+ } & WithErr<"__tsgonest_minLength", N>;
82
+ /**
83
+ * Maximum string length.
84
+ * @example MaxLength<255> or MaxLength<{value: 255, error: "Too long"}>
85
+ */
86
+ type MaxLength<N extends number | {
87
+ value: number;
88
+ error?: string;
89
+ }> = {
90
+ readonly __tsgonest_maxLength: NumVal<N>;
91
+ } & WithErr<"__tsgonest_maxLength", N>;
92
+ /**
93
+ * Regex pattern constraint.
94
+ * @example Pattern<"^[a-z]+$"> or Pattern<{value: "^[a-z]+$", error: "Letters only"}>
95
+ */
96
+ type Pattern<P extends string | {
97
+ value: string;
98
+ error?: string;
99
+ }> = {
100
+ readonly __tsgonest_pattern: StrVal<P>;
101
+ } & WithErr<"__tsgonest_pattern", P>;
102
+ /**
103
+ * String must start with prefix.
104
+ * @example StartsWith<"https://">
105
+ */
106
+ type StartsWith<S extends string | {
107
+ value: string;
108
+ error?: string;
109
+ }> = {
110
+ readonly __tsgonest_startsWith: StrVal<S>;
111
+ } & WithErr<"__tsgonest_startsWith", S>;
112
+ /**
113
+ * String must end with suffix.
114
+ * @example EndsWith<".json">
115
+ */
116
+ type EndsWith<S extends string | {
117
+ value: string;
118
+ error?: string;
119
+ }> = {
120
+ readonly __tsgonest_endsWith: StrVal<S>;
121
+ } & WithErr<"__tsgonest_endsWith", S>;
122
+ /**
123
+ * String must contain substring.
124
+ * @example Includes<"@">
125
+ */
126
+ type Includes<S extends string | {
127
+ value: string;
128
+ error?: string;
129
+ }> = {
130
+ readonly __tsgonest_includes: StrVal<S>;
131
+ } & WithErr<"__tsgonest_includes", S>;
132
+ /**
133
+ * Minimum value (inclusive): value >= N.
134
+ * @example Minimum<0> or Min<0> or Min<{value: 0, error: "Must be non-negative"}>
135
+ */
136
+ type Minimum<N extends number | {
137
+ value: number;
138
+ error?: string;
139
+ }> = {
140
+ readonly __tsgonest_minimum: NumVal<N>;
141
+ } & WithErr<"__tsgonest_minimum", N>;
142
+ /**
143
+ * Maximum value (inclusive): value <= N.
144
+ * @example Maximum<100> or Max<100>
145
+ */
146
+ type Maximum<N extends number | {
147
+ value: number;
148
+ error?: string;
149
+ }> = {
150
+ readonly __tsgonest_maximum: NumVal<N>;
151
+ } & WithErr<"__tsgonest_maximum", N>;
152
+ /**
153
+ * Exclusive minimum: value > N.
154
+ * @example ExclusiveMinimum<0> or Gt<0>
155
+ */
156
+ type ExclusiveMinimum<N extends number | {
157
+ value: number;
158
+ error?: string;
159
+ }> = {
160
+ readonly __tsgonest_exclusiveMinimum: NumVal<N>;
161
+ } & WithErr<"__tsgonest_exclusiveMinimum", N>;
162
+ /**
163
+ * Exclusive maximum: value < N.
164
+ * @example ExclusiveMaximum<100> or Lt<100>
165
+ */
166
+ type ExclusiveMaximum<N extends number | {
167
+ value: number;
168
+ error?: string;
169
+ }> = {
170
+ readonly __tsgonest_exclusiveMaximum: NumVal<N>;
171
+ } & WithErr<"__tsgonest_exclusiveMaximum", N>;
172
+ /**
173
+ * Value must be a multiple of N.
174
+ * @example MultipleOf<2> or Step<0.01>
175
+ */
176
+ type MultipleOf<N extends number | {
177
+ value: number;
178
+ error?: string;
179
+ }> = {
180
+ readonly __tsgonest_multipleOf: NumVal<N>;
181
+ } & WithErr<"__tsgonest_multipleOf", N>;
182
+ /** Valid numeric type values. */
183
+ type NumericTypeValue = "int32" | "uint32" | "int64" | "uint64" | "float" | "double";
184
+ /**
185
+ * Constrain number to a specific numeric type.
186
+ * @example Type<"int32"> or Type<{type: "int32", error: "Must be integer"}>
187
+ */
188
+ type Type<T extends NumericTypeValue | {
189
+ type: NumericTypeValue;
190
+ error?: string;
191
+ }> = {
192
+ readonly __tsgonest_type: TypeVal<T, NumericTypeValue>;
193
+ } & WithErr<"__tsgonest_type", T>;
194
+ /**
195
+ * Minimum array length.
196
+ * @example MinItems<1>
197
+ */
198
+ type MinItems<N extends number | {
199
+ value: number;
200
+ error?: string;
201
+ }> = {
202
+ readonly __tsgonest_minItems: NumVal<N>;
203
+ } & WithErr<"__tsgonest_minItems", N>;
204
+ /**
205
+ * Maximum array length.
206
+ * @example MaxItems<100>
207
+ */
208
+ type MaxItems<N extends number | {
209
+ value: number;
210
+ error?: string;
211
+ }> = {
212
+ readonly __tsgonest_maxItems: NumVal<N>;
213
+ } & WithErr<"__tsgonest_maxItems", N>;
214
+ /**
215
+ * Array items must be unique.
216
+ * @example UniqueItems or Unique or Unique<{error: "No duplicates"}>
217
+ */
218
+ type UniqueItems<C extends {
219
+ error?: string;
220
+ } = {}> = {
221
+ readonly __tsgonest_uniqueItems: true;
222
+ } & WithErr<"__tsgonest_uniqueItems", C>;
223
+ /**
224
+ * String must be all uppercase.
225
+ * @example Uppercase or Uppercase<{error: "Must be uppercase"}>
226
+ */
227
+ type Uppercase<C extends {
228
+ error?: string;
229
+ } = {}> = {
230
+ readonly __tsgonest_uppercase: true;
231
+ } & WithErr<"__tsgonest_uppercase", C>;
232
+ /**
233
+ * String must be all lowercase.
234
+ * @example Lowercase or Lowercase<{error: "Must be lowercase"}>
235
+ */
236
+ type Lowercase<C extends {
237
+ error?: string;
238
+ } = {}> = {
239
+ readonly __tsgonest_lowercase: true;
240
+ } & WithErr<"__tsgonest_lowercase", C>;
241
+ /** Trim whitespace before validation. */
242
+ type Trim = {
243
+ readonly __tsgonest_transform_trim: true;
244
+ };
245
+ /** Convert to lowercase before validation. */
246
+ type ToLowerCase = {
247
+ readonly __tsgonest_transform_toLowerCase: true;
248
+ };
249
+ /** Convert to uppercase before validation. */
250
+ type ToUpperCase = {
251
+ readonly __tsgonest_transform_toUpperCase: true;
252
+ };
253
+ /**
254
+ * Coerce string inputs to the declared type before validation.
255
+ * - "123" → 123 (string to number)
256
+ * - "true"/"false" → true/false (string to boolean)
257
+ *
258
+ * @example
259
+ * page: number & Coerce
260
+ * active: boolean & Coerce
261
+ */
262
+ type Coerce = {
263
+ readonly __tsgonest_coerce: true;
264
+ };
265
+ /**
266
+ * Validate using a custom function. The function must be a predicate:
267
+ * `(value: T) => boolean`. tsgonest resolves the function's source file
268
+ * and emits an import + call in the generated validator.
269
+ *
270
+ * @example
271
+ * import { isValidCard } from "./validators/credit-card";
272
+ *
273
+ * interface PaymentDto {
274
+ * card: string & Validate<typeof isValidCard>;
275
+ * card: string & Validate<{fn: typeof isValidCard, error: "Invalid card"}>;
276
+ * }
277
+ */
278
+ type Validate<F extends ((...args: any[]) => boolean) | {
279
+ fn: (...args: any[]) => boolean;
280
+ error?: string;
281
+ }> = {
282
+ readonly __tsgonest_validate: F extends {
283
+ fn: infer Fn;
284
+ } ? Fn : F;
285
+ } & WithErr<"__tsgonest_validate", F>;
286
+ /**
287
+ * Global error message — applies to all validation failures on this property.
288
+ * Per-constraint errors (via `error` field) take precedence.
289
+ * @example string & Format<"email"> & Error<"Invalid email">
290
+ */
291
+ type Error<M extends string> = {
292
+ readonly __tsgonest_error: M;
293
+ };
294
+ /**
295
+ * Default value for optional properties. Assigned when value is undefined.
296
+ * @example theme?: string & Default<"light">
297
+ */
298
+ type Default<V extends string | number | boolean> = {
299
+ readonly __tsgonest_default: V;
300
+ };
301
+ /**
302
+ * Exact length (sets both MinLength and MaxLength).
303
+ * @example Length<2> or Length<{value: 2, error: "Must be exactly 2 chars"}>
304
+ */
305
+ type Length<N extends number | {
306
+ value: number;
307
+ error?: string;
308
+ }> = MinLength<N> & MaxLength<N>;
309
+ /**
310
+ * Numeric range (inclusive). Sets Minimum and Maximum.
311
+ * @example Range<{min: 0, max: 100}> or Range<{min: 0, max: 100, error: "Out of range"}>
312
+ */
313
+ type Range<R extends {
314
+ min: number;
315
+ max: number;
316
+ error?: string;
317
+ }> = Minimum<R extends {
318
+ error: string;
319
+ } ? {
320
+ value: R["min"];
321
+ error: R["error"];
322
+ } : R["min"]> & Maximum<R extends {
323
+ error: string;
324
+ } ? {
325
+ value: R["max"];
326
+ error: R["error"];
327
+ } : R["max"]>;
328
+ /**
329
+ * String length range. Sets MinLength and MaxLength.
330
+ * @example Between<{min: 1, max: 255}> or Between<{min: 1, max: 255, error: "Bad length"}>
331
+ */
332
+ type Between<R extends {
333
+ min: number;
334
+ max: number;
335
+ error?: string;
336
+ }> = MinLength<R extends {
337
+ error: string;
338
+ } ? {
339
+ value: R["min"];
340
+ error: R["error"];
341
+ } : R["min"]> & MaxLength<R extends {
342
+ error: string;
343
+ } ? {
344
+ value: R["max"];
345
+ error: R["error"];
346
+ } : R["max"]>;
347
+ /** Alias for Minimum. `Min<0>` = `Minimum<0>` */
348
+ type Min<N extends number | {
349
+ value: number;
350
+ error?: string;
351
+ }> = Minimum<N>;
352
+ /** Alias for Maximum. `Max<100>` = `Maximum<100>` */
353
+ type Max<N extends number | {
354
+ value: number;
355
+ error?: string;
356
+ }> = Maximum<N>;
357
+ /** Alias for ExclusiveMinimum. `Gt<0>` = "greater than 0" */
358
+ type Gt<N extends number | {
359
+ value: number;
360
+ error?: string;
361
+ }> = ExclusiveMinimum<N>;
362
+ /** Alias for ExclusiveMaximum. `Lt<100>` = "less than 100" */
363
+ type Lt<N extends number | {
364
+ value: number;
365
+ error?: string;
366
+ }> = ExclusiveMaximum<N>;
367
+ /** Alias for Minimum + ExclusiveMinimum combo. `Gte<0>` = `Min<0>` */
368
+ type Gte<N extends number | {
369
+ value: number;
370
+ error?: string;
371
+ }> = Minimum<N>;
372
+ /** Alias for Maximum + ExclusiveMaximum combo. `Lte<100>` = `Max<100>` */
373
+ type Lte<N extends number | {
374
+ value: number;
375
+ error?: string;
376
+ }> = Maximum<N>;
377
+ /** Alias for MultipleOf. `Step<0.01>` */
378
+ type Step<N extends number | {
379
+ value: number;
380
+ error?: string;
381
+ }> = MultipleOf<N>;
382
+ /** Alias for UniqueItems. `Unique` */
383
+ type Unique<C extends {
384
+ error?: string;
385
+ } = {}> = UniqueItems<C>;
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">;
401
+ /** number & Gt<0> */
402
+ type Positive = ExclusiveMinimum<0>;
403
+ /** number & Lt<0> */
404
+ type Negative = ExclusiveMaximum<0>;
405
+ /** number & Min<0> */
406
+ type NonNegative = Minimum<0>;
407
+ /** number & Max<0> */
408
+ type NonPositive = Maximum<0>;
409
+ /** number & Type<"int32"> */
410
+ type Int = Type<"int32">;
411
+ /** number & Type<"int64"> (JS safe integer range) */
412
+ type SafeInt = Type<"int64">;
413
+ /** number & Type<"float"> (finite, no Infinity/NaN) */
414
+ type Finite = Type<"float">;
415
+ /** number & Type<"uint32"> */
416
+ type Uint = Type<"uint32">;
417
+ /** number & Type<"double"> */
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, UniqueItems, Uppercase, Uri, Url, Uuid, Validate, tags_d_exports as t };
421
+ //# sourceMappingURL=tags.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.d.mts","names":[],"sources":["../src/tags.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCK,MAAA;EAA4B,KAAA;EAAe,KAAA;AAAA,KAC9C,CAAA;EAAY,KAAA;AAAA,IAAmB,CAAA,GAAI,CAAA;;KAGhC,MAAA;EAA4B,KAAA;EAAe,KAAA;AAAA,KAC9C,CAAA;EAAY,KAAA;AAAA,IAAmB,CAAA,GAAI,CAAA;;KAGhC,OAAA,YACH,CAAA;EAAY,IAAA;AAAA,IAAkB,CAAA,GAAI,CAAA;;KAG/B,O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.ts
4
+ var tags_exports = /* @__PURE__ */ __exportAll({});
5
+
6
+ //#endregion
7
+ export { tags_exports as t };
8
+ //# sourceMappingURL=tags.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tags.mjs","names":[],"sources":["../src/tags.ts"],"sourcesContent":["/**\n * @tsgonest/types — Zero-runtime branded types for type-safe validation.\n *\n * These types exist purely at compile time. They produce NO runtime code.\n * The tsgonest compiler reads phantom properties (`__tsgonest_*`) to generate validators.\n *\n * Every constraint supports two forms:\n * - Simple: Min<0> — clean, no custom error\n * - Extended: Min<{value: 0, error: \"Must be positive\"}> — with per-constraint error\n *\n * @example\n * import { Email, Min, Max, Trim, Coerce } from \"@tsgonest/types\";\n *\n * interface CreateUserDto {\n * email: string & Email;\n * name: string & Trim & Min<1> & Max<255>;\n * age: number & Min<0> & Max<150>;\n * }\n *\n * // With per-constraint errors:\n * interface StrictDto {\n * email: string & Format<{type: \"email\", error: \"Must be a valid email\"}>;\n * age: number & Min<{value: 0, error: \"Age cannot be negative\"}>;\n * }\n *\n * // Query params with coercion:\n * interface QueryDto {\n * page: number & Coerce;\n * active: boolean & Coerce;\n * }\n */\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Internal helpers (not exported)\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/** Extract the value from a dual-form number constraint. */\ntype NumVal<N extends number | { value: number; error?: string }> =\n N extends { value: infer V } ? V : N;\n\n/** Extract the value from a dual-form string constraint. */\ntype StrVal<S extends string | { value: string; error?: string }> =\n S extends { value: infer V } ? V : S;\n\n/** Extract the type from a dual-form type constraint (Format, Type). */\ntype TypeVal<T, Base> =\n T extends { type: infer V } ? V : T;\n\n/** Conditionally add a _error phantom property. */\ntype WithErr<Prefix extends string, C> =\n C extends { error: infer E extends string }\n ? { readonly [K in `${Prefix}_error`]: E }\n : {};\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// String Format\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/** All supported string format values. */\nexport type FormatValue =\n | \"email\" | \"idn-email\"\n | \"url\" | \"uri\" | \"uri-reference\" | \"uri-template\" | \"iri\" | \"iri-reference\"\n | \"uuid\"\n | \"ipv4\" | \"ipv6\"\n | \"hostname\" | \"idn-hostname\"\n | \"date-time\" | \"date\" | \"time\" | \"duration\"\n | \"json-pointer\" | \"relative-json-pointer\"\n | \"byte\" | \"password\" | \"regex\"\n | \"nanoid\" | \"cuid\" | \"cuid2\" | \"ulid\" | \"jwt\"\n | \"base64url\" | \"hex\" | \"mac\"\n | \"cidrv4\" | \"cidrv6\" | \"emoji\";\n\n/**\n * Validate a string matches a specific format.\n *\n * @example\n * Format<\"email\">\n * Format<{type: \"email\", error: \"Must be a valid email\"}>\n */\nexport type Format<F extends FormatValue | { type: FormatValue; error?: string }> = {\n readonly __tsgonest_format: TypeVal<F, FormatValue>;\n} & WithErr<\"__tsgonest_format\", F>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// String Constraints\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Minimum string length.\n * @example MinLength<1> or MinLength<{value: 1, error: \"Cannot be empty\"}>\n */\nexport type MinLength<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_minLength: NumVal<N>;\n} & WithErr<\"__tsgonest_minLength\", N>;\n\n/**\n * Maximum string length.\n * @example MaxLength<255> or MaxLength<{value: 255, error: \"Too long\"}>\n */\nexport type MaxLength<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_maxLength: NumVal<N>;\n} & WithErr<\"__tsgonest_maxLength\", N>;\n\n/**\n * Regex pattern constraint.\n * @example Pattern<\"^[a-z]+$\"> or Pattern<{value: \"^[a-z]+$\", error: \"Letters only\"}>\n */\nexport type Pattern<P extends string | { value: string; error?: string }> = {\n readonly __tsgonest_pattern: StrVal<P>;\n} & WithErr<\"__tsgonest_pattern\", P>;\n\n/**\n * String must start with prefix.\n * @example StartsWith<\"https://\">\n */\nexport type StartsWith<S extends string | { value: string; error?: string }> = {\n readonly __tsgonest_startsWith: StrVal<S>;\n} & WithErr<\"__tsgonest_startsWith\", S>;\n\n/**\n * String must end with suffix.\n * @example EndsWith<\".json\">\n */\nexport type EndsWith<S extends string | { value: string; error?: string }> = {\n readonly __tsgonest_endsWith: StrVal<S>;\n} & WithErr<\"__tsgonest_endsWith\", S>;\n\n/**\n * String must contain substring.\n * @example Includes<\"@\">\n */\nexport type Includes<S extends string | { value: string; error?: string }> = {\n readonly __tsgonest_includes: StrVal<S>;\n} & WithErr<\"__tsgonest_includes\", S>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Numeric Constraints\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Minimum value (inclusive): value >= N.\n * @example Minimum<0> or Min<0> or Min<{value: 0, error: \"Must be non-negative\"}>\n */\nexport type Minimum<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_minimum: NumVal<N>;\n} & WithErr<\"__tsgonest_minimum\", N>;\n\n/**\n * Maximum value (inclusive): value <= N.\n * @example Maximum<100> or Max<100>\n */\nexport type Maximum<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_maximum: NumVal<N>;\n} & WithErr<\"__tsgonest_maximum\", N>;\n\n/**\n * Exclusive minimum: value > N.\n * @example ExclusiveMinimum<0> or Gt<0>\n */\nexport type ExclusiveMinimum<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_exclusiveMinimum: NumVal<N>;\n} & WithErr<\"__tsgonest_exclusiveMinimum\", N>;\n\n/**\n * Exclusive maximum: value < N.\n * @example ExclusiveMaximum<100> or Lt<100>\n */\nexport type ExclusiveMaximum<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_exclusiveMaximum: NumVal<N>;\n} & WithErr<\"__tsgonest_exclusiveMaximum\", N>;\n\n/**\n * Value must be a multiple of N.\n * @example MultipleOf<2> or Step<0.01>\n */\nexport type MultipleOf<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_multipleOf: NumVal<N>;\n} & WithErr<\"__tsgonest_multipleOf\", N>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Numeric Type Constraints\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/** Valid numeric type values. */\nexport type NumericTypeValue =\n | \"int32\" | \"uint32\" | \"int64\" | \"uint64\" | \"float\" | \"double\";\n\n/**\n * Constrain number to a specific numeric type.\n * @example Type<\"int32\"> or Type<{type: \"int32\", error: \"Must be integer\"}>\n */\nexport type Type<T extends NumericTypeValue | { type: NumericTypeValue; error?: string }> = {\n readonly __tsgonest_type: TypeVal<T, NumericTypeValue>;\n} & WithErr<\"__tsgonest_type\", T>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Array Constraints\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Minimum array length.\n * @example MinItems<1>\n */\nexport type MinItems<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_minItems: NumVal<N>;\n} & WithErr<\"__tsgonest_minItems\", N>;\n\n/**\n * Maximum array length.\n * @example MaxItems<100>\n */\nexport type MaxItems<N extends number | { value: number; error?: string }> = {\n readonly __tsgonest_maxItems: NumVal<N>;\n} & WithErr<\"__tsgonest_maxItems\", N>;\n\n/**\n * Array items must be unique.\n * @example UniqueItems or Unique or Unique<{error: \"No duplicates\"}>\n */\nexport type UniqueItems<C extends { error?: string } = {}> = {\n readonly __tsgonest_uniqueItems: true;\n} & WithErr<\"__tsgonest_uniqueItems\", C>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// String Case Validation\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * String must be all uppercase.\n * @example Uppercase or Uppercase<{error: \"Must be uppercase\"}>\n */\nexport type Uppercase<C extends { error?: string } = {}> = {\n readonly __tsgonest_uppercase: true;\n} & WithErr<\"__tsgonest_uppercase\", C>;\n\n/**\n * String must be all lowercase.\n * @example Lowercase or Lowercase<{error: \"Must be lowercase\"}>\n */\nexport type Lowercase<C extends { error?: string } = {}> = {\n readonly __tsgonest_lowercase: true;\n} & WithErr<\"__tsgonest_lowercase\", C>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Transforms (applied before validation, never fail)\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/** Trim whitespace before validation. */\nexport type Trim = { readonly __tsgonest_transform_trim: true };\n\n/** Convert to lowercase before validation. */\nexport type ToLowerCase = { readonly __tsgonest_transform_toLowerCase: true };\n\n/** Convert to uppercase before validation. */\nexport type ToUpperCase = { readonly __tsgonest_transform_toUpperCase: true };\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Coercion\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Coerce string inputs to the declared type before validation.\n * - \"123\" → 123 (string to number)\n * - \"true\"/\"false\" → true/false (string to boolean)\n *\n * @example\n * page: number & Coerce\n * active: boolean & Coerce\n */\nexport type Coerce = { readonly __tsgonest_coerce: true };\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Custom Validators (function reference)\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Validate using a custom function. The function must be a predicate:\n * `(value: T) => boolean`. tsgonest resolves the function's source file\n * and emits an import + call in the generated validator.\n *\n * @example\n * import { isValidCard } from \"./validators/credit-card\";\n *\n * interface PaymentDto {\n * card: string & Validate<typeof isValidCard>;\n * card: string & Validate<{fn: typeof isValidCard, error: \"Invalid card\"}>;\n * }\n */\nexport type Validate<\n F extends ((...args: any[]) => boolean) | { fn: (...args: any[]) => boolean; error?: string }\n> = {\n readonly __tsgonest_validate: F extends { fn: infer Fn } ? Fn : F;\n} & WithErr<\"__tsgonest_validate\", F>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Meta Types\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Global error message — applies to all validation failures on this property.\n * Per-constraint errors (via `error` field) take precedence.\n * @example string & Format<\"email\"> & Error<\"Invalid email\">\n */\nexport type Error<M extends string> = { readonly __tsgonest_error: M };\n\n/**\n * Default value for optional properties. Assigned when value is undefined.\n * @example theme?: string & Default<\"light\">\n */\nexport type Default<V extends string | number | boolean> = {\n readonly __tsgonest_default: V;\n};\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Compound Constraints\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Exact length (sets both MinLength and MaxLength).\n * @example Length<2> or Length<{value: 2, error: \"Must be exactly 2 chars\"}>\n */\nexport type Length<N extends number | { value: number; error?: string }> =\n MinLength<N> & MaxLength<N>;\n\n/**\n * Numeric range (inclusive). Sets Minimum and Maximum.\n * @example Range<{min: 0, max: 100}> or Range<{min: 0, max: 100, error: \"Out of range\"}>\n */\nexport type Range<R extends { min: number; max: number; error?: string }> =\n Minimum<R extends { error: string } ? { value: R[\"min\"]; error: R[\"error\"] } : R[\"min\"]>\n & Maximum<R extends { error: string } ? { value: R[\"max\"]; error: R[\"error\"] } : R[\"max\"]>;\n\n/**\n * String length range. Sets MinLength and MaxLength.\n * @example Between<{min: 1, max: 255}> or Between<{min: 1, max: 255, error: \"Bad length\"}>\n */\nexport type Between<R extends { min: number; max: number; error?: string }> =\n MinLength<R extends { error: string } ? { value: R[\"min\"]; error: R[\"error\"] } : R[\"min\"]>\n & MaxLength<R extends { error: string } ? { value: R[\"max\"]; error: R[\"error\"] } : R[\"max\"]>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Short Aliases (Zod-style)\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/** Alias for Minimum. `Min<0>` = `Minimum<0>` */\nexport type Min<N extends number | { value: number; error?: string }> = Minimum<N>;\n\n/** Alias for Maximum. `Max<100>` = `Maximum<100>` */\nexport type Max<N extends number | { value: number; error?: string }> = Maximum<N>;\n\n/** Alias for ExclusiveMinimum. `Gt<0>` = \"greater than 0\" */\nexport type Gt<N extends number | { value: number; error?: string }> = ExclusiveMinimum<N>;\n\n/** Alias for ExclusiveMaximum. `Lt<100>` = \"less than 100\" */\nexport type Lt<N extends number | { value: number; error?: string }> = ExclusiveMaximum<N>;\n\n/** Alias for Minimum + ExclusiveMinimum combo. `Gte<0>` = `Min<0>` */\nexport type Gte<N extends number | { value: number; error?: string }> = Minimum<N>;\n\n/** Alias for Maximum + ExclusiveMaximum combo. `Lte<100>` = `Max<100>` */\nexport type Lte<N extends number | { value: number; error?: string }> = Maximum<N>;\n\n/** Alias for MultipleOf. `Step<0.01>` */\nexport type Step<N extends number | { value: number; error?: string }> = MultipleOf<N>;\n\n/** Alias for UniqueItems. `Unique` */\nexport type Unique<C extends { error?: string } = {}> = UniqueItems<C>;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Format Aliases (direct exports, no namespace needed)\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport type Email = Format<\"email\">;\nexport type Uuid = Format<\"uuid\">;\nexport type Url = Format<\"url\">;\nexport type Uri = Format<\"uri\">;\nexport type IPv4 = Format<\"ipv4\">;\nexport type IPv6 = Format<\"ipv6\">;\nexport type DateTime = Format<\"date-time\">;\nexport type DateOnly = Format<\"date\">;\nexport type Time = Format<\"time\">;\nexport type Duration = Format<\"duration\">;\nexport type Jwt = Format<\"jwt\">;\nexport type Ulid = Format<\"ulid\">;\nexport type Cuid = Format<\"cuid\">;\nexport type Cuid2 = Format<\"cuid2\">;\nexport type NanoId = Format<\"nanoid\">;\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Numeric Aliases\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/** number & Gt<0> */\nexport type Positive = ExclusiveMinimum<0>;\n\n/** number & Lt<0> */\nexport type Negative = ExclusiveMaximum<0>;\n\n/** number & Min<0> */\nexport type NonNegative = Minimum<0>;\n\n/** number & Max<0> */\nexport type NonPositive = Maximum<0>;\n\n/** number & Type<\"int32\"> */\nexport type Int = Type<\"int32\">;\n\n/** number & Type<\"int64\"> (JS safe integer range) */\nexport type SafeInt = Type<\"int64\">;\n\n/** number & Type<\"float\"> (finite, no Infinity/NaN) */\nexport type Finite = Type<\"float\">;\n\n/** number & Type<\"uint32\"> */\nexport type Uint = Type<\"uint32\">;\n\n/** number & Type<\"double\"> */\nexport type Double = Type<\"double\">;\n"],"mappings":""}
package/package.json CHANGED
@@ -1,19 +1,30 @@
1
1
  {
2
2
  "name": "@tsgonest/types",
3
- "version": "0.2.3",
3
+ "version": "0.4.0",
4
4
  "description": "Zero-runtime branded types for tsgonest validation constraints — type-safe alternative to JSDoc tags",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.mts",
7
8
  "exports": {
8
9
  ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.js"
10
+ "import": {
11
+ "types": "./dist/index.d.mts",
12
+ "default": "./dist/index.mjs"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.cts",
16
+ "default": "./dist/index.cjs"
17
+ }
12
18
  },
13
19
  "./tags": {
14
- "types": "./dist/tags.d.ts",
15
- "import": "./dist/tags.mjs",
16
- "require": "./dist/tags.js"
20
+ "import": {
21
+ "types": "./dist/tags.d.mts",
22
+ "default": "./dist/tags.mjs"
23
+ },
24
+ "require": {
25
+ "types": "./dist/tags.d.cts",
26
+ "default": "./dist/tags.cjs"
27
+ }
17
28
  }
18
29
  },
19
30
  "files": [
@@ -34,10 +45,11 @@
34
45
  "url": "https://github.com/tsgonest/tsgonest"
35
46
  },
36
47
  "devDependencies": {
48
+ "tsdown": "^0.20.3",
37
49
  "typescript": "^5.7.0"
38
50
  },
39
51
  "scripts": {
40
- "build": "tsc",
52
+ "build": "tsdown",
41
53
  "test": "tsc --noEmit"
42
54
  }
43
55
  }
package/dist/index.d.ts DELETED
@@ -1,34 +0,0 @@
1
- /**
2
- * @tsgonest/types — Zero-runtime branded types for type-safe validation constraints.
3
- *
4
- * This package provides phantom branded types that the tsgonest compiler
5
- * inspects at build time to generate validation and serialization code.
6
- * No runtime code is emitted — these types exist purely for type safety
7
- * and IDE autocomplete.
8
- *
9
- * @example
10
- * ```ts
11
- * import { tags } from "@tsgonest/types";
12
- *
13
- * interface CreateUserDto {
14
- * email: string & tags.Format<"email">;
15
- * name: string & tags.MinLength<1> & tags.MaxLength<255>;
16
- * age: number & tags.Minimum<0> & tags.Maximum<150>;
17
- * tags: string[] & tags.MinItems<1> & tags.UniqueItems;
18
- * }
19
- * ```
20
- *
21
- * Convenience aliases for common patterns:
22
- * ```ts
23
- * import { tags } from "@tsgonest/types";
24
- *
25
- * interface User {
26
- * email: string & tags.Email; // same as tags.Format<"email">
27
- * id: string & tags.Uuid; // same as tags.Format<"uuid">
28
- * website: string & tags.Url; // same as tags.Format<"url">
29
- * age: number & tags.Int & tags.NonNegative; // int32 & >= 0
30
- * }
31
- * ```
32
- */
33
- export * as tags from "./tags.js";
34
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC"}
package/dist/index.js DELETED
@@ -1,33 +0,0 @@
1
- /**
2
- * @tsgonest/types — Zero-runtime branded types for type-safe validation constraints.
3
- *
4
- * This package provides phantom branded types that the tsgonest compiler
5
- * inspects at build time to generate validation and serialization code.
6
- * No runtime code is emitted — these types exist purely for type safety
7
- * and IDE autocomplete.
8
- *
9
- * @example
10
- * ```ts
11
- * import { tags } from "@tsgonest/types";
12
- *
13
- * interface CreateUserDto {
14
- * email: string & tags.Format<"email">;
15
- * name: string & tags.MinLength<1> & tags.MaxLength<255>;
16
- * age: number & tags.Minimum<0> & tags.Maximum<150>;
17
- * tags: string[] & tags.MinItems<1> & tags.UniqueItems;
18
- * }
19
- * ```
20
- *
21
- * Convenience aliases for common patterns:
22
- * ```ts
23
- * import { tags } from "@tsgonest/types";
24
- *
25
- * interface User {
26
- * email: string & tags.Email; // same as tags.Format<"email">
27
- * id: string & tags.Uuid; // same as tags.Format<"uuid">
28
- * website: string & tags.Url; // same as tags.Format<"url">
29
- * age: number & tags.Int & tags.NonNegative; // int32 & >= 0
30
- * }
31
- * ```
32
- */
33
- export * as tags from "./tags.js";
@@ -1 +0,0 @@
1
- {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../src/tags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAMH,4DAA4D;AAC5D,KAAK,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,IAC9D,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AAEvC,4DAA4D;AAC5D,KAAK,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,IAC9D,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AAEvC,wEAAwE;AACxE,KAAK,OAAO,CAAC,CAAC,EAAE,IAAI,IAClB,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,CAAC,CAAC;AAEtC,mDAAmD;AACnD,KAAK,OAAO,CAAC,MAAM,SAAS,MAAM,EAAE,CAAC,IACnC,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC,SAAS,MAAM,CAAA;CAAE,GACvC;IAAE,QAAQ,EAAE,CAAC,IAAI,GAAG,MAAM,QAAQ,GAAG,CAAC;CAAE,GACxC,EAAE,CAAC;AAMT,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GACnB,OAAO,GAAG,WAAW,GACrB,KAAK,GAAG,KAAK,GAAG,eAAe,GAAG,cAAc,GAAG,KAAK,GAAG,eAAe,GAC1E,MAAM,GACN,MAAM,GAAG,MAAM,GAC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