@alloy-js/core 0.20.0-dev.4 → 0.20.0-dev.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/dist/src/binder.d.ts +62 -38
- package/dist/src/binder.d.ts.map +1 -1
- package/dist/src/binder.js +214 -173
- package/dist/src/components/Declaration.d.ts +2 -2
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js +8 -2
- package/dist/src/components/MemberDeclaration.d.ts +2 -2
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
- package/dist/src/components/MemberDeclaration.js +9 -5
- package/dist/src/components/MemberScope.d.ts +30 -13
- package/dist/src/components/MemberScope.d.ts.map +1 -1
- package/dist/src/components/MemberScope.js +37 -15
- package/dist/src/components/Output.d.ts.map +1 -1
- package/dist/src/components/Output.js +2 -5
- package/dist/src/components/ReferenceOrContent.d.ts +1 -1
- package/dist/src/components/ReferenceOrContent.d.ts.map +1 -1
- package/dist/src/components/Scope.d.ts +5 -5
- package/dist/src/components/Scope.d.ts.map +1 -1
- package/dist/src/components/Scope.js +9 -5
- package/dist/src/context/member-scope.d.ts +7 -8
- package/dist/src/context/member-scope.d.ts.map +1 -1
- package/dist/src/context/member-scope.js +5 -5
- package/dist/src/context/name-policy.d.ts.map +1 -1
- package/dist/src/context/name-policy.js +3 -0
- package/dist/src/context/scope.d.ts +1 -0
- package/dist/src/context/scope.d.ts.map +1 -1
- package/dist/src/context/scope.js +7 -0
- package/dist/src/inspect.browser.d.ts +5 -0
- package/dist/src/inspect.browser.d.ts.map +1 -0
- package/dist/src/inspect.browser.js +5 -0
- package/dist/src/inspect.d.ts +2 -0
- package/dist/src/inspect.d.ts.map +1 -0
- package/dist/src/inspect.js +1 -0
- package/dist/src/name-policy.d.ts +11 -0
- package/dist/src/name-policy.d.ts.map +1 -1
- package/dist/src/name-policy.js +3 -0
- package/dist/src/reactive-union-set.d.ts.map +1 -1
- package/dist/src/reactive-union-set.js +12 -8
- package/dist/src/refkey.d.ts +39 -3
- package/dist/src/refkey.d.ts.map +1 -1
- package/dist/src/refkey.js +52 -8
- package/dist/src/symbols/basic-scope.d.ts +14 -0
- package/dist/src/symbols/basic-scope.d.ts.map +1 -0
- package/dist/src/symbols/basic-scope.js +20 -0
- package/dist/src/symbols/basic-symbol.d.ts +19 -0
- package/dist/src/symbols/basic-symbol.d.ts.map +1 -0
- package/dist/src/symbols/basic-symbol.js +28 -0
- package/dist/src/symbols/index.d.ts +3 -1
- package/dist/src/symbols/index.d.ts.map +1 -1
- package/dist/src/symbols/index.js +3 -1
- package/dist/src/symbols/output-scope.d.ts +70 -41
- package/dist/src/symbols/output-scope.d.ts.map +1 -1
- package/dist/src/symbols/output-scope.js +98 -130
- package/dist/src/symbols/output-space.d.ts +25 -0
- package/dist/src/symbols/output-space.d.ts.map +1 -0
- package/dist/src/symbols/output-space.js +35 -0
- package/dist/src/symbols/output-symbol.d.ts +213 -37
- package/dist/src/symbols/output-symbol.d.ts.map +1 -1
- package/dist/src/symbols/output-symbol.js +323 -203
- package/dist/src/symbols/symbol-flow.d.ts +1 -1
- package/dist/src/symbols/symbol-flow.d.ts.map +1 -1
- package/dist/src/symbols/symbol-flow.js +22 -7
- package/dist/src/symbols/symbol-slot.d.ts +27 -9
- package/dist/src/symbols/symbol-slot.d.ts.map +1 -1
- package/dist/src/symbols/symbol-slot.js +20 -4
- package/dist/src/symbols/symbol-table.d.ts +19 -8
- package/dist/src/symbols/symbol-table.d.ts.map +1 -1
- package/dist/src/symbols/symbol-table.js +65 -16
- package/dist/src/tracer.d.ts +15 -3
- package/dist/src/tracer.d.ts.map +1 -1
- package/dist/src/tracer.js +39 -63
- package/dist/test/components/declaration.test.js +9 -14
- package/dist/test/components/reference-or-content.test.js +2 -2
- package/dist/test/symbols/output-scope.test.js +33 -198
- package/dist/test/symbols/output-symbol.test.js +139 -385
- package/dist/test/symbols/resolution.test.js +431 -114
- package/dist/test/symbols/symbol-table.test.d.ts +2 -0
- package/dist/test/symbols/symbol-table.test.d.ts.map +1 -0
- package/dist/test/symbols/symbol-table.test.js +14 -0
- package/dist/test/symbols/utils.d.ts +10 -24
- package/dist/test/symbols/utils.d.ts.map +1 -1
- package/dist/test/symbols/utils.js +23 -45
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/src/binder.ts +348 -273
- package/src/components/Declaration.tsx +13 -3
- package/src/components/MemberDeclaration.tsx +15 -8
- package/src/components/MemberScope.tsx +61 -20
- package/src/components/Output.tsx +0 -4
- package/src/components/Scope.tsx +16 -9
- package/src/context/member-scope.ts +10 -10
- package/src/context/name-policy.ts +3 -0
- package/src/context/scope.ts +9 -0
- package/src/inspect.browser.ts +6 -0
- package/src/inspect.ts +1 -0
- package/src/name-policy.ts +14 -0
- package/src/reactive-union-set.ts +14 -8
- package/src/refkey.ts +88 -14
- package/src/symbols/basic-scope.ts +23 -0
- package/src/symbols/basic-symbol.ts +32 -0
- package/src/symbols/index.ts +3 -1
- package/src/symbols/output-scope.ts +131 -170
- package/src/symbols/output-space.ts +49 -0
- package/src/symbols/output-symbol.ts +434 -258
- package/src/symbols/symbol-flow.ts +38 -9
- package/src/symbols/symbol-slot.tsx +46 -8
- package/src/symbols/symbol-table.ts +95 -21
- package/src/tracer.ts +53 -83
- package/temp/api.json +5559 -3079
- package/test/components/declaration.test.tsx +6 -19
- package/test/components/reference-or-content.test.tsx +2 -2
- package/test/symbols/output-scope.test.ts +33 -125
- package/test/symbols/output-symbol.test.ts +128 -348
- package/test/symbols/resolution.test.ts +530 -117
- package/test/symbols/symbol-table.test.ts +15 -0
- package/test/symbols/utils.ts +38 -74
- package/tsdoc.json +4 -0
- package/dist/src/slot.d.ts +0 -15
- package/dist/src/slot.d.ts.map +0 -1
- package/dist/src/slot.js +0 -50
- package/dist/src/symbols/flags.d.ts +0 -70
- package/dist/src/symbols/flags.d.ts.map +0 -1
- package/dist/src/symbols/flags.js +0 -72
- package/dist/test/components/slot.test.d.ts +0 -2
- package/dist/test/components/slot.test.d.ts.map +0 -1
- package/dist/test/components/slot.test.js +0 -134
- package/src/slot.ts +0 -89
- package/src/symbols/flags.ts +0 -82
- package/test/components/slot.test.tsx +0 -174
package/dist/src/refkey.js
CHANGED
|
@@ -5,12 +5,12 @@ function getObjectKey(value) {
|
|
|
5
5
|
if (objectIds.has(value)) {
|
|
6
6
|
return objectIds.get(value);
|
|
7
7
|
}
|
|
8
|
-
const key =
|
|
8
|
+
const key = `o${objId++}`;
|
|
9
9
|
objectIds.set(value, key);
|
|
10
10
|
return key;
|
|
11
11
|
}
|
|
12
12
|
const RefkeySym = Symbol();
|
|
13
|
-
function
|
|
13
|
+
function createSymbolRefkey(key) {
|
|
14
14
|
const refkey = {
|
|
15
15
|
key,
|
|
16
16
|
[RefkeySym]: true
|
|
@@ -21,13 +21,28 @@ function createRefkey(key) {
|
|
|
21
21
|
export function isRefkey(value) {
|
|
22
22
|
return typeof value === "object" && value !== null && Object.hasOwn(value, RefkeySym);
|
|
23
23
|
}
|
|
24
|
+
export function isSymbolRefkey(value) {
|
|
25
|
+
return isRefkey(value) && Object.hasOwn(value, "key");
|
|
26
|
+
}
|
|
27
|
+
export function isMemberRefkey(value) {
|
|
28
|
+
return isRefkey(value) && Object.hasOwn(value, "base") && Object.hasOwn(value, "member");
|
|
29
|
+
}
|
|
30
|
+
export function isNamekey(value) {
|
|
31
|
+
return isRefkey(value) && Object.hasOwn(value, "name");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* This gets the key for a symbol refkey based on the value provided. Refkey values
|
|
36
|
+
* return the key of that refkey, objects get a unique key for that specific object,
|
|
37
|
+
* and otherwise the key is based on the value.
|
|
38
|
+
*/
|
|
24
39
|
function getKey(value) {
|
|
25
|
-
if (
|
|
26
|
-
return value;
|
|
40
|
+
if (isSymbolRefkey(value)) {
|
|
41
|
+
return value.key;
|
|
27
42
|
} else if (typeof value === "object" && value !== null) {
|
|
28
43
|
return getObjectKey(value);
|
|
29
44
|
} else {
|
|
30
|
-
return
|
|
45
|
+
return `s${String(value)}`;
|
|
31
46
|
}
|
|
32
47
|
}
|
|
33
48
|
const knownRefkeys = new Map();
|
|
@@ -47,15 +62,40 @@ const knownRefkeys = new Map();
|
|
|
47
62
|
*/
|
|
48
63
|
export function refkey(...args) {
|
|
49
64
|
const keys = args.length === 0 ? [getKey({})] : args.map(v => getKey(v));
|
|
50
|
-
const compositeKey = keys.
|
|
65
|
+
const compositeKey = keys.join("\u2063");
|
|
51
66
|
if (knownRefkeys.has(compositeKey)) {
|
|
52
67
|
return knownRefkeys.get(compositeKey);
|
|
53
68
|
}
|
|
54
|
-
const key =
|
|
69
|
+
const key = createSymbolRefkey(compositeKey);
|
|
55
70
|
knownRefkeys.set(compositeKey, key);
|
|
56
71
|
return key;
|
|
57
72
|
}
|
|
58
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Create a namekey with the given name. The namekey is a unique refkey that
|
|
76
|
+
* represents a single symbol with the given name and the provided
|
|
77
|
+
* naming-related options.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* const myClass = namekey("MyClass");
|
|
82
|
+
*
|
|
83
|
+
* return <>
|
|
84
|
+
* <ClassDeclaration name={myClass} />
|
|
85
|
+
* {myClass}
|
|
86
|
+
* </>
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* Renders a class and a reference to that class.
|
|
90
|
+
*/
|
|
91
|
+
export function namekey(name, options = {}) {
|
|
92
|
+
return {
|
|
93
|
+
key: getObjectKey({}),
|
|
94
|
+
name,
|
|
95
|
+
options,
|
|
96
|
+
[RefkeySym]: true
|
|
97
|
+
};
|
|
98
|
+
}
|
|
59
99
|
/**
|
|
60
100
|
* Create a refkey for an instantiation of a symbol.
|
|
61
101
|
*
|
|
@@ -79,5 +119,9 @@ export function refkey(...args) {
|
|
|
79
119
|
* `refkey(rk1, rk3)`.
|
|
80
120
|
*/
|
|
81
121
|
export function memberRefkey(base, member) {
|
|
82
|
-
return
|
|
122
|
+
return {
|
|
123
|
+
base,
|
|
124
|
+
member,
|
|
125
|
+
[RefkeySym]: true
|
|
126
|
+
};
|
|
83
127
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OutputScope } from "./output-scope.js";
|
|
2
|
+
/**
|
|
3
|
+
* BasicScope is a kind of OutputScope that has a single declaration space named
|
|
4
|
+
* `symbols`. It is suitable for use in simple language implementations where
|
|
5
|
+
* there isn't much in the way of unique scope semantics.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BasicScope extends OutputScope {
|
|
8
|
+
static readonly defaultDeclarationSpace = "symbols";
|
|
9
|
+
static readonly declarationSpaces: readonly ["symbols"];
|
|
10
|
+
get symbols(): import("./output-space.js").OutputSpace;
|
|
11
|
+
get symbolNames(): ReadonlyMap<string, import("./output-symbol.js").OutputSymbol>;
|
|
12
|
+
get symbolsByRefkey(): ReadonlyMap<import("../refkey.js").Refkey, import("./output-symbol.js").OutputSymbol>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=basic-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/basic-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC,gBAAuB,uBAAuB,aAAa;IAC3D,gBAAuB,iBAAiB,uBAAwB;IAEhE,IAAI,OAAO,4CAEV;IAED,IAAI,WAAW,mEAEd;IAED,IAAI,eAAe,0FAElB;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OutputScope } from "./output-scope.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* BasicScope is a kind of OutputScope that has a single declaration space named
|
|
5
|
+
* `symbols`. It is suitable for use in simple language implementations where
|
|
6
|
+
* there isn't much in the way of unique scope semantics.
|
|
7
|
+
*/
|
|
8
|
+
export class BasicScope extends OutputScope {
|
|
9
|
+
static defaultDeclarationSpace = "symbols";
|
|
10
|
+
static declarationSpaces = ["symbols"];
|
|
11
|
+
get symbols() {
|
|
12
|
+
return this.spaceFor("symbols");
|
|
13
|
+
}
|
|
14
|
+
get symbolNames() {
|
|
15
|
+
return this.spaceFor("symbols").symbolNames;
|
|
16
|
+
}
|
|
17
|
+
get symbolsByRefkey() {
|
|
18
|
+
return this.spaceFor("symbols").symbolsByRefkey;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OutputSymbol } from "./output-symbol.js";
|
|
2
|
+
/**
|
|
3
|
+
* BasicSymbol is a kind of OutputSymbol that has instance and static members.
|
|
4
|
+
* It is suitable for use in simple language implementations where there isn't
|
|
5
|
+
* much in the way of unique symbol semantics.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
*
|
|
9
|
+
* Instantiation is done by copying symbols from instance members to static
|
|
10
|
+
* members of the instantiation target.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
export declare class BasicSymbol extends OutputSymbol {
|
|
14
|
+
static readonly memberSpaces: string[];
|
|
15
|
+
copy(): BasicSymbol;
|
|
16
|
+
get instanceMembers(): import("./output-space.js").OutputMemberSpace;
|
|
17
|
+
get staticMembers(): import("./output-space.js").OutputMemberSpace;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=basic-symbol.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-symbol.d.ts","sourceRoot":"","sources":["../../../src/symbols/basic-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;;;;;;;;;GAUG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C,gBAAuB,YAAY,WAA0B;IAE7D,IAAI;IAQJ,IAAI,eAAe,kDAElB;IAED,IAAI,aAAa,kDAEhB;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OutputSymbol } from "./output-symbol.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* BasicSymbol is a kind of OutputSymbol that has instance and static members.
|
|
5
|
+
* It is suitable for use in simple language implementations where there isn't
|
|
6
|
+
* much in the way of unique symbol semantics.
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
*
|
|
10
|
+
* Instantiation is done by copying symbols from instance members to static
|
|
11
|
+
* members of the instantiation target.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export class BasicSymbol extends OutputSymbol {
|
|
15
|
+
static memberSpaces = ["static", "instance"];
|
|
16
|
+
copy() {
|
|
17
|
+
const options = this.getCopyOptions();
|
|
18
|
+
const copiedSymbol = new BasicSymbol(this.name, undefined, options);
|
|
19
|
+
this.initializeCopy(copiedSymbol);
|
|
20
|
+
return copiedSymbol;
|
|
21
|
+
}
|
|
22
|
+
get instanceMembers() {
|
|
23
|
+
return this.memberSpaceFor("instance");
|
|
24
|
+
}
|
|
25
|
+
get staticMembers() {
|
|
26
|
+
return this.memberSpaceFor("static");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./basic-scope.js";
|
|
2
|
+
export * from "./basic-symbol.js";
|
|
2
3
|
export * from "./output-scope.js";
|
|
4
|
+
export * from "./output-space.js";
|
|
3
5
|
export * from "./output-symbol.js";
|
|
4
6
|
export * from "./symbol-flow.js";
|
|
5
7
|
export * from "./symbol-slot.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/symbols/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/symbols/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./basic-scope.js";
|
|
2
|
+
export * from "./basic-symbol.js";
|
|
2
3
|
export * from "./output-scope.js";
|
|
4
|
+
export * from "./output-space.js";
|
|
3
5
|
export * from "./output-symbol.js";
|
|
4
6
|
export * from "./symbol-flow.js";
|
|
5
7
|
export * from "./symbol-slot.js";
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
import { ReactiveFlags } from "@vue/reactivity";
|
|
2
2
|
import type { Binder } from "../binder.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import type { OutputSymbol } from "./output-symbol.js";
|
|
7
|
-
import { SymbolTable } from "./symbol-table.js";
|
|
3
|
+
import { inspect } from "../inspect.js";
|
|
4
|
+
import { OutputDeclarationSpace, OutputSpace } from "./output-space.js";
|
|
5
|
+
import { OutputSymbol } from "./output-symbol.js";
|
|
8
6
|
export interface OutputScopeOptions {
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Arbitrary metadata that is associated with this scope.
|
|
9
|
+
*/
|
|
11
10
|
metadata?: Record<string, unknown>;
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The binder instance this scope belongs to. If not provided, it will
|
|
13
|
+
* attempt to find the current binder from context.
|
|
14
|
+
*/
|
|
14
15
|
binder?: Binder;
|
|
16
|
+
/**
|
|
17
|
+
* The owner symbol of this scope. When provided, this scope becomes a member
|
|
18
|
+
* scope, which exposes the symbols on its owner symbol instead of having its
|
|
19
|
+
* own declaration spaces.
|
|
20
|
+
*/
|
|
21
|
+
ownerSymbol?: OutputSymbol;
|
|
15
22
|
}
|
|
16
23
|
/**
|
|
17
24
|
* A container of symbols accessible within some scope in your output code.
|
|
@@ -31,64 +38,86 @@ export interface OutputScopeOptions {
|
|
|
31
38
|
* Scopes are reactive values, which allows you to observe changes to the scope
|
|
32
39
|
* within a reactive context.
|
|
33
40
|
*/
|
|
34
|
-
export declare class OutputScope {
|
|
41
|
+
export declare abstract class OutputScope {
|
|
35
42
|
#private;
|
|
43
|
+
static readonly declarationSpaces: Readonly<string[]>;
|
|
36
44
|
/**
|
|
37
45
|
* The name of the scope.
|
|
46
|
+
*
|
|
47
|
+
* @reactive
|
|
38
48
|
*/
|
|
39
49
|
get name(): string;
|
|
40
50
|
set name(name: string);
|
|
41
51
|
/**
|
|
42
52
|
* The unique id of this scope.
|
|
53
|
+
*
|
|
54
|
+
* @readonly
|
|
43
55
|
*/
|
|
44
56
|
get id(): number;
|
|
45
57
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The flags that describe this scope.
|
|
58
|
+
* Arbitrary metadata associated with this scope. This property is not
|
|
59
|
+
* reactive but the metadata object is a reactive object.
|
|
60
|
+
*
|
|
61
|
+
* @readonly
|
|
52
62
|
*/
|
|
53
|
-
get flags(): OutputScopeFlags;
|
|
54
|
-
set flags(flags: OutputScopeFlags);
|
|
55
63
|
get metadata(): Record<string, unknown>;
|
|
56
64
|
/**
|
|
57
|
-
* The
|
|
58
|
-
*
|
|
59
|
-
*
|
|
65
|
+
* The parent scope of this scope. Undefined if this is a root scope.
|
|
66
|
+
*
|
|
67
|
+
* @reactive
|
|
60
68
|
*/
|
|
61
69
|
get parent(): OutputScope | undefined;
|
|
70
|
+
set parent(scope: OutputScope | undefined);
|
|
62
71
|
/**
|
|
63
|
-
*
|
|
64
|
-
* the {@link OutputScopeFlags.StaticMemberScope} or
|
|
65
|
-
* {@link OutputScopeFlags.InstanceMemberScope} flag.
|
|
66
|
-
*/
|
|
67
|
-
get owner(): OutputSymbol | undefined;
|
|
68
|
-
/**
|
|
69
|
-
* The symbols defined within this scope.
|
|
72
|
+
* Get the declaration space for the given key.
|
|
70
73
|
*/
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The symbols defined within this scope, indexed by refkey.
|
|
74
|
-
*/
|
|
75
|
-
get symbolsByRefkey(): ReadonlyMap<Refkey, OutputSymbol>;
|
|
76
|
-
get symbolNames(): ReadonlySet<string>;
|
|
74
|
+
spaceFor(key: string): OutputSpace | undefined;
|
|
77
75
|
/**
|
|
78
76
|
* The scopes nested within this scope.
|
|
77
|
+
*
|
|
78
|
+
* @readonly
|
|
79
79
|
*/
|
|
80
80
|
get children(): Set<OutputScope>;
|
|
81
81
|
/**
|
|
82
82
|
* The binder that created this scope.
|
|
83
|
+
*
|
|
84
|
+
* @readonly
|
|
83
85
|
*/
|
|
84
86
|
get binder(): Binder | undefined;
|
|
85
87
|
[ReactiveFlags.SKIP]: this;
|
|
86
|
-
constructor(name: string, options?: OutputScopeOptions);
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
constructor(name: string, parentScope: OutputScope | undefined, options?: OutputScopeOptions);
|
|
89
|
+
/**
|
|
90
|
+
* Get all the declaration spaces in this scope.
|
|
91
|
+
*
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
94
|
+
get spaces(): OutputDeclarationSpace[];
|
|
95
|
+
/**
|
|
96
|
+
* The symbol whose members are in scope. When an owner symbol is present,
|
|
97
|
+
* this scope is considered a member scope, and does not provide its own
|
|
98
|
+
* declaration spaces.
|
|
99
|
+
*
|
|
100
|
+
* @readonly
|
|
101
|
+
* @reactive
|
|
102
|
+
*/
|
|
103
|
+
get ownerSymbol(): OutputSymbol | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Whether this scope is a transient scope. Transient scopes are used for
|
|
106
|
+
* temporary values that are to be combined with other non-transient symbols.
|
|
107
|
+
* Scopes are transient when their owner symbol is transient.
|
|
108
|
+
*
|
|
109
|
+
* @readonly
|
|
110
|
+
*/
|
|
111
|
+
get isTransient(): boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Check if this is scope is a member scope. Member scopes have no member
|
|
114
|
+
* spaces of their own, but instead put members of their owner symbol in
|
|
115
|
+
* scope.
|
|
116
|
+
*
|
|
117
|
+
* @readonly
|
|
118
|
+
* @reactive
|
|
119
|
+
*/
|
|
120
|
+
get isMemberScope(): boolean;
|
|
121
|
+
[inspect.custom](): string;
|
|
93
122
|
}
|
|
94
123
|
//# sourceMappingURL=output-scope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/output-scope.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"output-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/output-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EAMd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,8BAAsB,WAAW;;IAC/B,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAe;IAGpE;;;;OAIG;IACH,IAAI,IAAI,IAKO,MAAM,CAFpB;IAED,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EAIpB;IAGD;;;;OAIG;IACH,IAAI,EAAE,WAEL;IAID;;;;;OAKG;IACH,IAAI,QAAQ,4BAEX;IAID;;;;OAIG;IACH,IAAI,MAAM,IAKQ,WAAW,GAAG,SAAS,CAFxC;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,EAaxC;IAID;;OAEG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAK9C;;;;OAIG;IACH,IAAI,QAAQ,qBAEX;IAGD;;;;OAIG;IACH,IAAI,MAAM,uBAET;IAED,CAAC,aAAa,CAAC,IAAI,CAAC,OAAQ;gBAG1B,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,WAAW,GAAG,SAAS,EACpC,OAAO,GAAE,kBAAuB;IAiClC;;;;OAIG;IACH,IAAI,MAAM,6BAET;IAGD;;;;;;;OAOG;IACH,IAAI,WAAW,6BAGd;IAQD;;;;;;OAMG;IACH,IAAI,WAAW,YAMd;IACD;;;;;;;OAOG;IACH,IAAI,aAAa,YAEhB;IAED,CAAC,OAAO,CAAC,MAAM,CAAC;CAOjB"}
|