typebox 1.2.4 → 1.2.6
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.
- package/build/schema/types/dependencies.mjs +1 -1
- package/build/type/action/module.d.mts +8 -7
- package/build/type/action/module.mjs +7 -6
- package/build/type/engine/instantiate.d.mts +1 -1
- package/build/type/engine/module/instantiate.d.mts +7 -7
- package/build/type/engine/module/instantiate.mjs +16 -15
- package/build/type/script/mapping.d.mts +26 -22
- package/build/type/script/mapping.mjs +18 -12
- package/build/type/script/parser.d.mts +29 -25
- package/build/type/script/parser.mjs +15 -13
- package/package.json +1 -1
|
@@ -12,5 +12,5 @@ export function IsDependencies(schema) {
|
|
|
12
12
|
return Guard.HasPropertyKey(schema, 'dependencies')
|
|
13
13
|
&& Guard.IsObject(schema.dependencies)
|
|
14
14
|
&& Object.values(schema.dependencies).every(value => IsSchema(value)
|
|
15
|
-
|| Guard.IsArray(value) && value.every(value => Guard.IsString(value)));
|
|
15
|
+
|| (Guard.IsArray(value) && value.every(value => Guard.IsString(value))));
|
|
16
16
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type TSchemaOptions } from '../types/schema.mjs';
|
|
2
2
|
import { type TProperties } from '../types/properties.mjs';
|
|
3
3
|
import { type TDeferred } from '../types/deferred.mjs';
|
|
4
|
-
import { type
|
|
4
|
+
import { type TState } from '../engine/instantiate.mjs';
|
|
5
|
+
import { type TModuleInstantiate } from '../engine/module/instantiate.mjs';
|
|
5
6
|
/** Creates a deferred Module action. */
|
|
6
|
-
export type TModuleDeferred<
|
|
7
|
+
export type TModuleDeferred<Declarations extends TProperties> = (TDeferred<'Module', [Declarations]>);
|
|
7
8
|
/** Creates a deferred Module action. */
|
|
8
|
-
export declare function ModuleDeferred<
|
|
9
|
-
/**
|
|
10
|
-
export type TModule<
|
|
11
|
-
/**
|
|
12
|
-
export declare function Module<
|
|
9
|
+
export declare function ModuleDeferred<Declarations extends TProperties>(declarations: Declarations, options?: TSchemaOptions): TModuleDeferred<Declarations>;
|
|
10
|
+
/** Creates a Module with the given declarations */
|
|
11
|
+
export type TModule<Declarations extends TProperties> = (TModuleInstantiate<{}, TState<[], []>, Declarations>);
|
|
12
|
+
/** Creates a Module with the given declarations */
|
|
13
|
+
export declare function Module<Declarations extends TProperties>(declarations: Declarations, options?: TSchemaOptions): TModule<Declarations>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// deno-lint-ignore-file ban-types
|
|
2
2
|
// deno-fmt-ignore-file
|
|
3
3
|
import { Deferred } from '../types/deferred.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { State } from '../engine/instantiate.mjs';
|
|
5
|
+
import { ModuleInstantiate } from '../engine/module/instantiate.mjs';
|
|
5
6
|
/** Creates a deferred Module action. */
|
|
6
|
-
export function ModuleDeferred(
|
|
7
|
-
return Deferred('Module', [
|
|
7
|
+
export function ModuleDeferred(declarations, options = {}) {
|
|
8
|
+
return Deferred('Module', [declarations], options);
|
|
8
9
|
}
|
|
9
|
-
/**
|
|
10
|
-
export function Module(
|
|
11
|
-
return
|
|
10
|
+
/** Creates a Module with the given declarations */
|
|
11
|
+
export function Module(declarations, options = {}) {
|
|
12
|
+
return ModuleInstantiate({}, State([], []), declarations, options);
|
|
12
13
|
}
|
|
@@ -131,7 +131,7 @@ type TInstantiateDeferred<Context extends TProperties, State extends TState, Act
|
|
|
131
131
|
] extends ['Mapped', [infer Name extends TIdentifier, infer Key extends TSchema, infer As extends TSchema, infer Property extends TSchema]] ? TMappedInstantiate<Context, State, Name, Key, As, Property> : [
|
|
132
132
|
Action,
|
|
133
133
|
Parameters
|
|
134
|
-
] extends ['Module', [infer
|
|
134
|
+
] extends ['Module', [infer Declarations extends TProperties]] ? TModuleInstantiate<Context, State, Declarations> : [
|
|
135
135
|
Action,
|
|
136
136
|
Parameters
|
|
137
137
|
] extends ['NonNullable', [infer Type extends TSchema]] ? TNonNullableInstantiate<Context, State, Type> : [
|
|
@@ -5,15 +5,15 @@ import { type TState } from '../instantiate.mjs';
|
|
|
5
5
|
import { type TCyclicCandidates } from '../cyclic/candidates.mjs';
|
|
6
6
|
import { type TInstantiateCyclic } from '../cyclic/instantiate.mjs';
|
|
7
7
|
import { type TInstantiateType } from '../instantiate.mjs';
|
|
8
|
-
type TInstantiateCyclics<Context extends TProperties, CyclicKeys extends string[], Result extends TProperties = {
|
|
9
|
-
[Key in Extract<keyof
|
|
8
|
+
type TInstantiateCyclics<Context extends TProperties, Declarations extends TProperties, CyclicKeys extends string[], DeclarationContext extends TProperties = Memory.TAssign<Context, Declarations>, Result extends TProperties = {
|
|
9
|
+
[Key in Extract<keyof Declarations, CyclicKeys[number]>]: TInstantiateCyclic<DeclarationContext, Key, Declarations[Key]>;
|
|
10
10
|
}> = Result;
|
|
11
|
-
type TInstantiateNonCyclics<Context extends TProperties, CyclicKeys extends string[], Result extends TProperties = {
|
|
12
|
-
[Key in Exclude<keyof
|
|
11
|
+
type TInstantiateNonCyclics<Context extends TProperties, Declarations extends TProperties, CyclicKeys extends string[], DeclarationContext extends TProperties = Memory.TAssign<Context, Declarations>, Result extends TProperties = {
|
|
12
|
+
[Key in Exclude<keyof Declarations, CyclicKeys[number]>]: TInstantiateType<DeclarationContext, TState<[], []>, Declarations[Key]>;
|
|
13
13
|
}> = Result;
|
|
14
|
-
type TInstantiateModule<Context extends TProperties, CyclicCandidates extends string[] = TCyclicCandidates<
|
|
14
|
+
type TInstantiateModule<Context extends TProperties, Declarations extends TProperties, CyclicCandidates extends string[] = TCyclicCandidates<Declarations>, InstantiatedCyclics extends TProperties = TInstantiateCyclics<Context, Declarations, CyclicCandidates>, InstantiatedNonCyclics extends TProperties = TInstantiateNonCyclics<Context, Declarations, CyclicCandidates>, InstantiatedModule extends TProperties = InstantiatedCyclics & InstantiatedNonCyclics> = {
|
|
15
15
|
[Key in keyof InstantiatedModule]: InstantiatedModule[Key];
|
|
16
16
|
} & {};
|
|
17
|
-
export type TModuleInstantiate<Context extends TProperties, _State extends TState,
|
|
18
|
-
export declare function ModuleInstantiate<Context extends TProperties, State extends TState,
|
|
17
|
+
export type TModuleInstantiate<Context extends TProperties, _State extends TState, Declarations extends TProperties, InstantiatedModule extends TProperties = TInstantiateModule<Context, Declarations>> = InstantiatedModule;
|
|
18
|
+
export declare function ModuleInstantiate<Context extends TProperties, State extends TState, Declarations extends TProperties>(context: Context, _state: State, declarations: Declarations, options: TSchemaOptions): TModuleInstantiate<Context, State, Declarations>;
|
|
19
19
|
export {};
|
|
@@ -9,27 +9,28 @@ import { State } from '../instantiate.mjs';
|
|
|
9
9
|
import { CyclicCandidates } from '../cyclic/candidates.mjs';
|
|
10
10
|
import { InstantiateCyclic } from '../cyclic/instantiate.mjs';
|
|
11
11
|
import { InstantiateType } from '../instantiate.mjs';
|
|
12
|
-
function InstantiateCyclics(context, cyclicKeys) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
function InstantiateCyclics(context, declarations, cyclicKeys) {
|
|
13
|
+
const declarationContext = Memory.Assign(context, declarations);
|
|
14
|
+
const declarationKeys = Guard.Keys(declarations).filter(key => cyclicKeys.includes(key));
|
|
15
|
+
return declarationKeys.reduce((result, key) => {
|
|
16
|
+
return { ...result, [key]: InstantiateCyclic(declarationContext, key, declarations[key]) };
|
|
16
17
|
}, {});
|
|
17
18
|
}
|
|
18
|
-
function InstantiateNonCyclics(context, cyclicKeys) {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
function InstantiateNonCyclics(context, declarations, cyclicKeys) {
|
|
20
|
+
const declarationContext = Memory.Assign(context, declarations);
|
|
21
|
+
const declarationKeys = Guard.Keys(declarations).filter(key => !cyclicKeys.includes(key));
|
|
22
|
+
return declarationKeys.reduce((result, key) => {
|
|
23
|
+
return { ...result, [key]: InstantiateType(declarationContext, State([], []), declarations[key]) };
|
|
22
24
|
}, {});
|
|
23
25
|
}
|
|
24
|
-
function InstantiateModule(context, options) {
|
|
25
|
-
const cyclicCandidates = CyclicCandidates(
|
|
26
|
-
const instantiatedCyclics = InstantiateCyclics(context, cyclicCandidates);
|
|
27
|
-
const instantiatedNonCyclics = InstantiateNonCyclics(context, cyclicCandidates);
|
|
26
|
+
function InstantiateModule(context, declarations, options) {
|
|
27
|
+
const cyclicCandidates = CyclicCandidates(declarations);
|
|
28
|
+
const instantiatedCyclics = InstantiateCyclics(context, declarations, cyclicCandidates);
|
|
29
|
+
const instantiatedNonCyclics = InstantiateNonCyclics(context, declarations, cyclicCandidates);
|
|
28
30
|
const instantiatedModule = { ...instantiatedCyclics, ...instantiatedNonCyclics };
|
|
29
31
|
return Memory.Update(instantiatedModule, {}, options);
|
|
30
32
|
}
|
|
31
|
-
export function ModuleInstantiate(context, _state,
|
|
32
|
-
const
|
|
33
|
-
const instantiatedModule = InstantiateModule(moduleContext, options);
|
|
33
|
+
export function ModuleInstantiate(context, _state, declarations, options) {
|
|
34
|
+
const instantiatedModule = InstantiateModule(context, declarations, options);
|
|
34
35
|
return instantiatedModule;
|
|
35
36
|
}
|
|
@@ -159,7 +159,7 @@ export type TExtendsMapping<Input extends [unknown, unknown, unknown, unknown, u
|
|
|
159
159
|
export declare function ExtendsMapping(input: [unknown, unknown, unknown, unknown, unknown, unknown] | []): unknown;
|
|
160
160
|
export type TBaseMapping<Input extends [unknown, unknown, unknown] | unknown> = (Input extends ['(', infer Type extends T.TSchema, ')'] ? Type : Input extends infer Type extends T.TSchema ? Type : never);
|
|
161
161
|
export declare function BaseMapping(input: [unknown, unknown, unknown] | unknown): unknown;
|
|
162
|
-
export type TWithMapping<Input extends [unknown, unknown] | []> = (Input extends ['with', infer
|
|
162
|
+
export type TWithMapping<Input extends [unknown, unknown] | []> = (Input extends ['with', infer WithObject extends Record<PropertyKey, unknown>] ? WithObject : []);
|
|
163
163
|
export declare function WithMapping(input: [unknown, unknown] | []): unknown;
|
|
164
164
|
type TFactorIndexArray<Type extends T.TSchema, IndexArray extends unknown[]> = (IndexArray extends [infer Left extends T.TSchema[], ...infer Right extends unknown[]] ? (Left extends [infer Indexer extends T.TSchema] ? TFactorIndexArray<S.TIndexDeferred<Type, Indexer>, Right> : Left extends [] ? TFactorIndexArray<T.TArray<Type>, Right> : T.TNever) : Type);
|
|
165
165
|
type TFactorExtends<Type extends T.TSchema, Extends extends unknown[]> = (Extends extends [infer Right extends T.TSchema, infer True extends T.TSchema, infer False extends T.TSchema] ? S.TConditionalDeferred<Type, Right, True, False> : Type);
|
|
@@ -276,31 +276,35 @@ export type T_Mapped_Mapping<Input extends [unknown, unknown, unknown, unknown,
|
|
|
276
276
|
export declare function _Mapped_Mapping(input: [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]): unknown;
|
|
277
277
|
export type TReferenceMapping<Input extends string, Result extends T.TSchema = T.TRef<Input>> = Result;
|
|
278
278
|
export declare function ReferenceMapping(input: string): unknown;
|
|
279
|
-
export type
|
|
280
|
-
export declare function
|
|
281
|
-
export type
|
|
282
|
-
export declare function
|
|
283
|
-
export type
|
|
284
|
-
export declare function
|
|
285
|
-
export type
|
|
286
|
-
export declare function
|
|
287
|
-
export type
|
|
279
|
+
export type TWithBigIntMapping<Input extends string> = (Input extends `${infer Value extends bigint}` ? Value : never);
|
|
280
|
+
export declare function WithBigIntMapping(input: string): unknown;
|
|
281
|
+
export type TWithNumberMapping<Input extends string> = (Input extends `${infer Value extends number}` ? Value : never);
|
|
282
|
+
export declare function WithNumberMapping(input: string): unknown;
|
|
283
|
+
export type TWithBooleanMapping<Input extends 'true' | 'false'> = (Input extends 'true' ? true : false);
|
|
284
|
+
export declare function WithBooleanMapping(input: 'true' | 'false'): unknown;
|
|
285
|
+
export type TWithStringMapping<Input extends string> = (Input);
|
|
286
|
+
export declare function WithStringMapping(input: string): unknown;
|
|
287
|
+
export type TWithNullMapping<Input extends 'null'> = (null);
|
|
288
|
+
export declare function WithNullMapping(input: 'null'): unknown;
|
|
289
|
+
export type TWithUndefinedMapping<Input extends 'undefined'> = undefined;
|
|
290
|
+
export declare function WithUndefinedMapping(input: 'undefined'): unknown;
|
|
291
|
+
export type TWithPropertyMapping<Input extends [unknown, unknown, unknown]> = (Input extends [infer Key extends string, ':', infer Value extends unknown] ? {
|
|
288
292
|
[_ in Key]: Value;
|
|
289
293
|
} : never);
|
|
290
|
-
export declare function
|
|
291
|
-
export type
|
|
292
|
-
export declare function
|
|
293
|
-
type
|
|
294
|
+
export declare function WithPropertyMapping(input: [unknown, unknown, unknown]): unknown;
|
|
295
|
+
export type TWithPropertyListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
296
|
+
export declare function WithPropertyListMapping(input: [unknown, unknown]): unknown;
|
|
297
|
+
type TWithObjectMappingReduce<PropertyList extends Record<PropertyKey, unknown>[], Result extends Record<PropertyKey, unknown> = {}> = (PropertyList extends [infer Left extends Record<PropertyKey, unknown>, ...infer Right extends Record<PropertyKey, unknown>[]] ? TWithObjectMappingReduce<Right, Memory.TAssign<Result, Left>> : {
|
|
294
298
|
[Key in keyof Result]: Result[Key];
|
|
295
299
|
});
|
|
296
|
-
export type
|
|
297
|
-
export declare function
|
|
298
|
-
export type
|
|
299
|
-
export declare function
|
|
300
|
-
export type
|
|
301
|
-
export declare function
|
|
302
|
-
export type
|
|
303
|
-
export declare function
|
|
300
|
+
export type TWithObjectMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['{', infer PropertyList extends Record<PropertyKey, unknown>[], '}'] ? TWithObjectMappingReduce<PropertyList> : {});
|
|
301
|
+
export declare function WithObjectMapping(input: [unknown, unknown, unknown]): unknown;
|
|
302
|
+
export type TWithElementListMapping<Input extends [unknown, unknown]> = (TDelimited<Input>);
|
|
303
|
+
export declare function WithElementListMapping(input: [unknown, unknown]): unknown;
|
|
304
|
+
export type TWithArrayMapping<Input extends [unknown, unknown, unknown]> = (Input extends ['[', infer Elements extends unknown[], ']'] ? Elements : never);
|
|
305
|
+
export declare function WithArrayMapping(input: [unknown, unknown, unknown]): unknown;
|
|
306
|
+
export type TWithValueMapping<Input extends unknown> = (Input);
|
|
307
|
+
export declare function WithValueMapping(input: unknown): unknown;
|
|
304
308
|
export type TPatternBigIntMapping<Input extends '-?(?:0|[1-9][0-9]*)n'> = (T.TBigInt);
|
|
305
309
|
export declare function PatternBigIntMapping(input: '-?(?:0|[1-9][0-9]*)n'): unknown;
|
|
306
310
|
export type TPatternStringMapping<Input extends '.*'> = (T.TString);
|
|
@@ -413,39 +413,45 @@ export function _Mapped_Mapping(input) {
|
|
|
413
413
|
export function ReferenceMapping(input) {
|
|
414
414
|
return T.Ref(input);
|
|
415
415
|
}
|
|
416
|
-
export function
|
|
416
|
+
export function WithBigIntMapping(input) {
|
|
417
|
+
return BigInt(input);
|
|
418
|
+
}
|
|
419
|
+
export function WithNumberMapping(input) {
|
|
417
420
|
return parseFloat(input);
|
|
418
421
|
}
|
|
419
|
-
export function
|
|
422
|
+
export function WithBooleanMapping(input) {
|
|
420
423
|
return Guard.IsEqual(input, 'true');
|
|
421
424
|
}
|
|
422
|
-
export function
|
|
425
|
+
export function WithStringMapping(input) {
|
|
423
426
|
return input;
|
|
424
427
|
}
|
|
425
|
-
export function
|
|
428
|
+
export function WithNullMapping(input) {
|
|
426
429
|
return null;
|
|
427
430
|
}
|
|
428
|
-
export function
|
|
431
|
+
export function WithUndefinedMapping(input) {
|
|
432
|
+
return undefined;
|
|
433
|
+
}
|
|
434
|
+
export function WithPropertyMapping(input) {
|
|
429
435
|
return { [input[0]]: input[2] };
|
|
430
436
|
}
|
|
431
|
-
export function
|
|
437
|
+
export function WithPropertyListMapping(input) {
|
|
432
438
|
return Delimited(input);
|
|
433
439
|
}
|
|
434
|
-
function
|
|
440
|
+
function WithObjectMappingReduce(propertyList) {
|
|
435
441
|
return propertyList.reduce((result, left) => {
|
|
436
442
|
return Memory.Assign(result, left);
|
|
437
443
|
}, {});
|
|
438
444
|
}
|
|
439
|
-
export function
|
|
440
|
-
return
|
|
445
|
+
export function WithObjectMapping(input) {
|
|
446
|
+
return WithObjectMappingReduce(input[1]);
|
|
441
447
|
}
|
|
442
|
-
export function
|
|
448
|
+
export function WithElementListMapping(input) {
|
|
443
449
|
return Delimited(input);
|
|
444
450
|
}
|
|
445
|
-
export function
|
|
451
|
+
export function WithArrayMapping(input) {
|
|
446
452
|
return input[1];
|
|
447
453
|
}
|
|
448
|
-
export function
|
|
454
|
+
export function WithValueMapping(input) {
|
|
449
455
|
return input;
|
|
450
456
|
}
|
|
451
457
|
export function PatternBigIntMapping(input) {
|
|
@@ -42,7 +42,7 @@ export type TIndexArray_0<Input extends string, Result extends unknown[] = []> =
|
|
|
42
42
|
export type TIndexArray<Input extends string> = TIndexArray_0<Input> extends [infer _0 extends ([unknown, unknown, unknown] | [unknown, unknown])[], infer Input extends string] ? [S.TIndexArrayMapping<_0>, Input] : [];
|
|
43
43
|
export type TExtends<Input extends string> = ((Token.TConst<'extends', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'?', Input> extends [infer _2, infer Input extends string] ? (TType<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5], Input] : []) : []) : []) : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExtendsMapping<_0>, Input] : [];
|
|
44
44
|
export type TBase<Input extends string> = ((Token.TConst<'(', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<')', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUndefined<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNull<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordInteger<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordUnknown<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordAny<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordObject<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordNever<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordSymbol<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordVoid<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TKeywordThis<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TLiteralString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TTemplateLiteral<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TDependent<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Object_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Tuple_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Constructor_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Function_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : T_Mapped_<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TGenericCall<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TReference<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | unknown, infer Input extends string] ? [S.TBaseMapping<_0>, Input] : [];
|
|
45
|
-
export type TWith<Input extends string> = ((Token.TConst<'with', Input> extends [infer _0, infer Input extends string] ? (
|
|
45
|
+
export type TWith<Input extends string> = ((Token.TConst<'with', Input> extends [infer _0, infer Input extends string] ? (TWithObject<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TWithMapping<_0>, Input] : [];
|
|
46
46
|
export type TFactor<Input extends string> = (TKeyOf<Input> extends [infer _0, infer Input extends string] ? (TBase<Input> extends [infer _1, infer Input extends string] ? (TIndexArray<Input> extends [infer _2, infer Input extends string] ? (TExtends<Input> extends [infer _3, infer Input extends string] ? (TWith<Input> extends [infer _4, infer Input extends string] ? [[_0, _1, _2, _3, _4], Input] : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.TFactorMapping<_0>, Input] : [];
|
|
47
47
|
export type TExprTermTail<Input extends string> = ((Token.TConst<'&', Input> extends [infer _0, infer Input extends string] ? (TFactor<Input> extends [infer _1, infer Input extends string] ? (TExprTermTail<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown, unknown] | [], infer Input extends string] ? [S.TExprTermTailMapping<_0>, Input] : [];
|
|
48
48
|
export type TExprTerm<Input extends string> = (TFactor<Input> extends [infer _0, infer Input extends string] ? (TExprTermTail<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TExprTermMapping<_0>, Input] : [];
|
|
@@ -90,18 +90,20 @@ export type TMappedOptional<Input extends string> = ((Token.TConst<'+', Input> e
|
|
|
90
90
|
export type TMappedAs<Input extends string> = ((Token.TConst<'as', Input> extends [infer _0, infer Input extends string] ? (TType<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends [unknown, unknown] | [], infer Input extends string] ? [S.TMappedAsMapping<_0>, Input] : [];
|
|
91
91
|
export type T_Mapped_<Input extends string> = (Token.TConst<'{', Input> extends [infer _0, infer Input extends string] ? (TMappedReadonly<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'[', Input> extends [infer _2, infer Input extends string] ? (Token.TIdent<Input> extends [infer _3, infer Input extends string] ? (Token.TConst<'in', Input> extends [infer _4, infer Input extends string] ? (TType<Input> extends [infer _5, infer Input extends string] ? (TMappedAs<Input> extends [infer _6, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _7, infer Input extends string] ? (TMappedOptional<Input> extends [infer _8, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _9, infer Input extends string] ? (TType<Input> extends [infer _10, infer Input extends string] ? (TOptionalSemiColon<Input> extends [infer _11, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _12, infer Input extends string] ? [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], Input] : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown], infer Input extends string] ? [S.T_Mapped_Mapping<_0>, Input] : [];
|
|
92
92
|
export type TReference<Input extends string> = Token.TIdent<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TReferenceMapping<_0>, Input] : [];
|
|
93
|
-
export type
|
|
94
|
-
export type
|
|
95
|
-
export type
|
|
96
|
-
export type
|
|
97
|
-
export type
|
|
98
|
-
export type
|
|
99
|
-
export type
|
|
100
|
-
export type
|
|
101
|
-
export type
|
|
102
|
-
export type
|
|
103
|
-
export type
|
|
104
|
-
export type
|
|
93
|
+
export type TWithBigInt<Input extends string> = Token.TBigInt<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TWithBigIntMapping<_0>, Input] : [];
|
|
94
|
+
export type TWithNumber<Input extends string> = Token.TNumber<Input> extends [infer _0 extends string, infer Input extends string] ? [S.TWithNumberMapping<_0>, Input] : [];
|
|
95
|
+
export type TWithBoolean<Input extends string> = (Token.TConst<'true', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : Token.TConst<'false', Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends 'true' | 'false', infer Input extends string] ? [S.TWithBooleanMapping<_0>, Input] : [];
|
|
96
|
+
export type TWithString<Input extends string> = Token.TString<['\"', '\''], Input> extends [infer _0 extends string, infer Input extends string] ? [S.TWithStringMapping<_0>, Input] : [];
|
|
97
|
+
export type TWithNull<Input extends string> = Token.TConst<'null', Input> extends [infer _0 extends 'null', infer Input extends string] ? [S.TWithNullMapping<_0>, Input] : [];
|
|
98
|
+
export type TWithUndefined<Input extends string> = Token.TConst<'undefined', Input> extends [infer _0 extends 'undefined', infer Input extends string] ? [S.TWithUndefinedMapping<_0>, Input] : [];
|
|
99
|
+
export type TWithProperty<Input extends string> = (TPropertyKey<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<':', Input> extends [infer _1, infer Input extends string] ? (TWithValue<Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TWithPropertyMapping<_0>, Input] : [];
|
|
100
|
+
export type TWithPropertyList_0<Input extends string, Result extends unknown[] = []> = (TWithProperty<Input> extends [infer _0, infer Input extends string] ? (TPropertyDelimiter<Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TWithPropertyList_0<Input, [...Result, _0]> : [Result, Input];
|
|
101
|
+
export type TWithPropertyList<Input extends string> = (TWithPropertyList_0<Input> extends [infer _0, infer Input extends string] ? (((TWithProperty<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TWithPropertyListMapping<_0>, Input] : [];
|
|
102
|
+
export type TWithObject<Input extends string> = (Token.TConst<'{', Input> extends [infer _0, infer Input extends string] ? (TWithPropertyList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<'}', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TWithObjectMapping<_0>, Input] : [];
|
|
103
|
+
export type TWithElementList_0<Input extends string, Result extends unknown[] = []> = (TWithValue<Input> extends [infer _0, infer Input extends string] ? (Token.TConst<',', Input> extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0, infer Input extends string] ? TWithElementList_0<Input, [...Result, _0]> : [Result, Input];
|
|
104
|
+
export type TWithElementList<Input extends string> = (TWithElementList_0<Input> extends [infer _0, infer Input extends string] ? (((TWithValue<Input> extends [infer _0, infer Input extends string] ? [[_0], Input] : []) extends [infer _0, infer Input extends string] ? [_0, Input] : [[], Input] extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _1, infer Input extends string] ? [[_0, _1], Input] : []) : []) extends [infer _0 extends [unknown, unknown], infer Input extends string] ? [S.TWithElementListMapping<_0>, Input] : [];
|
|
105
|
+
export type TWithArray<Input extends string> = (Token.TConst<'[', Input> extends [infer _0, infer Input extends string] ? (TWithElementList<Input> extends [infer _1, infer Input extends string] ? (Token.TConst<']', Input> extends [infer _2, infer Input extends string] ? [[_0, _1, _2], Input] : []) : []) : []) extends [infer _0 extends [unknown, unknown, unknown], infer Input extends string] ? [S.TWithArrayMapping<_0>, Input] : [];
|
|
106
|
+
export type TWithValue<Input extends string> = (TWithBigInt<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithNumber<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithBoolean<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithString<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithNull<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithUndefined<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithObject<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : TWithArray<Input> extends [infer _0, infer Input extends string] ? [_0, Input] : []) extends [infer _0 extends unknown, infer Input extends string] ? [S.TWithValueMapping<_0>, Input] : [];
|
|
105
107
|
export type TPatternBigInt<Input extends string> = Token.TConst<'-?(?:0|[1-9][0-9]*)n', Input> extends [infer _0 extends '-?(?:0|[1-9][0-9]*)n', infer Input extends string] ? [S.TPatternBigIntMapping<_0>, Input] : [];
|
|
106
108
|
export type TPatternString<Input extends string> = Token.TConst<'.*', Input> extends [infer _0 extends '.*', infer Input extends string] ? [S.TPatternStringMapping<_0>, Input] : [];
|
|
107
109
|
export type TPatternNumber<Input extends string> = Token.TConst<'-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?', Input> extends [infer _0 extends '-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?', infer Input extends string] ? [S.TPatternNumberMapping<_0>, Input] : [];
|
|
@@ -218,18 +220,20 @@ export declare const MappedOptional: (input: string) => [unknown, string] | [];
|
|
|
218
220
|
export declare const MappedAs: (input: string) => [unknown, string] | [];
|
|
219
221
|
export declare const _Mapped_: (input: string) => [unknown, string] | [];
|
|
220
222
|
export declare const Reference: (input: string) => [unknown, string] | [];
|
|
221
|
-
export declare const
|
|
222
|
-
export declare const
|
|
223
|
-
export declare const
|
|
224
|
-
export declare const
|
|
225
|
-
export declare const
|
|
226
|
-
export declare const
|
|
227
|
-
export declare const
|
|
228
|
-
export declare const
|
|
229
|
-
export declare const
|
|
230
|
-
export declare const
|
|
231
|
-
export declare const
|
|
232
|
-
export declare const
|
|
223
|
+
export declare const WithBigInt: (input: string) => [unknown, string] | [];
|
|
224
|
+
export declare const WithNumber: (input: string) => [unknown, string] | [];
|
|
225
|
+
export declare const WithBoolean: (input: string) => [unknown, string] | [];
|
|
226
|
+
export declare const WithString: (input: string) => [unknown, string] | [];
|
|
227
|
+
export declare const WithNull: (input: string) => [unknown, string] | [];
|
|
228
|
+
export declare const WithUndefined: (input: string) => [unknown, string] | [];
|
|
229
|
+
export declare const WithProperty: (input: string) => [unknown, string] | [];
|
|
230
|
+
export declare const WithPropertyList_0: (input: string, result?: unknown[]) => [unknown[], string];
|
|
231
|
+
export declare const WithPropertyList: (input: string) => [unknown, string] | [];
|
|
232
|
+
export declare const WithObject: (input: string) => [unknown, string] | [];
|
|
233
|
+
export declare const WithElementList_0: (input: string, result?: unknown[]) => [unknown[], string];
|
|
234
|
+
export declare const WithElementList: (input: string) => [unknown, string] | [];
|
|
235
|
+
export declare const WithArray: (input: string) => [unknown, string] | [];
|
|
236
|
+
export declare const WithValue: (input: string) => [unknown, string] | [];
|
|
233
237
|
export declare const PatternBigInt: (input: string) => [unknown, string] | [];
|
|
234
238
|
export declare const PatternString: (input: string) => [unknown, string] | [];
|
|
235
239
|
export declare const PatternNumber: (input: string) => [unknown, string] | [];
|
|
@@ -46,7 +46,7 @@ export const IndexArray_0 = (input, result = []) => If(If(If(Token.Const('[', in
|
|
|
46
46
|
export const IndexArray = (input) => If(IndexArray_0(input), ([_0, input]) => [S.IndexArrayMapping(_0), input]);
|
|
47
47
|
export const Extends = (input) => If(If(If(Token.Const('extends', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const('?', input), ([_2, input]) => If(Type(input), ([_3, input]) => If(Token.Const(':', input), ([_4, input]) => If(Type(input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0), input]);
|
|
48
48
|
export const Base = (input) => If(If(If(Token.Const('(', input), ([_0, input]) => If(Type(input), ([_1, input]) => If(Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(KeywordString(input), ([_0, input]) => [_0, input], () => If(KeywordNumber(input), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input), ([_0, input]) => [_0, input], () => If(KeywordNull(input), ([_0, input]) => [_0, input], () => If(KeywordInteger(input), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input), ([_0, input]) => [_0, input], () => If(KeywordAny(input), ([_0, input]) => [_0, input], () => If(KeywordObject(input), ([_0, input]) => [_0, input], () => If(KeywordNever(input), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input), ([_0, input]) => [_0, input], () => If(KeywordVoid(input), ([_0, input]) => [_0, input], () => If(KeywordThis(input), ([_0, input]) => [_0, input], () => If(LiteralBigInt(input), ([_0, input]) => [_0, input], () => If(LiteralBoolean(input), ([_0, input]) => [_0, input], () => If(LiteralNumber(input), ([_0, input]) => [_0, input], () => If(LiteralString(input), ([_0, input]) => [_0, input], () => If(TemplateLiteral(input), ([_0, input]) => [_0, input], () => If(Dependent(input), ([_0, input]) => [_0, input], () => If(_Object_(input), ([_0, input]) => [_0, input], () => If(_Tuple_(input), ([_0, input]) => [_0, input], () => If(_Constructor_(input), ([_0, input]) => [_0, input], () => If(_Function_(input), ([_0, input]) => [_0, input], () => If(_Mapped_(input), ([_0, input]) => [_0, input], () => If(GenericCall(input), ([_0, input]) => [_0, input], () => If(Reference(input), ([_0, input]) => [_0, input], () => [])))))))))))))))))))))))))))), ([_0, input]) => [S.BaseMapping(_0), input]);
|
|
49
|
-
export const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(
|
|
49
|
+
export const With = (input) => If(If(If(Token.Const('with', input), ([_0, input]) => If(WithObject(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithMapping(_0), input]);
|
|
50
50
|
export const Factor = (input) => If(If(KeyOf(input), ([_0, input]) => If(Base(input), ([_1, input]) => If(IndexArray(input), ([_2, input]) => If(Extends(input), ([_3, input]) => If(With(input), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FactorMapping(_0), input]);
|
|
51
51
|
export const ExprTermTail = (input) => If(If(If(Token.Const('&', input), ([_0, input]) => If(Factor(input), ([_1, input]) => If(ExprTermTail(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0), input]);
|
|
52
52
|
export const ExprTerm = (input) => If(If(Factor(input), ([_0, input]) => If(ExprTermTail(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0), input]);
|
|
@@ -94,18 +94,20 @@ export const MappedOptional = (input) => If(If(If(Token.Const('+', input), ([_0,
|
|
|
94
94
|
export const MappedAs = (input) => If(If(If(Token.Const('as', input), ([_0, input]) => If(Type(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.MappedAsMapping(_0), input]);
|
|
95
95
|
export const _Mapped_ = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(MappedReadonly(input), ([_1, input]) => If(Token.Const('[', input), ([_2, input]) => If(Token.Ident(input), ([_3, input]) => If(Token.Const('in', input), ([_4, input]) => If(Type(input), ([_5, input]) => If(MappedAs(input), ([_6, input]) => If(Token.Const(']', input), ([_7, input]) => If(MappedOptional(input), ([_8, input]) => If(Token.Const(':', input), ([_9, input]) => If(Type(input), ([_10, input]) => If(OptionalSemiColon(input), ([_11, input]) => If(Token.Const('}', input), ([_12, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12], input]))))))))))))), ([_0, input]) => [S._Mapped_Mapping(_0), input]);
|
|
96
96
|
export const Reference = (input) => If(Token.Ident(input), ([_0, input]) => [S.ReferenceMapping(_0), input]);
|
|
97
|
-
export const
|
|
98
|
-
export const
|
|
99
|
-
export const
|
|
100
|
-
export const
|
|
101
|
-
export const
|
|
102
|
-
export const
|
|
103
|
-
export const
|
|
104
|
-
export const
|
|
105
|
-
export const
|
|
106
|
-
export const
|
|
107
|
-
export const
|
|
108
|
-
export const
|
|
97
|
+
export const WithBigInt = (input) => If(Token.BigInt(input), ([_0, input]) => [S.WithBigIntMapping(_0), input]);
|
|
98
|
+
export const WithNumber = (input) => If(Token.Number(input), ([_0, input]) => [S.WithNumberMapping(_0), input]);
|
|
99
|
+
export const WithBoolean = (input) => If(If(Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.WithBooleanMapping(_0), input]);
|
|
100
|
+
export const WithString = (input) => If(Token.String(['\"', '\''], input), ([_0, input]) => [S.WithStringMapping(_0), input]);
|
|
101
|
+
export const WithNull = (input) => If(Token.Const('null', input), ([_0, input]) => [S.WithNullMapping(_0), input]);
|
|
102
|
+
export const WithUndefined = (input) => If(Token.Const('undefined', input), ([_0, input]) => [S.WithUndefinedMapping(_0), input]);
|
|
103
|
+
export const WithProperty = (input) => If(If(PropertyKey(input), ([_0, input]) => If(Token.Const(':', input), ([_1, input]) => If(WithValue(input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithPropertyMapping(_0), input]);
|
|
104
|
+
export const WithPropertyList_0 = (input, result = []) => If(If(WithProperty(input), ([_0, input]) => If(PropertyDelimiter(input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithPropertyList_0(input, [...result, _0]), () => [result, input]);
|
|
105
|
+
export const WithPropertyList = (input) => If(If(WithPropertyList_0(input), ([_0, input]) => If(If(If(WithProperty(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.WithPropertyListMapping(_0), input]);
|
|
106
|
+
export const WithObject = (input) => If(If(Token.Const('{', input), ([_0, input]) => If(WithPropertyList(input), ([_1, input]) => If(Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithObjectMapping(_0), input]);
|
|
107
|
+
export const WithElementList_0 = (input, result = []) => If(If(WithValue(input), ([_0, input]) => If(Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => WithElementList_0(input, [...result, _0]), () => [result, input]);
|
|
108
|
+
export const WithElementList = (input) => If(If(WithElementList_0(input), ([_0, input]) => If(If(If(WithValue(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.WithElementListMapping(_0), input]);
|
|
109
|
+
export const WithArray = (input) => If(If(Token.Const('[', input), ([_0, input]) => If(WithElementList(input), ([_1, input]) => If(Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.WithArrayMapping(_0), input]);
|
|
110
|
+
export const WithValue = (input) => If(If(WithBigInt(input), ([_0, input]) => [_0, input], () => If(WithNumber(input), ([_0, input]) => [_0, input], () => If(WithBoolean(input), ([_0, input]) => [_0, input], () => If(WithString(input), ([_0, input]) => [_0, input], () => If(WithNull(input), ([_0, input]) => [_0, input], () => If(WithUndefined(input), ([_0, input]) => [_0, input], () => If(WithObject(input), ([_0, input]) => [_0, input], () => If(WithArray(input), ([_0, input]) => [_0, input], () => [])))))))), ([_0, input]) => [S.WithValueMapping(_0), input]);
|
|
109
111
|
export const PatternBigInt = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)n', input), ([_0, input]) => [S.PatternBigIntMapping(_0), input]);
|
|
110
112
|
export const PatternString = (input) => If(Token.Const('.*', input), ([_0, input]) => [S.PatternStringMapping(_0), input]);
|
|
111
113
|
export const PatternNumber = (input) => If(Token.Const('-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?', input), ([_0, input]) => [S.PatternNumberMapping(_0), input]);
|