arktype 2.0.0-dev.0 → 2.0.0-dev.10
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/__tests__/array.test.ts +270 -151
- package/__tests__/badDefinitionType.test.ts +10 -3
- package/__tests__/basis.test.ts +6 -2
- package/__tests__/bounds.test.ts +282 -352
- package/__tests__/cast.test.ts +7 -2
- package/__tests__/completions.test.ts +8 -3
- package/__tests__/config.test.ts +95 -167
- package/__tests__/dateLiteral.test.ts +8 -4
- package/__tests__/declared.test.ts +7 -6
- package/__tests__/discrimination.test.ts +1 -1
- package/__tests__/divisor.test.ts +46 -22
- package/__tests__/enclosed.test.ts +39 -25
- package/__tests__/examples.test.ts +56 -56
- package/__tests__/expressions.test.ts +184 -112
- package/__tests__/generic.test.ts +307 -288
- package/__tests__/group.test.ts +67 -54
- package/__tests__/imports.test.ts +62 -49
- package/__tests__/instanceof.test.ts +25 -23
- package/__tests__/intersection.test.ts +52 -48
- package/__tests__/keyTraversal.test.ts +77 -73
- package/__tests__/keyof.test.ts +68 -52
- package/__tests__/keywords.test.ts +164 -138
- package/__tests__/literal.test.ts +60 -21
- package/__tests__/match.bench.ts +31 -0
- package/__tests__/match.test.ts +222 -22
- package/__tests__/narrow.test.ts +52 -54
- package/__tests__/objectLiteral.test.ts +347 -205
- package/__tests__/operator.bench.ts +4 -4
- package/__tests__/pipe.test.ts +501 -0
- package/__tests__/realWorld.test.ts +63 -0
- package/__tests__/regex.test.ts +17 -7
- package/__tests__/scope.bench.ts +1 -1
- package/__tests__/scope.test.ts +257 -23
- package/__tests__/serialization.test.ts +19 -0
- package/__tests__/string.test.ts +11 -7
- package/__tests__/submodule.test.ts +26 -39
- package/__tests__/this.test.ts +83 -57
- package/__tests__/thunk.test.ts +13 -7
- package/__tests__/traverse.test.ts +76 -54
- package/__tests__/tsGenerics.test.ts +12 -12
- package/__tests__/type.test.ts +36 -0
- package/__tests__/typeReference.test.ts +7 -7
- package/__tests__/unenclosed.test.ts +116 -100
- package/__tests__/union.test.ts +171 -104
- package/ark.ts +21 -65
- package/generic.ts +69 -0
- package/main.ts +6 -18
- package/match.ts +195 -93
- package/module.ts +15 -0
- package/out/ark.d.ts +15 -39
- package/out/ark.js +9 -18
- package/out/ark.js.map +1 -1
- package/out/generic.d.ts +21 -0
- package/out/generic.js +24 -0
- package/out/generic.js.map +1 -0
- package/out/main.d.ts +6 -7
- package/out/main.js +4 -3
- package/out/main.js.map +1 -1
- package/out/match.d.ts +57 -34
- package/out/match.js +51 -17
- package/out/match.js.map +1 -1
- package/out/module.d.ts +10 -0
- package/out/module.js +3 -0
- package/out/module.js.map +1 -0
- package/out/parser/definition.d.ts +11 -13
- package/out/parser/definition.js +10 -13
- package/out/parser/definition.js.map +1 -1
- package/out/parser/generic.d.ts +5 -7
- package/out/parser/generic.js +7 -11
- package/out/parser/generic.js.map +1 -1
- package/out/parser/objectLiteral.d.ts +45 -14
- package/out/parser/objectLiteral.js +61 -52
- package/out/parser/objectLiteral.js.map +1 -1
- package/out/parser/semantic/bounds.d.ts +10 -8
- package/out/parser/semantic/bounds.js +0 -1
- package/out/parser/semantic/bounds.js.map +1 -1
- package/out/parser/semantic/divisor.d.ts +5 -7
- package/out/parser/semantic/divisor.js +0 -1
- package/out/parser/semantic/infer.d.ts +24 -0
- package/out/parser/semantic/infer.js +1 -0
- package/out/parser/semantic/infer.js.map +1 -0
- package/out/parser/semantic/utils.d.ts +3 -7
- package/out/parser/semantic/utils.js +0 -1
- package/out/parser/semantic/validate.d.ts +15 -14
- package/out/parser/semantic/validate.js +1 -1
- package/out/parser/semantic/validate.js.map +1 -1
- package/out/parser/string/reduce/dynamic.d.ts +13 -13
- package/out/parser/string/reduce/dynamic.js +31 -26
- package/out/parser/string/reduce/dynamic.js.map +1 -1
- package/out/parser/string/reduce/shared.d.ts +6 -20
- package/out/parser/string/reduce/shared.js +0 -1
- package/out/parser/string/reduce/shared.js.map +1 -1
- package/out/parser/string/reduce/static.d.ts +27 -24
- package/out/parser/string/reduce/static.js +0 -1
- package/out/parser/string/shift/operand/date.d.ts +3 -3
- package/out/parser/string/shift/operand/date.js +4 -7
- package/out/parser/string/shift/operand/date.js.map +1 -1
- package/out/parser/string/shift/operand/enclosed.d.ts +4 -19
- package/out/parser/string/shift/operand/enclosed.js +12 -13
- package/out/parser/string/shift/operand/enclosed.js.map +1 -1
- package/out/parser/string/shift/operand/genericArgs.d.ts +9 -10
- package/out/parser/string/shift/operand/genericArgs.js +6 -10
- package/out/parser/string/shift/operand/genericArgs.js.map +1 -1
- package/out/parser/string/shift/operand/operand.d.ts +3 -4
- package/out/parser/string/shift/operand/operand.js +8 -12
- package/out/parser/string/shift/operand/operand.js.map +1 -1
- package/out/parser/string/shift/operand/unenclosed.d.ts +15 -22
- package/out/parser/string/shift/operand/unenclosed.js +24 -36
- package/out/parser/string/shift/operand/unenclosed.js.map +1 -1
- package/out/parser/string/shift/operator/bounds.d.ts +9 -13
- package/out/parser/string/shift/operator/bounds.js +43 -54
- package/out/parser/string/shift/operator/bounds.js.map +1 -1
- package/out/parser/string/shift/operator/divisor.d.ts +2 -4
- package/out/parser/string/shift/operator/divisor.js +1 -3
- package/out/parser/string/shift/operator/divisor.js.map +1 -1
- package/out/parser/string/shift/operator/operator.d.ts +2 -3
- package/out/parser/string/shift/operator/operator.js +12 -19
- package/out/parser/string/shift/operator/operator.js.map +1 -1
- package/out/parser/string/shift/scanner.d.ts +2 -2
- package/out/parser/string/shift/scanner.js +14 -16
- package/out/parser/string/shift/scanner.js.map +1 -1
- package/out/parser/string/string.d.ts +8 -6
- package/out/parser/string/string.js +1 -3
- package/out/parser/string/string.js.map +1 -1
- package/out/parser/tuple.d.ts +102 -43
- package/out/parser/tuple.js +119 -87
- package/out/parser/tuple.js.map +1 -1
- package/out/scope.d.ts +43 -120
- package/out/scope.js +39 -209
- package/out/scope.js.map +1 -1
- package/out/type.d.ts +43 -64
- package/out/type.js +30 -131
- package/out/type.js.map +1 -1
- package/package.json +7 -3
- package/parser/definition.ts +77 -93
- package/parser/generic.ts +38 -40
- package/parser/objectLiteral.ts +172 -136
- package/parser/semantic/bounds.ts +33 -32
- package/parser/semantic/divisor.ts +8 -10
- package/parser/semantic/infer.ts +141 -0
- package/parser/semantic/utils.ts +12 -23
- package/parser/semantic/validate.ts +81 -73
- package/parser/string/reduce/dynamic.ts +67 -55
- package/parser/string/reduce/shared.ts +1 -3
- package/parser/string/reduce/static.ts +67 -69
- package/parser/string/shift/operand/date.ts +15 -14
- package/parser/string/shift/operand/enclosed.ts +30 -25
- package/parser/string/shift/operand/genericArgs.ts +46 -45
- package/parser/string/shift/operand/operand.ts +32 -38
- package/parser/string/shift/operand/unenclosed.ts +107 -158
- package/parser/string/shift/operator/bounds.ts +118 -112
- package/parser/string/shift/operator/divisor.ts +14 -17
- package/parser/string/shift/operator/operator.ts +35 -46
- package/parser/string/shift/scanner.ts +51 -50
- package/parser/string/string.ts +30 -35
- package/parser/tuple.ts +375 -307
- package/scope.ts +170 -453
- package/type.ts +193 -274
- package/__tests__/astUtils.test.ts +0 -17
- package/__tests__/cyclic.test.ts +0 -144
- package/__tests__/jsdoc.test.ts +0 -64
- package/__tests__/morph.test.ts +0 -409
- package/__tests__/nodeDefinitions.test.ts +0 -190
- package/__tests__/typeMethods.test.ts +0 -69
- package/out/ark.d.ts.map +0 -1
- package/out/arkConfig.d.ts +0 -2
- package/out/arkConfig.d.ts.map +0 -1
- package/out/arkConfig.js +0 -10
- package/out/arkConfig.js.map +0 -1
- package/out/main.d.ts.map +0 -1
- package/out/match.d.ts.map +0 -1
- package/out/parser/definition.d.ts.map +0 -1
- package/out/parser/generic.d.ts.map +0 -1
- package/out/parser/objectLiteral.d.ts.map +0 -1
- package/out/parser/semantic/bounds.d.ts.map +0 -1
- package/out/parser/semantic/divisor.d.ts.map +0 -1
- package/out/parser/semantic/intersections.d.ts +0 -14
- package/out/parser/semantic/intersections.d.ts.map +0 -1
- package/out/parser/semantic/intersections.js +0 -2
- package/out/parser/semantic/intersections.js.map +0 -1
- package/out/parser/semantic/semantic.d.ts +0 -33
- package/out/parser/semantic/semantic.d.ts.map +0 -1
- package/out/parser/semantic/semantic.js +0 -2
- package/out/parser/semantic/semantic.js.map +0 -1
- package/out/parser/semantic/utils.d.ts.map +0 -1
- package/out/parser/semantic/validate.d.ts.map +0 -1
- package/out/parser/shared.d.ts +0 -54
- package/out/parser/shared.d.ts.map +0 -1
- package/out/parser/shared.js +0 -47
- package/out/parser/shared.js.map +0 -1
- package/out/parser/string/reduce/dynamic.d.ts.map +0 -1
- package/out/parser/string/reduce/shared.d.ts.map +0 -1
- package/out/parser/string/reduce/static.d.ts.map +0 -1
- package/out/parser/string/shift/operand/date.d.ts.map +0 -1
- package/out/parser/string/shift/operand/enclosed.d.ts.map +0 -1
- package/out/parser/string/shift/operand/genericArgs.d.ts.map +0 -1
- package/out/parser/string/shift/operand/operand.d.ts.map +0 -1
- package/out/parser/string/shift/operand/unenclosed.d.ts.map +0 -1
- package/out/parser/string/shift/operator/bounds.d.ts.map +0 -1
- package/out/parser/string/shift/operator/divisor.d.ts.map +0 -1
- package/out/parser/string/shift/operator/operator.d.ts.map +0 -1
- package/out/parser/string/shift/scanner.d.ts.map +0 -1
- package/out/parser/string/string.d.ts.map +0 -1
- package/out/parser/tuple.d.ts.map +0 -1
- package/out/scope.d.ts.map +0 -1
- package/out/test.d.ts +0 -2
- package/out/test.d.ts.map +0 -1
- package/out/test.js +0 -7
- package/out/test.js.map +0 -1
- package/out/tsconfig.build.tsbuildinfo +0 -1
- package/out/type.d.ts.map +0 -1
- package/out/util.d.ts +0 -19
- package/out/util.d.ts.map +0 -1
- package/out/util.js +0 -7
- package/out/util.js.map +0 -1
- package/parser/semantic/intersections.ts +0 -46
- package/parser/semantic/semantic.ts +0 -144
- package/parser/shared.ts +0 -152
- package/util.ts +0 -36
package/out/scope.d.ts
CHANGED
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type
|
|
1
|
+
import { type ArkConfig, type GenericProps, type PreparsedNodeResolution, type PrivateDeclaration, type RawSchema, type RawSchemaResolutions, RawSchemaScope, type SchemaScope, type UnknownSchema, type ambient, type arkKind, type destructuredExportContext, type destructuredImportContext, type exportedNameOf, type writeDuplicateAliasError } from "@arktype/schema";
|
|
2
|
+
import { type isAnyOrNever, type keyError, type nominal, type show } from "@arktype/util";
|
|
3
3
|
import type { type } from "./ark.js";
|
|
4
|
+
import { Generic } from "./generic.js";
|
|
4
5
|
import { type MatchParser } from "./match.js";
|
|
6
|
+
import type { Module } from "./module.js";
|
|
5
7
|
import { type inferDefinition, type validateDefinition } from "./parser/definition.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports: inferBootstrapped<{
|
|
12
|
-
exports: bootstrapExports<def>;
|
|
13
|
-
locals: bootstrapLocals<def> & parent;
|
|
14
|
-
ambient: ambient;
|
|
15
|
-
}>;
|
|
16
|
-
locals: inferBootstrapped<{
|
|
17
|
-
exports: bootstrapLocals<def>;
|
|
18
|
-
locals: bootstrapExports<def> & parent;
|
|
19
|
-
ambient: ambient;
|
|
20
|
-
}>;
|
|
21
|
-
ambient: ambient;
|
|
22
|
-
}>;
|
|
23
|
-
};
|
|
24
|
-
export type ScopeConfig = {
|
|
25
|
-
ambient?: Scope | null;
|
|
26
|
-
codes?: Record<ArkErrorCode, {
|
|
27
|
-
mustBe?: string;
|
|
28
|
-
}>;
|
|
29
|
-
keys?: KeyCheckKind;
|
|
30
|
-
};
|
|
31
|
-
type validateScope<def, $> = {
|
|
32
|
-
[k in keyof def]: parseScopeKey<k>["params"] extends [] ? def[k] extends Type | PreparsedResolution ? def[k] : validateDefinition<def[k], $ & bootstrap<def>, {}> : parseScopeKey<k>["params"] extends GenericParamsParseError ? parseScopeKey<k>["params"][0] : validateDefinition<def[k], $ & bootstrap<def>, {
|
|
8
|
+
import { type GenericDeclaration, type GenericParamsParseError, parseGenericParams } from "./parser/generic.js";
|
|
9
|
+
import { type DeclarationParser, type DefinitionParser, RawTypeParser, type Type, type TypeParser } from "./type.js";
|
|
10
|
+
export type ScopeParser = <const def>(def: validateScope<def>, config?: ArkConfig) => Scope<inferBootstrapped<bootstrapAliases<def>>>;
|
|
11
|
+
type validateScope<def> = {
|
|
12
|
+
[k in keyof def]: k extends symbol ? unknown : parseScopeKey<k>["params"] extends [] ? def[k] extends Type | PreparsedResolution ? def[k] : k extends PrivateDeclaration<infer name extends keyof def & string> ? keyError<writeDuplicateAliasError<name>> : validateDefinition<def[k], ambient & bootstrapAliases<def>, {}> : parseScopeKey<k>["params"] extends GenericParamsParseError ? parseScopeKey<k>["params"][0] : validateDefinition<def[k], ambient & bootstrapAliases<def>, {
|
|
33
13
|
[param in parseScopeKey<k>["params"][number]]: unknown;
|
|
34
14
|
}>;
|
|
35
15
|
};
|
|
@@ -40,120 +20,63 @@ export type bindThis<def> = {
|
|
|
40
20
|
type Def<def = {}> = nominal<def, "unparsed">;
|
|
41
21
|
/** sentinel indicating a scope that will be associated with a generic has not yet been parsed */
|
|
42
22
|
export type UnparsedScope = "$";
|
|
43
|
-
type bootstrap<def> = bootstrapLocals<def> & bootstrapExports<def>;
|
|
44
|
-
type bootstrapLocals<def> = bootstrapAliases<{
|
|
45
|
-
[k in keyof def & PrivateDeclaration as extractPrivateKey<k>]: def[k];
|
|
46
|
-
}>;
|
|
47
|
-
type bootstrapExports<def> = bootstrapAliases<{
|
|
48
|
-
[k in Exclude<keyof def, PrivateDeclaration>]: def[k];
|
|
49
|
-
}>;
|
|
50
23
|
/** These are legal as values of a scope but not as definitions in other contexts */
|
|
51
|
-
type PreparsedResolution =
|
|
24
|
+
type PreparsedResolution = PreparsedNodeResolution;
|
|
52
25
|
type bootstrapAliases<def> = {
|
|
53
26
|
[k in Exclude<keyof def, GenericDeclaration | symbol>]: def[k] extends PreparsedResolution ? def[k] : def[k] extends (() => infer thunkReturn extends PreparsedResolution) ? thunkReturn : Def<def[k]>;
|
|
54
27
|
} & {
|
|
55
|
-
[k in keyof def & GenericDeclaration as extractGenericName<k>]:
|
|
28
|
+
[k in keyof def & GenericDeclaration as extractGenericName<k>]: GenericProps<parseGenericParams<extractGenericParameters<k>>, def[k], UnparsedScope>;
|
|
56
29
|
};
|
|
57
|
-
type inferBootstrapped
|
|
58
|
-
[name in keyof
|
|
30
|
+
type inferBootstrapped<$> = show<{
|
|
31
|
+
[name in keyof $]: $[name] extends Def<infer def> ? inferDefinition<def, $ & ambient, {}> : $[name] extends GenericProps<infer params, infer def> ? Generic<params, def, $> : $[name];
|
|
59
32
|
}>;
|
|
60
33
|
type extractGenericName<k> = k extends GenericDeclaration<infer name> ? name : never;
|
|
61
34
|
type extractGenericParameters<k> = k extends GenericDeclaration<string, infer params> ? params : never;
|
|
62
|
-
type
|
|
63
|
-
type PrivateDeclaration<key extends string = string> = `#${key}`;
|
|
64
|
-
export type resolve<reference extends keyof $ | keyof args, $, args> = (reference extends keyof args ? args[reference] : $[reference & keyof $]) extends infer resolution ? [resolution] extends [never] ? never : isAny<resolution> extends true ? any : resolution extends Def<infer def> ? inferDefinition<def, $, args> : resolution : never;
|
|
35
|
+
export type resolve<reference extends keyof $ | keyof args, $, args> = (reference extends keyof args ? args[reference] : $[reference & keyof $]) extends infer resolution ? isAnyOrNever<resolution> extends true ? resolution : resolution extends Def<infer def> ? inferDefinition<def, $, args> : resolution : never;
|
|
65
36
|
export type moduleKeyOf<$> = {
|
|
66
|
-
[k in keyof $]: $[k] extends
|
|
37
|
+
[k in keyof $]: $[k] extends {
|
|
38
|
+
[arkKind]: "module";
|
|
39
|
+
} ? k & string : never;
|
|
67
40
|
}[keyof $];
|
|
68
|
-
export type tryInferSubmoduleReference<$, token> = token extends `${infer submodule extends moduleKeyOf<$>}.${infer subalias}` ? subalias extends keyof $[submodule] ? $[submodule][subalias] extends
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
export
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
args: Record<string, TypeNode> | undefined;
|
|
84
|
-
};
|
|
85
|
-
type ParseContextInput = Pick<ParseContext, "baseName" | "args">;
|
|
86
|
-
export declare class Scope<r extends Resolutions = any> {
|
|
87
|
-
infer: extractOut<r["exports"]>;
|
|
88
|
-
inferIn: extractIn<r["exports"]>;
|
|
89
|
-
config: TypeConfig;
|
|
41
|
+
export type tryInferSubmoduleReference<$, token> = token extends `${infer submodule extends moduleKeyOf<$>}.${infer subalias}` ? subalias extends keyof $[submodule] ? $[submodule][subalias] extends type.cast<infer t> ? t : never : never : never;
|
|
42
|
+
export interface ParseContext {
|
|
43
|
+
$: RawScope;
|
|
44
|
+
args?: Record<string, UnknownSchema>;
|
|
45
|
+
}
|
|
46
|
+
export declare const scope: ScopeParser;
|
|
47
|
+
export interface Scope<$ = any> extends SchemaScope<$> {
|
|
48
|
+
type: TypeParser<$>;
|
|
49
|
+
match: MatchParser<$>;
|
|
50
|
+
declare: DeclarationParser<$>;
|
|
51
|
+
define: DefinitionParser<$>;
|
|
52
|
+
import<names extends exportedNameOf<$>[]>(...names: names): Module<show<destructuredImportContext<$, names>>>;
|
|
53
|
+
export<names extends exportedNameOf<$>[]>(...names: names): Module<show<destructuredExportContext<$, names>>>;
|
|
54
|
+
}
|
|
55
|
+
export declare class RawScope<$ extends RawSchemaResolutions = RawSchemaResolutions> extends RawSchemaScope<$> {
|
|
90
56
|
private parseCache;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
private ambient;
|
|
97
|
-
constructor(def: Dict, config: ScopeConfig);
|
|
98
|
-
static root: ScopeParser<{}, {}>;
|
|
99
|
-
type: TypeParser<$<r>>;
|
|
100
|
-
match: MatchParser<$<r>>;
|
|
101
|
-
declare: DeclarationParser<$<r>>;
|
|
102
|
-
scope: ScopeParser<r["exports"], r["ambient"]>;
|
|
103
|
-
define: DefinitionParser<$<r>>;
|
|
104
|
-
toAmbient(): Scope<{
|
|
105
|
-
exports: r["exports"];
|
|
106
|
-
locals: r["locals"];
|
|
107
|
-
ambient: r["exports"];
|
|
108
|
-
}>;
|
|
109
|
-
get<name extends keyof r["exports"] & string>(name: name): Type<r["exports"][name], $<r>>;
|
|
110
|
-
private createRootContext;
|
|
111
|
-
parseDefinition(def: unknown, input: ParseContextInput): TypeNode;
|
|
112
|
-
parse(def: unknown, ctx: ParseContext): TypeNode;
|
|
113
|
-
parseString(def: string, ctx: ParseContext): TypeNode;
|
|
114
|
-
maybeResolve(name: string): TypeNode | Generic | undefined;
|
|
115
|
-
/** If name is a valid reference to a submodule alias, return its resolution */
|
|
116
|
-
private maybeResolveSubalias;
|
|
117
|
-
maybeResolveNode(name: string): TypeNode | undefined;
|
|
118
|
-
import<names extends exportedName<r>[]>(...names: names): destructuredImportContext<r, names extends [] ? keyof r["exports"] & string : names[number]>;
|
|
119
|
-
compile(): string;
|
|
120
|
-
bindThis(): {
|
|
121
|
-
this: import("@arktype/schema").IntersectionNode<unknown>;
|
|
57
|
+
constructor(def: Record<string, unknown>, config?: ArkConfig);
|
|
58
|
+
type: RawTypeParser;
|
|
59
|
+
match: MatchParser<$>;
|
|
60
|
+
declare: () => {
|
|
61
|
+
type: RawTypeParser;
|
|
122
62
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
63
|
+
define: (def: unknown) => unknown;
|
|
64
|
+
preparseRoot(def: unknown): unknown;
|
|
65
|
+
parseRoot(def: unknown): RawSchema;
|
|
66
|
+
parse(def: unknown, ctx: ParseContext): RawSchema;
|
|
67
|
+
parseString(def: string, ctx: ParseContext): RawSchema;
|
|
126
68
|
}
|
|
127
|
-
type destructuredExportContext<r extends Resolutions, name extends exportedName<r>> = {
|
|
128
|
-
exports: {
|
|
129
|
-
[k in name]: r["exports"][k];
|
|
130
|
-
};
|
|
131
|
-
locals: r["locals"] & {
|
|
132
|
-
[k in Exclude<keyof r["exports"], name>]: r["exports"][k];
|
|
133
|
-
};
|
|
134
|
-
ambient: r["ambient"];
|
|
135
|
-
};
|
|
136
|
-
type destructuredImportContext<r extends Resolutions, name extends exportedName<r>> = {
|
|
137
|
-
[k in name as `#${k & string}`]: type.cast<r["exports"][k]>;
|
|
138
|
-
};
|
|
139
69
|
export declare const writeShallowCycleErrorMessage: (name: string, seen: string[]) => string;
|
|
140
|
-
export declare const writeDuplicateNameMessage: <name extends string>(name: name) => `Duplicate name '${name}'`;
|
|
141
|
-
type writeDuplicateNameMessage<name extends string> = `Duplicate name '${name}'`;
|
|
142
70
|
export type ParsedScopeKey = {
|
|
143
|
-
isLocal: boolean;
|
|
144
71
|
name: string;
|
|
145
72
|
params: string[];
|
|
146
73
|
};
|
|
147
74
|
export declare const parseScopeKey: (k: string) => ParsedScopeKey;
|
|
148
|
-
type parseScopeKey<k> = k extends
|
|
149
|
-
type parsePossibleGenericDeclaration<k, isLocal extends boolean> = k extends GenericDeclaration<infer name, infer paramString> ? {
|
|
150
|
-
isLocal: isLocal;
|
|
75
|
+
export type parseScopeKey<k> = k extends GenericDeclaration<infer name, infer paramString> ? {
|
|
151
76
|
name: name;
|
|
152
77
|
params: parseGenericParams<paramString>;
|
|
153
78
|
} : {
|
|
154
|
-
isLocal: isLocal;
|
|
155
79
|
name: k;
|
|
156
80
|
params: [];
|
|
157
81
|
};
|
|
158
82
|
export {};
|
|
159
|
-
//# sourceMappingURL=scope.d.ts.map
|
package/out/scope.js
CHANGED
|
@@ -1,243 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { domainOf, hasDomain, isThunk,
|
|
1
|
+
import { RawSchemaScope, hasArkKind } from "@arktype/schema";
|
|
2
|
+
import { domainOf, hasDomain, isThunk, throwParseError } from "@arktype/util";
|
|
3
|
+
import { Generic } from "./generic.js";
|
|
3
4
|
import { createMatchParser } from "./match.js";
|
|
4
5
|
import { parseObject, writeBadDefinitionTypeMessage } from "./parser/definition.js";
|
|
5
6
|
import { parseGenericParams } from "./parser/generic.js";
|
|
6
7
|
import { DynamicState } from "./parser/string/reduce/dynamic.js";
|
|
7
|
-
import { writeMissingSubmoduleAccessMessage, writeNonSubmoduleDotMessage, writeUnresolvableMessage } from "./parser/string/shift/operand/unenclosed.js";
|
|
8
8
|
import { fullStringParse } from "./parser/string/string.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
export class
|
|
12
|
-
config;
|
|
9
|
+
import { RawTypeParser } from "./type.js";
|
|
10
|
+
export const scope = ((def, config = {}) => new RawScope(def, config));
|
|
11
|
+
export class RawScope extends RawSchemaScope {
|
|
13
12
|
parseCache = {};
|
|
14
|
-
resolutions;
|
|
15
|
-
/** The set of names defined at the root-level of the scope mapped to their
|
|
16
|
-
* corresponding definitions.**/
|
|
17
|
-
aliases = {};
|
|
18
|
-
exportedNames = [];
|
|
19
|
-
ambient;
|
|
20
13
|
constructor(def, config) {
|
|
14
|
+
const aliases = {};
|
|
21
15
|
for (const k in def) {
|
|
22
16
|
const parsedKey = parseScopeKey(k);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
this.ambient = config.ambient ?? null;
|
|
31
|
-
if (this.ambient) {
|
|
32
|
-
// ensure exportedResolutions is populated
|
|
33
|
-
this.ambient.export();
|
|
34
|
-
this.resolutions = { ...this.ambient.exportedResolutions };
|
|
17
|
+
aliases[parsedKey.name] =
|
|
18
|
+
parsedKey.params.length ?
|
|
19
|
+
// TODO: this
|
|
20
|
+
new Generic(parsedKey.params, def[k], {})
|
|
21
|
+
: def[k];
|
|
35
22
|
}
|
|
36
|
-
|
|
37
|
-
this.resolutions = {};
|
|
38
|
-
}
|
|
39
|
-
this.config = config;
|
|
23
|
+
super(aliases, config);
|
|
40
24
|
}
|
|
41
|
-
|
|
42
|
-
return new Scope(aliases, {});
|
|
43
|
-
};
|
|
44
|
-
type = createTypeParser(this);
|
|
25
|
+
type = new RawTypeParser(this);
|
|
45
26
|
match = createMatchParser(this);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
// TODO: name?
|
|
64
|
-
get(name) {
|
|
65
|
-
return this.export()[name];
|
|
66
|
-
}
|
|
67
|
-
createRootContext(input) {
|
|
68
|
-
return {
|
|
69
|
-
path: [],
|
|
70
|
-
scope: this,
|
|
71
|
-
...input
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
parseDefinition(def, input) {
|
|
75
|
-
return this.parse(def, this.createRootContext(input));
|
|
27
|
+
declare = (() => ({
|
|
28
|
+
type: this.type
|
|
29
|
+
})).bind(this);
|
|
30
|
+
define = ((def) => def).bind(this);
|
|
31
|
+
preparseRoot(def) {
|
|
32
|
+
if (isThunk(def) && !hasArkKind(def, "generic"))
|
|
33
|
+
return def();
|
|
34
|
+
return def;
|
|
35
|
+
}
|
|
36
|
+
parseRoot(def) {
|
|
37
|
+
// args: { this: {} as RawSchema },
|
|
38
|
+
return this.parse(def, {
|
|
39
|
+
$: this,
|
|
40
|
+
args: {}
|
|
41
|
+
// type parsing can bypass nodes if it hits the cache,
|
|
42
|
+
// so bind it directly (could be optimized)
|
|
43
|
+
}).bindScope(this);
|
|
76
44
|
}
|
|
77
45
|
parse(def, ctx) {
|
|
78
46
|
if (typeof def === "string") {
|
|
79
|
-
if (ctx.args
|
|
47
|
+
if (ctx.args && Object.keys(ctx.args).every(k => !def.includes(k))) {
|
|
80
48
|
// we can only rely on the cache if there are no contextual
|
|
81
49
|
// resolutions like "this" or generic args
|
|
82
50
|
return this.parseString(def, ctx);
|
|
83
51
|
}
|
|
84
|
-
if (!this.parseCache[def])
|
|
52
|
+
if (!this.parseCache[def])
|
|
85
53
|
this.parseCache[def] = this.parseString(def, ctx);
|
|
86
|
-
}
|
|
87
54
|
return this.parseCache[def];
|
|
88
55
|
}
|
|
89
|
-
return hasDomain(def, "object")
|
|
90
|
-
|
|
56
|
+
return hasDomain(def, "object") ?
|
|
57
|
+
parseObject(def, ctx)
|
|
91
58
|
: throwParseError(writeBadDefinitionTypeMessage(domainOf(def)));
|
|
92
59
|
}
|
|
93
60
|
parseString(def, ctx) {
|
|
94
|
-
return (this.
|
|
61
|
+
return (this.maybeResolveSchema(def) ??
|
|
95
62
|
((def.endsWith("[]") &&
|
|
96
|
-
this.
|
|
63
|
+
this.maybeResolveSchema(def.slice(0, -2))?.array()) ||
|
|
97
64
|
fullStringParse(new DynamicState(def, ctx))));
|
|
98
65
|
}
|
|
99
|
-
maybeResolve(name) {
|
|
100
|
-
const cached = this.resolutions[name];
|
|
101
|
-
if (cached) {
|
|
102
|
-
return cached;
|
|
103
|
-
}
|
|
104
|
-
let def = this.aliases[name];
|
|
105
|
-
if (!def) {
|
|
106
|
-
return this.maybeResolveSubalias(name);
|
|
107
|
-
}
|
|
108
|
-
if (isThunk(def) && !hasArkKind(def, "generic")) {
|
|
109
|
-
def = def();
|
|
110
|
-
}
|
|
111
|
-
// TODO: initialize here?
|
|
112
|
-
const resolution = hasArkKind(def, "generic")
|
|
113
|
-
? validateUninstantiatedGeneric(def)
|
|
114
|
-
: hasArkKind(def, "module")
|
|
115
|
-
? throwParseError(writeMissingSubmoduleAccessMessage(name))
|
|
116
|
-
: this.parseDefinition(def, this.createRootContext({ baseName: name, args: {} }));
|
|
117
|
-
this.resolutions[name] = resolution;
|
|
118
|
-
return resolution;
|
|
119
|
-
}
|
|
120
|
-
/** If name is a valid reference to a submodule alias, return its resolution */
|
|
121
|
-
maybeResolveSubalias(name) {
|
|
122
|
-
const dotIndex = name.indexOf(".");
|
|
123
|
-
if (dotIndex === -1) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const dotPrefix = name.slice(0, dotIndex);
|
|
127
|
-
const prefixDef = this.aliases[dotPrefix];
|
|
128
|
-
if (hasArkKind(prefixDef, "module")) {
|
|
129
|
-
const resolution = prefixDef[name.slice(dotIndex + 1)]?.root;
|
|
130
|
-
// if the first part of name is a submodule but the suffix is
|
|
131
|
-
// unresolvable, we can throw immediately
|
|
132
|
-
if (!resolution) {
|
|
133
|
-
return throwParseError(writeUnresolvableMessage(name));
|
|
134
|
-
}
|
|
135
|
-
this.resolutions[name] = resolution;
|
|
136
|
-
return resolution;
|
|
137
|
-
}
|
|
138
|
-
if (prefixDef !== undefined) {
|
|
139
|
-
return throwParseError(writeNonSubmoduleDotMessage(dotPrefix));
|
|
140
|
-
}
|
|
141
|
-
// if the name includes ".", but the prefix is not an alias, it
|
|
142
|
-
// might be something like a decimal literal, so just fall through to return
|
|
143
|
-
}
|
|
144
|
-
maybeResolveNode(name) {
|
|
145
|
-
const result = this.maybeResolve(name);
|
|
146
|
-
return result instanceof BaseType ? result : undefined;
|
|
147
|
-
}
|
|
148
|
-
import(...names) {
|
|
149
|
-
return addArkKind(map(this.export(...names), (alias, value) => [
|
|
150
|
-
`#${alias}`,
|
|
151
|
-
value
|
|
152
|
-
]), "module");
|
|
153
|
-
}
|
|
154
|
-
compile() {
|
|
155
|
-
return "";
|
|
156
|
-
// this.export()
|
|
157
|
-
// const references: Set<Root> = new Set()
|
|
158
|
-
// for (const k in this.exportedResolutions!) {
|
|
159
|
-
// const resolution = this.exportedResolutions[k]
|
|
160
|
-
// if (hasArkKind(resolution, "node") && !references.has(resolution)) {
|
|
161
|
-
// for (const reference of resolution.references) {
|
|
162
|
-
// references.add(reference)
|
|
163
|
-
// }
|
|
164
|
-
// }
|
|
165
|
-
// }
|
|
166
|
-
// return [...references]
|
|
167
|
-
// .map(
|
|
168
|
-
// (ref) => `const ${ref.alias} = (${In}) => {
|
|
169
|
-
// ${ref.condition}
|
|
170
|
-
// return true
|
|
171
|
-
// }`
|
|
172
|
-
// )
|
|
173
|
-
// .join("\n")
|
|
174
|
-
}
|
|
175
|
-
bindThis() {
|
|
176
|
-
// TODO: fix
|
|
177
|
-
return { this: keywords.unknown };
|
|
178
|
-
}
|
|
179
|
-
exportedResolutions;
|
|
180
|
-
exportCache;
|
|
181
|
-
export(...names) {
|
|
182
|
-
if (!this.exportCache) {
|
|
183
|
-
this.exportCache = {};
|
|
184
|
-
for (const name of this.exportedNames) {
|
|
185
|
-
let def = this.aliases[name];
|
|
186
|
-
if (hasArkKind(def, "generic")) {
|
|
187
|
-
this.exportCache[name] = def;
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
// TODO: thunk generics?
|
|
191
|
-
// handle generics before invoking thunks, since they use
|
|
192
|
-
// varargs they will incorrectly be considered thunks
|
|
193
|
-
if (isThunk(def)) {
|
|
194
|
-
def = def();
|
|
195
|
-
}
|
|
196
|
-
if (hasArkKind(def, "module")) {
|
|
197
|
-
this.exportCache[name] = def;
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
this.exportCache[name] = new Type(this.maybeResolve(name), this);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
this.exportedResolutions = resolutionsOfModule(this.exportCache);
|
|
204
|
-
Object.assign(this.resolutions, this.exportedResolutions);
|
|
205
|
-
}
|
|
206
|
-
const namesToExport = names.length ? names : this.exportedNames;
|
|
207
|
-
return addArkKind(map(namesToExport, (_, name) => [name, this.exportCache[name]]), "module");
|
|
208
|
-
}
|
|
209
66
|
}
|
|
210
|
-
const resolutionsOfModule = (typeSet) => {
|
|
211
|
-
const result = {};
|
|
212
|
-
for (const k in typeSet) {
|
|
213
|
-
const v = typeSet[k];
|
|
214
|
-
if (hasArkKind(v, "module")) {
|
|
215
|
-
const innerResolutions = resolutionsOfModule(v);
|
|
216
|
-
const prefixedResolutions = map(innerResolutions, (innerK, innerV) => [
|
|
217
|
-
`${k}.${innerK}`,
|
|
218
|
-
innerV
|
|
219
|
-
]);
|
|
220
|
-
Object.assign(result, prefixedResolutions);
|
|
221
|
-
}
|
|
222
|
-
else if (hasArkKind(v, "generic")) {
|
|
223
|
-
result[k] = v;
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
result[k] = v.root;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return result;
|
|
230
|
-
};
|
|
231
67
|
export const writeShallowCycleErrorMessage = (name, seen) => `Alias '${name}' has a shallow resolution cycle: ${[...seen, name].join(":")}`;
|
|
232
|
-
export const writeDuplicateNameMessage = (name) => `Duplicate name '${name}'`;
|
|
233
68
|
export const parseScopeKey = (k) => {
|
|
234
|
-
const isLocal = k[0] === "#";
|
|
235
|
-
const name = isLocal ? k.slice(1) : k;
|
|
236
69
|
const firstParamIndex = k.indexOf("<");
|
|
237
70
|
if (firstParamIndex === -1) {
|
|
238
71
|
return {
|
|
239
|
-
|
|
240
|
-
name,
|
|
72
|
+
name: k,
|
|
241
73
|
params: []
|
|
242
74
|
};
|
|
243
75
|
}
|
|
@@ -245,9 +77,7 @@ export const parseScopeKey = (k) => {
|
|
|
245
77
|
throwParseError(`'>' must be the last character of a generic declaration in a scope`);
|
|
246
78
|
}
|
|
247
79
|
return {
|
|
248
|
-
|
|
249
|
-
name: name.slice(0, firstParamIndex),
|
|
80
|
+
name: k.slice(0, firstParamIndex),
|
|
250
81
|
params: parseGenericParams(k.slice(firstParamIndex + 1, -1))
|
|
251
82
|
};
|
|
252
83
|
};
|
|
253
|
-
//# sourceMappingURL=scope.js.map
|
package/out/scope.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../scope.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["../scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAON,cAAc,EAQd,UAAU,EAEV,MAAM,iBAAiB,CAAA;AACxB,OAAO,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