@sinclair/typebox 0.34.30 → 0.34.32

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.
@@ -1,484 +0,0 @@
1
- import { Static } from '../parser/index';
2
- import * as t from '../type/index';
3
- type Newline = '\n';
4
- type LBracket = '[';
5
- type RBracket = ']';
6
- type LParen = '(';
7
- type RParen = ')';
8
- type LBrace = '{';
9
- type RBrace = '}';
10
- type LAngle = '<';
11
- type RAngle = '>';
12
- type Question = '?';
13
- type Colon = ':';
14
- type Comma = ',';
15
- type SemiColon = ';';
16
- type SingleQuote = "'";
17
- type DoubleQuote = '"';
18
- type Tilde = '`';
19
- type DelimitHeadReduce<Elements extends unknown[], Result extends unknown[] = []> = (Elements extends [infer Left extends unknown, ...infer Right extends unknown[]] ? Left extends [infer Element, infer _Delimiter] ? DelimitHeadReduce<Right, [...Result, Element]> : DelimitHeadReduce<Right, Result> : Result);
20
- interface DelimitHeadMapping extends Static.IMapping {
21
- output: this['input'] extends unknown[] ? DelimitHeadReduce<this['input']> : [];
22
- }
23
- type DelimitHead<Element extends Static.IParser, Delimiter extends Static.IParser> = (Static.Array<Static.Tuple<[Element, Delimiter]>, DelimitHeadMapping>);
24
- type DelimitTail<Element extends Static.IParser> = Static.Union<[
25
- Static.Tuple<[Element]>,
26
- Static.Tuple<[]>
27
- ]>;
28
- interface DelimitMapping extends Static.IMapping {
29
- output: this['input'] extends [infer Left extends unknown[], infer Right extends unknown[]] ? [...Left, ...Right] : [];
30
- }
31
- type Delimit<Element extends Static.IParser, Delimiter extends Static.IParser> = Static.Tuple<[
32
- DelimitHead<Element, Delimiter>,
33
- DelimitTail<Element>
34
- ], DelimitMapping>;
35
- type Dereference<Context extends t.TProperties, Ref extends string> = (Ref extends keyof Context ? Context[Ref] : t.TRef<Ref>);
36
- type GenericArgumentsContext<Args extends string[], Context extends t.TProperties, Result extends t.TProperties = {}> = (Args extends [...infer Left extends string[], infer Right extends string] ? GenericArgumentsContext<Left, Context, Result & {
37
- [_ in Right]: t.TArgument<Left['length']>;
38
- }> : t.Evaluate<Result & Context>);
39
- interface GenericArgumentsMapping extends Static.IMapping {
40
- output: this['input'] extends [LAngle, infer Args extends string[], RAngle] ? this['context'] extends infer Context extends t.TProperties ? GenericArgumentsContext<Args, Context> : never : never;
41
- }
42
- type GenericArgumentsList = Delimit<Static.Ident, Static.Const<Comma>>;
43
- type GenericArguments = Static.Tuple<[
44
- Static.Const<LAngle>,
45
- GenericArgumentsList,
46
- Static.Const<RAngle>
47
- ], GenericArgumentsMapping>;
48
- interface GenericReferenceMapping extends Static.IMapping {
49
- output: this['context'] extends t.TProperties ? this['input'] extends [infer Reference extends string, LAngle, infer Args extends t.TSchema[], RAngle] ? t.TInstantiate<Dereference<this['context'], Reference>, Args> : never : never;
50
- }
51
- type GenericReferenceParameters = Delimit<Type, Static.Const<Comma>>;
52
- type GenericReference = Static.Tuple<[
53
- Static.Ident,
54
- Static.Const<LAngle>,
55
- GenericReferenceParameters,
56
- Static.Const<RAngle>
57
- ], GenericReferenceMapping>;
58
- interface ReferenceMapping extends Static.IMapping {
59
- output: this['context'] extends t.TProperties ? this['input'] extends string ? Dereference<this['context'], this['input']> : never : never;
60
- }
61
- type Reference = Static.Ident<ReferenceMapping>;
62
- interface LiteralBooleanMapping extends Static.IMapping {
63
- output: this['input'] extends `${infer Value extends boolean}` ? t.TLiteral<Value> : never;
64
- }
65
- interface LiteralNumberMapping extends Static.IMapping {
66
- output: this['input'] extends `${infer Value extends number}` ? t.TLiteral<Value> : never;
67
- }
68
- interface LiteralStringMapping extends Static.IMapping {
69
- output: this['input'] extends `${infer Value extends string}` ? t.TLiteral<Value> : never;
70
- }
71
- type Literal = Static.Union<[
72
- Static.Union<[Static.Const<'true'>, Static.Const<'false'>], LiteralBooleanMapping>,
73
- Static.Number<LiteralNumberMapping>,
74
- Static.String<[DoubleQuote, SingleQuote, Tilde], LiteralStringMapping>
75
- ]>;
76
- type Keyword = Static.Union<[
77
- Static.Const<'string', Static.As<t.TString>>,
78
- Static.Const<'number', Static.As<t.TNumber>>,
79
- Static.Const<'boolean', Static.As<t.TBoolean>>,
80
- Static.Const<'undefined', Static.As<t.TUndefined>>,
81
- Static.Const<'null', Static.As<t.TNull>>,
82
- Static.Const<'integer', Static.As<t.TInteger>>,
83
- Static.Const<'bigint', Static.As<t.TBigInt>>,
84
- Static.Const<'unknown', Static.As<t.TUnknown>>,
85
- Static.Const<'any', Static.As<t.TAny>>,
86
- Static.Const<'never', Static.As<t.TNever>>,
87
- Static.Const<'symbol', Static.As<t.TSymbol>>,
88
- Static.Const<'void', Static.As<t.TVoid>>
89
- ]>;
90
- interface KeyOfMapping extends Static.IMapping {
91
- output: this['input'] extends [] ? false : true;
92
- }
93
- type KeyOf = Static.Union<[
94
- Static.Tuple<[Static.Const<'keyof'>]>,
95
- Static.Tuple<[]>
96
- ], KeyOfMapping>;
97
- type IndexArrayReduce<Values extends unknown[], Result extends unknown[] = []> = (Values extends [infer Left extends unknown, ...infer Right extends unknown[]] ? Left extends [LBracket, infer Type extends t.TSchema, RBracket] ? IndexArrayReduce<Right, [...Result, [Type]]> : IndexArrayReduce<Right, [...Result, []]> : Result);
98
- interface IndexArrayMapping extends Static.IMapping {
99
- output: this['input'] extends unknown[] ? IndexArrayReduce<this['input']> : [];
100
- }
101
- type IndexArray = Static.Array<Static.Union<[
102
- Static.Tuple<[Static.Const<LBracket>, Type, Static.Const<RBracket>]>,
103
- Static.Tuple<[Static.Const<LBracket>, Static.Const<RBracket>]>
104
- ]>, IndexArrayMapping>;
105
- interface ExtendsMapping extends Static.IMapping {
106
- output: this['input'] extends ['extends', infer Type extends t.TSchema, Question, infer True extends t.TSchema, Colon, infer False extends t.TSchema] ? [Type, True, False] : [];
107
- }
108
- type Extends = Static.Union<[
109
- Static.Tuple<[Static.Const<'extends'>, Type, Static.Const<Question>, Type, Static.Const<Colon>, Type]>,
110
- Static.Tuple<[]>
111
- ], ExtendsMapping>;
112
- interface BaseMapping extends Static.IMapping {
113
- output: (this['input'] extends [LParen, infer Type extends t.TSchema, RParen] ? Type : this['input'] extends infer Type extends t.TSchema ? Type : never);
114
- }
115
- type Base = Static.Union<[
116
- Static.Tuple<[Static.Const<LParen>, Type, Static.Const<RParen>]>,
117
- Keyword,
118
- Object,
119
- Tuple,
120
- Literal,
121
- Function,
122
- Constructor,
123
- Mapped,
124
- AsyncIterator,
125
- Iterator,
126
- ConstructorParameters,
127
- FunctionParameters,
128
- Argument,
129
- InstanceType,
130
- ReturnType,
131
- Awaited,
132
- Array,
133
- Record,
134
- Promise,
135
- Partial,
136
- Required,
137
- Pick,
138
- Omit,
139
- Exclude,
140
- Extract,
141
- Lowercase,
142
- Uppercase,
143
- Capitalize,
144
- Uncapitalize,
145
- Date,
146
- Uint8Array,
147
- GenericReference,
148
- Reference
149
- ], BaseMapping>;
150
- type FactorExtends<Type extends t.TSchema, Extends extends unknown[]> = (Extends extends [infer Right extends t.TSchema, infer True extends t.TSchema, infer False extends t.TSchema] ? t.TExtends<Type, Right, True, False> : Type);
151
- type FactorIndexArray<Type extends t.TSchema, IndexArray extends unknown[]> = (IndexArray extends [...infer Left extends unknown[], infer Right extends t.TSchema[]] ? (Right extends [infer Indexer extends t.TSchema] ? t.TIndex<FactorIndexArray<Type, Left>, t.TIndexPropertyKeys<Indexer>> : Right extends [] ? t.TArray<FactorIndexArray<Type, Left>> : t.TNever) : Type);
152
- interface FactorMapping extends Static.IMapping {
153
- output: this['input'] extends [infer KeyOf extends boolean, infer Type extends t.TSchema, infer IndexArray extends unknown[], infer Extends extends unknown[]] ? KeyOf extends true ? FactorExtends<t.TKeyOf<FactorIndexArray<Type, IndexArray>>, Extends> : FactorExtends<FactorIndexArray<Type, IndexArray>, Extends> : never;
154
- }
155
- type Factor = Static.Tuple<[
156
- KeyOf,
157
- Base,
158
- IndexArray,
159
- Extends
160
- ], FactorMapping>;
161
- type ExprBinaryReduce<Left extends t.TSchema, Rest extends unknown[]> = (Rest extends [infer Operator extends unknown, infer Right extends t.TSchema, infer Next extends unknown[]] ? (ExprBinaryReduce<Right, Next> extends infer Schema extends t.TSchema ? (Operator extends '&' ? (Schema extends t.TIntersect<infer Types extends t.TSchema[]> ? t.TIntersect<[Left, ...Types]> : t.TIntersect<[Left, Schema]>) : Operator extends '|' ? (Schema extends t.TUnion<infer Types extends t.TSchema[]> ? t.TUnion<[Left, ...Types]> : t.TUnion<[Left, Schema]>) : never) : never) : Left);
162
- interface ExprBinaryMapping extends Static.IMapping {
163
- output: (this['input'] extends [infer Left extends t.TSchema, infer Rest extends unknown[]] ? ExprBinaryReduce<Left, Rest> : []);
164
- }
165
- type ExprTermTail = Static.Union<[
166
- Static.Tuple<[Static.Const<'&'>, Factor, ExprTermTail]>,
167
- Static.Tuple<[]>
168
- ]>;
169
- type ExprTerm = Static.Tuple<[
170
- Factor,
171
- ExprTermTail
172
- ], ExprBinaryMapping>;
173
- type ExprTail = Static.Union<[
174
- Static.Tuple<[Static.Const<'|'>, ExprTerm, ExprTail]>,
175
- Static.Tuple<[]>
176
- ]>;
177
- type Expr = Static.Tuple<[
178
- ExprTerm,
179
- ExprTail
180
- ], ExprBinaryMapping>;
181
- export type Type = Static.Union<[
182
- Static.Context<GenericArguments, Expr>,
183
- Expr
184
- ]>;
185
- interface PropertyKeyStringMapping extends Static.IMapping {
186
- output: this['input'];
187
- }
188
- type PropertyKeyString = Static.String<[SingleQuote, DoubleQuote], PropertyKeyStringMapping>;
189
- type PropertyKey = Static.Union<[Static.Ident, PropertyKeyString]>;
190
- interface ReadonlyMapping extends Static.IMapping {
191
- output: this['input'] extends ['readonly'] ? true : false;
192
- }
193
- type Readonly = Static.Union<[Static.Tuple<[Static.Const<'readonly'>]>, Static.Tuple<[]>], ReadonlyMapping>;
194
- interface OptionalMapping extends Static.IMapping {
195
- output: this['input'] extends [Question] ? true : false;
196
- }
197
- type Optional = Static.Union<[Static.Tuple<[Static.Const<Question>]>, Static.Tuple<[]>], OptionalMapping>;
198
- interface PropertyMapping extends Static.IMapping {
199
- output: this['input'] extends [infer IsReadonly extends boolean, infer Key extends string, infer IsOptional extends boolean, string, infer Type extends t.TSchema] ? {
200
- [_ in Key]: ([
201
- IsReadonly,
202
- IsOptional
203
- ] extends [true, true] ? t.TReadonlyOptional<Type> : [
204
- IsReadonly,
205
- IsOptional
206
- ] extends [true, false] ? t.TReadonly<Type> : [
207
- IsReadonly,
208
- IsOptional
209
- ] extends [false, true] ? t.TOptional<Type> : Type);
210
- } : never;
211
- }
212
- type Property = Static.Tuple<[Readonly, PropertyKey, Optional, Static.Const<Colon>, Type], PropertyMapping>;
213
- type PropertyDelimiter = Static.Union<[
214
- Static.Tuple<[Static.Const<Comma>, Static.Const<Newline>]>,
215
- Static.Tuple<[Static.Const<SemiColon>, Static.Const<Newline>]>,
216
- Static.Tuple<[Static.Const<Comma>]>,
217
- Static.Tuple<[Static.Const<SemiColon>]>,
218
- Static.Tuple<[Static.Const<Newline>]>
219
- ]>;
220
- type PropertyList = Delimit<Property, PropertyDelimiter>;
221
- type ObjectReduce<PropertiesList extends t.TProperties[], Result extends t.TProperties = {}> = (PropertiesList extends [infer Left extends t.TProperties, ...infer Right extends t.TProperties[]] ? ObjectReduce<Right, Result & Left> : t.Evaluate<Result>);
222
- interface ObjectMapping extends Static.IMapping {
223
- output: this['input'] extends [LBrace, infer PropertyList extends t.TProperties[], RBrace] ? t.TObject<ObjectReduce<PropertyList>> : never;
224
- }
225
- type Object = Static.Tuple<[
226
- Static.Const<LBrace>,
227
- PropertyList,
228
- Static.Const<RBrace>
229
- ], ObjectMapping>;
230
- type ElementList = Delimit<Type, Static.Const<Comma>>;
231
- interface TupleMapping extends Static.IMapping {
232
- output: this['input'] extends [unknown, infer ElementList extends t.TSchema[], unknown] ? t.TTuple<ElementList> : never;
233
- }
234
- type Tuple = Static.Tuple<[
235
- Static.Const<LBracket>,
236
- ElementList,
237
- Static.Const<RBracket>
238
- ], TupleMapping>;
239
- interface ParameterMapping extends Static.IMapping {
240
- output: this['input'] extends [string, Colon, infer Type extends t.TSchema] ? Type : never;
241
- }
242
- type Parameter = Static.Tuple<[
243
- Static.Ident,
244
- Static.Const<Colon>,
245
- Type
246
- ], ParameterMapping>;
247
- type ParameterList = Delimit<Parameter, Static.Const<Comma>>;
248
- interface FunctionMapping extends Static.IMapping {
249
- output: this['input'] extends [LParen, infer ParameterList extends t.TSchema[], RParen, '=>', infer ReturnType extends t.TSchema] ? t.TFunction<ParameterList, ReturnType> : never;
250
- }
251
- type Function = Static.Tuple<[
252
- Static.Const<LParen>,
253
- ParameterList,
254
- Static.Const<RParen>,
255
- Static.Const<'=>'>,
256
- Type
257
- ], FunctionMapping>;
258
- interface ConstructorMapping extends Static.IMapping {
259
- output: this['input'] extends ['new', LParen, infer ParameterList extends t.TSchema[], RParen, '=>', infer InstanceType extends t.TSchema] ? t.TConstructor<ParameterList, InstanceType> : never;
260
- }
261
- type Constructor = Static.Tuple<[
262
- Static.Const<'new'>,
263
- Static.Const<LParen>,
264
- ParameterList,
265
- Static.Const<RParen>,
266
- Static.Const<'=>'>,
267
- Type
268
- ], ConstructorMapping>;
269
- interface MappedMapping extends Static.IMapping {
270
- output: this['input'] extends [LBrace, LBracket, infer _Key extends string, 'in', infer _Right extends t.TSchema, RBracket, Colon, infer Type extends t.TSchema, RBrace] ? t.TLiteral<'Mapped types not supported'> : this['input'];
271
- }
272
- type Mapped = Static.Tuple<[
273
- Static.Const<LBrace>,
274
- Static.Const<LBracket>,
275
- Static.Ident,
276
- Static.Const<'in'>,
277
- Type,
278
- Static.Const<RBracket>,
279
- Static.Const<Colon>,
280
- Type,
281
- Static.Const<RBrace>
282
- ], MappedMapping>;
283
- interface ArrayMapping extends Static.IMapping {
284
- output: this['input'] extends ['Array', LAngle, infer Type extends t.TSchema, RAngle] ? t.TArray<Type> : never;
285
- }
286
- type Array = Static.Tuple<[
287
- Static.Const<'Array'>,
288
- Static.Const<LAngle>,
289
- Type,
290
- Static.Const<RAngle>
291
- ], ArrayMapping>;
292
- interface AsyncIteratorMapping extends Static.IMapping {
293
- output: this['input'] extends ['AsyncIterator', LAngle, infer Type extends t.TSchema, RAngle] ? t.TAsyncIterator<Type> : never;
294
- }
295
- type AsyncIterator = Static.Tuple<[
296
- Static.Const<'AsyncIterator'>,
297
- Static.Const<LAngle>,
298
- Type,
299
- Static.Const<RAngle>
300
- ], AsyncIteratorMapping>;
301
- interface IteratorMapping extends Static.IMapping {
302
- output: this['input'] extends ['Iterator', LAngle, infer Type extends t.TSchema, RAngle] ? t.TIterator<Type> : never;
303
- }
304
- type Iterator = Static.Tuple<[
305
- Static.Const<'Iterator'>,
306
- Static.Const<LAngle>,
307
- Type,
308
- Static.Const<RAngle>
309
- ], IteratorMapping>;
310
- interface ConstructorParametersMapping extends Static.IMapping {
311
- output: this['input'] extends ['ConstructorParameters', LAngle, infer Type extends t.TSchema, RAngle] ? t.TConstructorParameters<Type> : never;
312
- }
313
- type ConstructorParameters = Static.Tuple<[
314
- Static.Const<'ConstructorParameters'>,
315
- Static.Const<LAngle>,
316
- Type,
317
- Static.Const<RAngle>
318
- ], ConstructorParametersMapping>;
319
- interface FunctionParametersMapping extends Static.IMapping {
320
- output: this['input'] extends ['Parameters', LAngle, infer Type extends t.TSchema, RAngle] ? t.TParameters<Type> : never;
321
- }
322
- type FunctionParameters = Static.Tuple<[
323
- Static.Const<'Parameters'>,
324
- Static.Const<LAngle>,
325
- Type,
326
- Static.Const<RAngle>
327
- ], FunctionParametersMapping>;
328
- interface InstanceTypeMapping extends Static.IMapping {
329
- output: this['input'] extends ['InstanceType', LAngle, infer Type extends t.TSchema, RAngle] ? t.TInstanceType<Type> : never;
330
- }
331
- type InstanceType = Static.Tuple<[
332
- Static.Const<'InstanceType'>,
333
- Static.Const<LAngle>,
334
- Type,
335
- Static.Const<RAngle>
336
- ], InstanceTypeMapping>;
337
- interface ReturnTypeMapping extends Static.IMapping {
338
- output: this['input'] extends ['ReturnType', LAngle, infer Type extends t.TSchema, RAngle] ? t.TReturnType<Type> : never;
339
- }
340
- type ReturnType = Static.Tuple<[
341
- Static.Const<'ReturnType'>,
342
- Static.Const<LAngle>,
343
- Type,
344
- Static.Const<RAngle>
345
- ], ReturnTypeMapping>;
346
- interface ArgumentMapping extends Static.IMapping {
347
- output: this['input'] extends ['Argument', LAngle, infer Type extends t.TSchema, RAngle] ? Type extends t.TLiteral<infer Index extends number> ? t.TArgument<Index> : t.TNever : never;
348
- }
349
- type Argument = Static.Tuple<[
350
- Static.Const<'Argument'>,
351
- Static.Const<LAngle>,
352
- Type,
353
- Static.Const<RAngle>
354
- ], ArgumentMapping>;
355
- interface AwaitedMapping extends Static.IMapping {
356
- output: this['input'] extends ['Awaited', LAngle, infer Type extends t.TSchema, RAngle] ? t.TAwaited<Type> : never;
357
- }
358
- type Awaited = Static.Tuple<[
359
- Static.Const<'Awaited'>,
360
- Static.Const<LAngle>,
361
- Type,
362
- Static.Const<RAngle>
363
- ], AwaitedMapping>;
364
- interface PromiseMapping extends Static.IMapping {
365
- output: this['input'] extends ['Promise', LAngle, infer Type extends t.TSchema, RAngle] ? t.TPromise<Type> : never;
366
- }
367
- type Promise = Static.Tuple<[
368
- Static.Const<'Promise'>,
369
- Static.Const<LAngle>,
370
- Type,
371
- Static.Const<RAngle>
372
- ], PromiseMapping>;
373
- interface RecordMapping extends Static.IMapping {
374
- output: this['input'] extends ['Record', LAngle, infer Key extends t.TSchema, Comma, infer Type extends t.TSchema, RAngle] ? t.TRecord<Key, Type> : never;
375
- }
376
- type Record = Static.Tuple<[
377
- Static.Const<'Record'>,
378
- Static.Const<LAngle>,
379
- Type,
380
- Static.Const<Comma>,
381
- Type,
382
- Static.Const<RAngle>
383
- ], RecordMapping>;
384
- interface PartialMapping extends Static.IMapping {
385
- output: this['input'] extends ['Partial', LAngle, infer Type extends t.TSchema, RAngle] ? t.TPartial<Type> : never;
386
- }
387
- type Partial = Static.Tuple<[
388
- Static.Const<'Partial'>,
389
- Static.Const<LAngle>,
390
- Type,
391
- Static.Const<RAngle>
392
- ], PartialMapping>;
393
- interface RequiredMapping extends Static.IMapping {
394
- output: this['input'] extends ['Required', LAngle, infer Type extends t.TSchema, RAngle] ? t.TRequired<Type> : never;
395
- }
396
- type Required = Static.Tuple<[
397
- Static.Const<'Required'>,
398
- Static.Const<LAngle>,
399
- Type,
400
- Static.Const<RAngle>
401
- ], RequiredMapping>;
402
- interface PickMapping extends Static.IMapping {
403
- output: this['input'] extends ['Pick', LAngle, infer Type extends t.TSchema, Comma, infer Key extends t.TSchema, RAngle] ? t.TPick<Type, Key> : never;
404
- }
405
- type Pick = Static.Tuple<[
406
- Static.Const<'Pick'>,
407
- Static.Const<LAngle>,
408
- Type,
409
- Static.Const<Comma>,
410
- Type,
411
- Static.Const<RAngle>
412
- ], PickMapping>;
413
- interface OmitMapping extends Static.IMapping {
414
- output: this['input'] extends ['Omit', LAngle, infer Type extends t.TSchema, Comma, infer Key extends t.TSchema, RAngle] ? t.TOmit<Type, Key> : never;
415
- }
416
- type Omit = Static.Tuple<[
417
- Static.Const<'Omit'>,
418
- Static.Const<LAngle>,
419
- Type,
420
- Static.Const<Comma>,
421
- Type,
422
- Static.Const<RAngle>
423
- ], OmitMapping>;
424
- interface ExcludeMapping extends Static.IMapping {
425
- output: this['input'] extends ['Exclude', LAngle, infer Type extends t.TSchema, Comma, infer PropertyKey extends t.TSchema, RAngle] ? t.TExclude<Type, PropertyKey> : never;
426
- }
427
- type Exclude = Static.Tuple<[
428
- Static.Const<'Exclude'>,
429
- Static.Const<LAngle>,
430
- Type,
431
- Static.Const<Comma>,
432
- Type,
433
- Static.Const<RAngle>
434
- ], ExcludeMapping>;
435
- interface ExtractMapping extends Static.IMapping {
436
- output: this['input'] extends ['Extract', LAngle, infer Type extends t.TSchema, Comma, infer PropertyKey extends t.TSchema, RAngle] ? t.TExtract<Type, PropertyKey> : never;
437
- }
438
- type Extract = Static.Tuple<[
439
- Static.Const<'Extract'>,
440
- Static.Const<LAngle>,
441
- Type,
442
- Static.Const<Comma>,
443
- Type,
444
- Static.Const<RAngle>
445
- ], ExtractMapping>;
446
- interface UppercaseMapping extends Static.IMapping {
447
- output: this['input'] extends ['Uppercase', LAngle, infer Type extends t.TSchema, RAngle] ? t.TUppercase<Type> : never;
448
- }
449
- type Uppercase = Static.Tuple<[
450
- Static.Const<'Uppercase'>,
451
- Static.Const<LAngle>,
452
- Type,
453
- Static.Const<RAngle>
454
- ], UppercaseMapping>;
455
- interface LowercaseMapping extends Static.IMapping {
456
- output: this['input'] extends ['Lowercase', LAngle, infer Type extends t.TSchema, RAngle] ? t.TLowercase<Type> : never;
457
- }
458
- type Lowercase = Static.Tuple<[
459
- Static.Const<'Lowercase'>,
460
- Static.Const<LAngle>,
461
- Type,
462
- Static.Const<RAngle>
463
- ], LowercaseMapping>;
464
- interface CapitalizeMapping extends Static.IMapping {
465
- output: this['input'] extends ['Capitalize', LAngle, infer Type extends t.TSchema, RAngle] ? t.TCapitalize<Type> : never;
466
- }
467
- type Capitalize = Static.Tuple<[
468
- Static.Const<'Capitalize'>,
469
- Static.Const<LAngle>,
470
- Type,
471
- Static.Const<RAngle>
472
- ], CapitalizeMapping>;
473
- interface UncapitalizeMapping extends Static.IMapping {
474
- output: this['input'] extends ['Uncapitalize', LAngle, infer Type extends t.TSchema, RAngle] ? t.TUncapitalize<Type> : never;
475
- }
476
- type Uncapitalize = Static.Tuple<[
477
- Static.Const<'Uncapitalize'>,
478
- Static.Const<LAngle>,
479
- Type,
480
- Static.Const<RAngle>
481
- ], UncapitalizeMapping>;
482
- type Date = Static.Const<'Date', Static.As<t.TDate>>;
483
- type Uint8Array = Static.Const<'Uint8Array', Static.As<t.TUint8Array>>;
484
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,60 +0,0 @@
1
- import { Runtime } from '../parser/index.mjs';
2
- import * as t from '../type/index.mjs';
3
- export declare const Module: Runtime.Module<{
4
- GenericArgumentsList: Runtime.ITuple<unknown[]>;
5
- GenericArguments: Runtime.ITuple<t.TProperties>;
6
- Literal: Runtime.IUnion<t.TLiteral<string> | t.TLiteral<number> | t.TLiteral<boolean>>;
7
- Keyword: Runtime.IUnion<t.TAny | t.TBoolean | t.TBigInt | t.TNever | t.TString | t.TNumber | t.TInteger | t.TNull | t.TSymbol | t.TUndefined | t.TUnknown | t.TVoid>;
8
- KeyOf: Runtime.IUnion<boolean>;
9
- IndexArray: Runtime.IArray<unknown[]>;
10
- Extends: Runtime.IUnion<unknown[]>;
11
- Base: Runtime.IUnion<unknown>;
12
- Factor: Runtime.ITuple<t.TSchema>;
13
- ExprTermTail: Runtime.IUnion<[] | ["&", unknown, unknown]>;
14
- ExprTerm: Runtime.ITuple<t.TSchema>;
15
- ExprTail: Runtime.IUnion<[] | ["|", unknown, unknown]>;
16
- Expr: Runtime.ITuple<t.TSchema>;
17
- Type: Runtime.IUnion<unknown>;
18
- PropertyKey: Runtime.IUnion<string>;
19
- Readonly: Runtime.IUnion<boolean>;
20
- Optional: Runtime.IUnion<boolean>;
21
- Property: Runtime.ITuple<{
22
- [x: string]: t.TSchema;
23
- }>;
24
- PropertyDelimiter: Runtime.IUnion<[","] | [",", "\n"] | [";"] | [";", "\n"] | ["\n"]>;
25
- PropertyList: Runtime.ITuple<unknown[]>;
26
- Object: Runtime.ITuple<t.TObject<t.TProperties>>;
27
- ElementList: Runtime.ITuple<unknown[]>;
28
- Tuple: Runtime.ITuple<t.TTuple<t.TSchema[]>>;
29
- Parameter: Runtime.ITuple<t.TSchema>;
30
- ParameterList: Runtime.ITuple<unknown[]>;
31
- Function: Runtime.ITuple<t.TFunction<t.TSchema[], t.TSchema>>;
32
- Constructor: Runtime.ITuple<t.TConstructor<t.TSchema[], t.TSchema>>;
33
- Mapped: Runtime.ITuple<t.TLiteral<"Mapped types not supported">>;
34
- AsyncIterator: Runtime.ITuple<t.TAsyncIterator<t.TSchema>>;
35
- Iterator: Runtime.ITuple<t.TIterator<t.TSchema>>;
36
- Argument: Runtime.ITuple<t.TNever | t.TArgument<number>>;
37
- Awaited: Runtime.ITuple<t.TSchema>;
38
- Array: Runtime.ITuple<t.TArray<t.TSchema>>;
39
- Record: Runtime.ITuple<t.TNever>;
40
- Promise: Runtime.ITuple<t.TPromise<t.TSchema>>;
41
- ConstructorParameters: Runtime.ITuple<t.TTuple<t.TSchema[]>>;
42
- FunctionParameters: Runtime.ITuple<t.TTuple<t.TSchema[]>>;
43
- InstanceType: Runtime.ITuple<t.TSchema>;
44
- ReturnType: Runtime.ITuple<t.TSchema>;
45
- Partial: Runtime.ITuple<t.TObject<{}>>;
46
- Required: Runtime.ITuple<t.TObject<{}>>;
47
- Pick: Runtime.ITuple<t.TObject<{}>>;
48
- Omit: Runtime.ITuple<t.TObject<{}>>;
49
- Exclude: Runtime.ITuple<t.TNever>;
50
- Extract: Runtime.ITuple<t.TSchema>;
51
- Uppercase: Runtime.ITuple<t.TSchema>;
52
- Lowercase: Runtime.ITuple<t.TSchema>;
53
- Capitalize: Runtime.ITuple<t.TSchema>;
54
- Uncapitalize: Runtime.ITuple<t.TSchema>;
55
- Date: Runtime.IConst<t.TDate>;
56
- Uint8Array: Runtime.IConst<t.TUint8Array>;
57
- GenericReferenceParameters: Runtime.ITuple<unknown[]>;
58
- GenericReference: Runtime.ITuple<t.TSchema>;
59
- Reference: Runtime.IIdent<t.TSchema>;
60
- }>;