@alloy-js/core 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/src/binder.d.ts +18 -235
  3. package/dist/src/binder.d.ts.map +1 -1
  4. package/dist/src/binder.js +85 -386
  5. package/dist/src/components/Block.d.ts +1 -1
  6. package/dist/src/components/Block.d.ts.map +1 -1
  7. package/dist/src/components/Block.js +3 -1
  8. package/dist/src/components/Declaration.d.ts +1 -1
  9. package/dist/src/components/Declaration.d.ts.map +1 -1
  10. package/dist/src/components/Declaration.js +5 -4
  11. package/dist/src/components/For.d.ts +1 -1
  12. package/dist/src/components/For.d.ts.map +1 -1
  13. package/dist/src/components/For.js +1 -1
  14. package/dist/src/components/Indent.d.ts +1 -1
  15. package/dist/src/components/Indent.d.ts.map +1 -1
  16. package/dist/src/components/List.d.ts +1 -1
  17. package/dist/src/components/List.d.ts.map +1 -1
  18. package/dist/src/components/List.js +2 -1
  19. package/dist/src/components/MemberDeclaration.d.ts +1 -1
  20. package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
  21. package/dist/src/components/MemberDeclaration.js +3 -4
  22. package/dist/src/components/MemberScope.d.ts +1 -1
  23. package/dist/src/components/MemberScope.d.ts.map +1 -1
  24. package/dist/src/components/MemberScope.js +0 -2
  25. package/dist/src/components/Prose.d.ts +1 -1
  26. package/dist/src/components/Prose.d.ts.map +1 -1
  27. package/dist/src/components/ReferenceOrContent.d.ts +1 -1
  28. package/dist/src/components/ReferenceOrContent.d.ts.map +1 -1
  29. package/dist/src/components/Scope.d.ts +1 -1
  30. package/dist/src/components/Scope.d.ts.map +1 -1
  31. package/dist/src/components/Scope.js +3 -6
  32. package/dist/src/components/Show.d.ts +1 -1
  33. package/dist/src/components/Show.d.ts.map +1 -1
  34. package/dist/src/components/StatementList.d.ts +1 -1
  35. package/dist/src/components/StatementList.d.ts.map +1 -1
  36. package/dist/src/components/StatementList.js +1 -1
  37. package/dist/src/components/Switch.d.ts +1 -1
  38. package/dist/src/components/Switch.d.ts.map +1 -1
  39. package/dist/src/components/Switch.js +1 -1
  40. package/dist/src/components/Wrap.d.ts +1 -1
  41. package/dist/src/components/Wrap.d.ts.map +1 -1
  42. package/dist/src/context/assignment.d.ts +1 -1
  43. package/dist/src/context/assignment.d.ts.map +1 -1
  44. package/dist/src/context/binder.d.ts +2 -2
  45. package/dist/src/context/binder.d.ts.map +1 -1
  46. package/dist/src/context/declaration.d.ts +1 -1
  47. package/dist/src/context/declaration.d.ts.map +1 -1
  48. package/dist/src/context/member-declaration.d.ts +1 -1
  49. package/dist/src/context/member-declaration.d.ts.map +1 -1
  50. package/dist/src/context/member-declaration.js +0 -1
  51. package/dist/src/context/member-scope.d.ts +1 -1
  52. package/dist/src/context/member-scope.d.ts.map +1 -1
  53. package/dist/src/context/name-policy.d.ts +1 -1
  54. package/dist/src/context/name-policy.d.ts.map +1 -1
  55. package/dist/src/context/scope.d.ts +1 -1
  56. package/dist/src/context/scope.d.ts.map +1 -1
  57. package/dist/src/context/source-directory.d.ts +1 -1
  58. package/dist/src/context/source-directory.d.ts.map +1 -1
  59. package/dist/src/context/source-file.d.ts +2 -2
  60. package/dist/src/context/source-file.d.ts.map +1 -1
  61. package/dist/src/index.d.ts +4 -1
  62. package/dist/src/index.d.ts.map +1 -1
  63. package/dist/src/index.js +4 -1
  64. package/dist/src/jsx-runtime.d.ts +12 -3
  65. package/dist/src/jsx-runtime.d.ts.map +1 -1
  66. package/dist/src/jsx-runtime.js +6 -2
  67. package/dist/src/reactive-union-set.d.ts +29 -0
  68. package/dist/src/reactive-union-set.d.ts.map +1 -0
  69. package/dist/src/reactive-union-set.js +183 -0
  70. package/dist/src/refkey.d.ts +36 -0
  71. package/dist/src/refkey.d.ts.map +1 -1
  72. package/dist/src/refkey.js +40 -0
  73. package/dist/src/scheduler.d.ts +2 -2
  74. package/dist/src/scheduler.d.ts.map +1 -1
  75. package/dist/src/scheduler.js +27 -6
  76. package/dist/src/slot.d.ts +1 -1
  77. package/dist/src/slot.d.ts.map +1 -1
  78. package/dist/src/stc.d.ts +1 -1
  79. package/dist/src/stc.d.ts.map +1 -1
  80. package/dist/src/sti.d.ts +1 -1
  81. package/dist/src/sti.d.ts.map +1 -1
  82. package/dist/src/sti.js +1 -1
  83. package/dist/src/symbols/index.d.ts +6 -0
  84. package/dist/src/symbols/index.d.ts.map +1 -0
  85. package/dist/src/symbols/index.js +5 -0
  86. package/dist/src/symbols/output-scope.d.ts +116 -0
  87. package/dist/src/symbols/output-scope.d.ts.map +1 -0
  88. package/dist/src/symbols/output-scope.js +246 -0
  89. package/dist/src/symbols/output-symbol.d.ts +134 -0
  90. package/dist/src/symbols/output-symbol.d.ts.map +1 -0
  91. package/dist/src/symbols/output-symbol.js +379 -0
  92. package/dist/src/symbols/symbol-flow.d.ts +13 -0
  93. package/dist/src/symbols/symbol-flow.d.ts.map +1 -0
  94. package/dist/src/symbols/symbol-flow.js +74 -0
  95. package/dist/src/symbols/symbol-slot.d.ts +12 -0
  96. package/dist/src/symbols/symbol-slot.d.ts.map +1 -0
  97. package/dist/src/symbols/symbol-slot.js +36 -0
  98. package/dist/src/symbols/symbol-table.d.ts +14 -0
  99. package/dist/src/symbols/symbol-table.d.ts.map +1 -0
  100. package/dist/src/symbols/symbol-table.js +42 -0
  101. package/dist/src/tap.d.ts +2 -1
  102. package/dist/src/tap.d.ts.map +1 -1
  103. package/dist/src/tracer.d.ts +181 -0
  104. package/dist/src/tracer.d.ts.map +1 -0
  105. package/dist/src/tracer.js +441 -0
  106. package/dist/src/tsdoc-metadata.json +1 -1
  107. package/dist/test/components/slot.test.js +5 -7
  108. package/dist/test/reactive-union-set.test.d.ts +2 -0
  109. package/dist/test/reactive-union-set.test.d.ts.map +1 -0
  110. package/dist/test/reactive-union-set.test.js +170 -0
  111. package/dist/test/symbols/output-scope.test.d.ts +2 -0
  112. package/dist/test/symbols/output-scope.test.d.ts.map +1 -0
  113. package/dist/test/symbols/output-scope.test.js +342 -0
  114. package/dist/test/symbols/output-symbol.test.d.ts +2 -0
  115. package/dist/test/symbols/output-symbol.test.d.ts.map +1 -0
  116. package/dist/test/symbols/output-symbol.test.js +446 -0
  117. package/dist/test/symbols/resolution.test.d.ts +2 -0
  118. package/dist/test/symbols/resolution.test.d.ts.map +1 -0
  119. package/dist/test/symbols/resolution.test.js +140 -0
  120. package/dist/test/symbols/utils.d.ts +24 -0
  121. package/dist/test/symbols/utils.d.ts.map +1 -0
  122. package/dist/test/symbols/utils.js +46 -0
  123. package/dist/tsconfig.tsbuildinfo +1 -1
  124. package/package.json +3 -3
  125. package/src/binder.ts +148 -672
  126. package/src/components/Block.tsx +4 -1
  127. package/src/components/Declaration.tsx +6 -6
  128. package/src/components/For.tsx +1 -1
  129. package/src/components/Indent.tsx +1 -1
  130. package/src/components/List.tsx +1 -1
  131. package/src/components/MemberDeclaration.tsx +4 -4
  132. package/src/components/MemberScope.tsx +2 -5
  133. package/src/components/Prose.tsx +1 -1
  134. package/src/components/ReferenceOrContent.tsx +1 -1
  135. package/src/components/Scope.tsx +2 -6
  136. package/src/components/Show.tsx +1 -1
  137. package/src/components/StatementList.tsx +2 -1
  138. package/src/components/Switch.tsx +1 -1
  139. package/src/components/Wrap.tsx +1 -1
  140. package/src/context/assignment.ts +1 -1
  141. package/src/context/binder.ts +2 -2
  142. package/src/context/declaration.ts +1 -1
  143. package/src/context/member-declaration.ts +1 -1
  144. package/src/context/member-scope.ts +1 -1
  145. package/src/context/name-policy.ts +1 -1
  146. package/src/context/scope.ts +1 -1
  147. package/src/context/source-directory.ts +1 -1
  148. package/src/context/source-file.ts +2 -2
  149. package/src/index.ts +15 -0
  150. package/src/jsx-runtime.ts +18 -2
  151. package/src/reactive-union-set.ts +238 -0
  152. package/src/refkey.ts +40 -0
  153. package/src/scheduler.ts +31 -6
  154. package/src/slot.ts +1 -1
  155. package/src/stc.ts +3 -3
  156. package/src/sti.ts +5 -5
  157. package/src/symbols/index.ts +5 -0
  158. package/src/symbols/output-scope.ts +323 -0
  159. package/src/symbols/output-symbol.ts +512 -0
  160. package/src/symbols/symbol-flow.ts +104 -0
  161. package/src/symbols/symbol-slot.tsx +47 -0
  162. package/src/symbols/symbol-table.ts +72 -0
  163. package/src/tap.ts +2 -1
  164. package/src/tracer.ts +440 -0
  165. package/temp/api.json +4172 -1582
  166. package/test/components/slot.test.tsx +8 -11
  167. package/test/reactive-union-set.test.tsx +191 -0
  168. package/test/symbols/output-scope.test.ts +302 -0
  169. package/test/symbols/output-symbol.test.ts +459 -0
  170. package/test/symbols/resolution.test.ts +172 -0
  171. package/test/symbols/utils.ts +95 -0
  172. package/dist/test/symbols.test.d.ts +0 -2
  173. package/dist/test/symbols.test.d.ts.map +0 -1
  174. package/dist/test/symbols.test.js +0 -884
  175. package/test/symbols.test.ts +0 -1006
@@ -0,0 +1,246 @@
1
+ import { reactive, ReactiveFlags, shallowReactive, track, TrackOpTypes, trigger, TriggerOpTypes, watch } from "@vue/reactivity";
2
+ import { useBinder } from "../context/binder.js";
3
+ import { useScope } from "../context/scope.js";
4
+ import { formatScope, formatScopeName, trace, traceEffect, TracePhase } from "../tracer.js";
5
+ import { SymbolTable } from "./symbol-table.js";
6
+
7
+ /**
8
+ * Flags that describe an output scope.
9
+ */
10
+ export let OutputScopeFlags = /*#__PURE__*/function (OutputScopeFlags) {
11
+ OutputScopeFlags[OutputScopeFlags["None"] = 0] = "None";
12
+ /**
13
+ * This scope is a static member scope.
14
+ */
15
+ OutputScopeFlags[OutputScopeFlags["StaticMemberScope"] = 1] = "StaticMemberScope";
16
+ /**
17
+ * This scope is an instance member scope.
18
+ */
19
+ OutputScopeFlags[OutputScopeFlags["InstanceMemberScope"] = 2] = "InstanceMemberScope";
20
+ /**
21
+ * This scope is transient, and only exists to be merged with other scopes.
22
+ */
23
+ OutputScopeFlags[OutputScopeFlags["Transient"] = 4] = "Transient";
24
+ /**
25
+ * This scope is a member scope. Scopes with this flag will have an `owner`
26
+ * property that points to the symbol whose member this scope holds.
27
+ */
28
+ OutputScopeFlags[OutputScopeFlags["MemberScope"] = 3] = "MemberScope";
29
+ return OutputScopeFlags;
30
+ }({});
31
+ let scopeCount = 0;
32
+ /**
33
+ * A container of symbols accessible within some scope in your output code.
34
+ *
35
+ * @remarks
36
+ *
37
+ * Scopes form a tree. All scopes except the global scope have a parent scope
38
+ * identified by `parent`. Scopes can have nested scopes which can be accessed
39
+ * using the `children` property. Whether a child scope can be accessed from
40
+ * the parent scope is determined by each language's scoping rules.
41
+ *
42
+ * This interface is the base implementation of scope. Generally, most languages
43
+ * will have subtypes of this interface that provide additional metadata about
44
+ * the scope. For example, TypeScript scopes need to track whether the scope
45
+ * represents a package, module, class, function, etc.
46
+ *
47
+ * Scopes are reactive values, which allows you to observe changes to the scope
48
+ * within a reactive context.
49
+ */
50
+ export class OutputScope {
51
+ // my kingdom for decorators
52
+ #name;
53
+ /**
54
+ * The name of the scope.
55
+ */
56
+ get name() {
57
+ track(this, TrackOpTypes.GET, "name");
58
+ return this.#name;
59
+ }
60
+ set name(name) {
61
+ const old = this.#name;
62
+ this.#name = name;
63
+ trigger(this, TriggerOpTypes.SET, "name", name, old);
64
+ }
65
+ #id;
66
+ /**
67
+ * The unique id of this scope.
68
+ */
69
+ get id() {
70
+ return this.#id;
71
+ }
72
+ #kind;
73
+
74
+ /**
75
+ * The kind of scope. Subtypes will likely provide a set of known scope kinds.
76
+ * The kind is not used by the binder itself.
77
+ */
78
+ get kind() {
79
+ return this.#kind;
80
+ }
81
+ #flags;
82
+ /**
83
+ * The flags that describe this scope.
84
+ */
85
+ get flags() {
86
+ track(this, TrackOpTypes.GET, "flags");
87
+ return this.#flags;
88
+ }
89
+ set flags(flags) {
90
+ const old = this.#flags;
91
+ this.#flags = flags;
92
+ trigger(this, TriggerOpTypes.SET, "flags", flags, old);
93
+ }
94
+
95
+ // read only
96
+ #metadata;
97
+ get metadata() {
98
+ return this.#metadata;
99
+ }
100
+ #parent;
101
+ /**
102
+ * The container of this scope. This is only defined for scopes which don't
103
+ * have the {@link OutputScopeFlags.StaticMemberScope} or
104
+ * {@link OutputScopeFlags.InstanceMemberScope} flag.
105
+ */
106
+ get parent() {
107
+ return this.#parent;
108
+ }
109
+ #owner;
110
+ /**
111
+ * The symbol that owns this scope. This is only defined for scopes that have
112
+ * the {@link OutputScopeFlags.StaticMemberScope} or
113
+ * {@link OutputScopeFlags.InstanceMemberScope} flag.
114
+ */
115
+ get owner() {
116
+ return this.#owner;
117
+ }
118
+ #symbols;
119
+ /**
120
+ * The symbols defined within this scope.
121
+ */
122
+ get symbols() {
123
+ return this.#symbols;
124
+ }
125
+ #symbolsByRefkey;
126
+ /**
127
+ * The symbols defined within this scope, indexed by refkey.
128
+ */
129
+ get symbolsByRefkey() {
130
+ return this.#symbolsByRefkey;
131
+ }
132
+ #symbolNames;
133
+ get symbolNames() {
134
+ return this.#symbolNames;
135
+ }
136
+ #children;
137
+ /**
138
+ * The scopes nested within this scope.
139
+ */
140
+ get children() {
141
+ return this.#children;
142
+ }
143
+ #binder;
144
+ /**
145
+ * The binder that created this scope.
146
+ */
147
+ get binder() {
148
+ return this.#binder;
149
+ }
150
+ [ReactiveFlags.SKIP] = this;
151
+ constructor(name, options = {}) {
152
+ this.#name = name;
153
+ this.#id = scopeCount++;
154
+ this.#flags = options.flags ?? OutputScopeFlags.None;
155
+ this.#kind = options.kind ?? "scope";
156
+ this.#metadata = reactive(options.metadata ?? {});
157
+ this.#binder = options.binder ?? useBinder();
158
+ this.#owner = options.owner;
159
+ this.#children = shallowReactive(new Set());
160
+ if (this.#flags & OutputScopeFlags.MemberScope) {
161
+ if (!this.#owner) {
162
+ throw new Error("Member scopes must have an owner");
163
+ }
164
+ } else {
165
+ if (!this.#parent) {
166
+ this.#parent = options.parent ?? useScope() ?? this.#binder?.globalScope;
167
+ }
168
+ if (this.#parent) {
169
+ // not global scope
170
+ this.#parent.children.add(this);
171
+ }
172
+ }
173
+ this.#symbols = new SymbolTable(this, {
174
+ nameConflictResolver: this.#binder?.nameConflictResolver
175
+ });
176
+ this.#symbolsByRefkey = this.#symbols.createIndex(s => s.refkeys);
177
+ this.#symbolNames = this.#symbols.createDerivedSet(s => {
178
+ return s.name;
179
+ });
180
+ if (this.#parent) {
181
+ this.#parent.children.add(this);
182
+ }
183
+ this.#binder?.notifyScopeCreated(this);
184
+ trace(TracePhase.scope.create, () => `${formatScope(this)}`);
185
+ traceEffect(TracePhase.scope.update, () => {
186
+ return `${formatScope(this)}`;
187
+ });
188
+ }
189
+ moveSymbolsFrom(source, options) {
190
+ trace(TracePhase.scope.copySymbols, () => `Moving symbols from ${formatScopeName(source)} to ${formatScopeName(this)}`);
191
+ this.#symbols.addSubset(source.#symbols, {
192
+ onAdd: symbol => {
193
+ if (options?.onAdd) {
194
+ return options.onAdd(symbol);
195
+ }
196
+ symbol.scope = this;
197
+ return symbol;
198
+ },
199
+ onDelete: symbol => {
200
+ if (options?.onDelete) {
201
+ options.onDelete(symbol);
202
+ }
203
+ }
204
+ });
205
+ }
206
+ copySymbolsFrom(source, options) {
207
+ trace(TracePhase.scope.copySymbols, () => `Copying symbols from ${formatScopeName(source)} to ${formatScopeName(this)}`);
208
+ this.#symbols.addSubset(source.#symbols, {
209
+ onAdd: symbol => {
210
+ if (options?.onAdd) {
211
+ return options.onAdd(symbol);
212
+ }
213
+ return symbol.copyToScope(this);
214
+ },
215
+ onDelete: symbol => {
216
+ if (options?.onDelete) {
217
+ options.onDelete(symbol);
218
+ }
219
+ }
220
+ });
221
+ }
222
+ clone(options = {}) {
223
+ if (this.#flags & OutputScopeFlags.MemberScope && !options.owner) {
224
+ throw new Error("Member scope clones must specify an owner symbol");
225
+ } else if (this.#flags & ~OutputScopeFlags.MemberScope && !options.parent) {
226
+ throw new Error("Non-member scope clones must specify a parent scope");
227
+ }
228
+ const clone = new OutputScope(this.#name, {
229
+ binder: this.#binder,
230
+ flags: this.#flags,
231
+ kind: this.#kind,
232
+ metadata: this.#metadata,
233
+ parent: options.parent,
234
+ owner: options.owner
235
+ });
236
+ watch(() => this.name, newName => clone.name = newName);
237
+ watch(() => this.flags, newFlags => clone.flags = newFlags);
238
+ // todo: this should be reactive, but cloning non-member scopes
239
+ // seems like a very rare thing.
240
+ for (const child of this.#children) {
241
+ clone.children.add(child.clone());
242
+ }
243
+ clone.copySymbolsFrom(this);
244
+ return clone;
245
+ }
246
+ }
@@ -0,0 +1,134 @@
1
+ import { ReactiveFlags } from "@vue/reactivity";
2
+ import type { Binder } from "../binder.js";
3
+ import { type Refkey } from "../refkey.js";
4
+ import { OutputScope, OutputScopeFlags } from "./output-scope.js";
5
+ /**
6
+ * Flags that describe an output symbol.
7
+ */
8
+ export declare enum OutputSymbolFlags {
9
+ None = 0,
10
+ /**
11
+ * The symbol is an instance member container. Symbols with this flag will have a
12
+ * instanceMemberScope property that contains symbols for instance members.
13
+ */
14
+ InstanceMemberContainer = 1,
15
+ /**
16
+ * The symbol is a static member container. Symbols with this flag will have a
17
+ * staticMemberScope property that contains symbols for static members.
18
+ */
19
+ StaticMemberContainer = 2,
20
+ /**
21
+ * Whether this symbol contains members of any kind.
22
+ */
23
+ MemberContainer = 3,
24
+ /**
25
+ * Whether this symbol is an instance member of another symbol (i.e that it is
26
+ * stored in an instance member scope).
27
+ */
28
+ InstanceMember = 4,
29
+ /**
30
+ * Whether this symbol is a static member of another symbol (i.e that it is
31
+ * stored in a static member scope).
32
+ */
33
+ StaticMember = 8,
34
+ /**
35
+ * Transient symbols are not added to symbol tables and do not create
36
+ * referencable refkeys. They are used for temporary symbols that are intended
37
+ * to be used to calculate other symbols.
38
+ */
39
+ Transient = 16,
40
+ /**
41
+ * This symbol aliases another symbol. Only its name, flags, and scope are
42
+ * stored in this symbol. Otherwise, everything else is located on the alias
43
+ * target.
44
+ */
45
+ Alias = 32,
46
+ /**
47
+ * Whether this is an instance member or static member of another symbol.
48
+ */
49
+ Member = 12
50
+ }
51
+ export interface OutputSymbolOptions {
52
+ binder?: Binder;
53
+ scope?: OutputScope;
54
+ flags?: OutputSymbolFlags;
55
+ refkeys?: Refkey | Refkey[];
56
+ metadata?: Record<string, unknown>;
57
+ aliasTarget?: OutputSymbol;
58
+ }
59
+ /**
60
+ * An output symbol is a named entity that can be referenced in your output
61
+ * code.
62
+ *
63
+ * @remarks
64
+ *
65
+ * This class is the base implementation of symbol. Most languages will have
66
+ * subtypes that provide additional metadata. Symbols are reactive values, so
67
+ * you can observe changes to their properties in a reactive context.
68
+ */
69
+ export declare class OutputSymbol {
70
+ #private;
71
+ get originalName(): string;
72
+ get name(): string;
73
+ set name(name: string);
74
+ get id(): number;
75
+ get flags(): OutputSymbolFlags;
76
+ set flags(flags: OutputSymbolFlags);
77
+ get scope(): OutputScope;
78
+ set scope(scope: OutputScope);
79
+ get binder(): Binder | undefined;
80
+ get refkeys(): Refkey[];
81
+ set refkeys(refkeys: Refkey[]);
82
+ get instanceMemberScope(): OutputScope | undefined;
83
+ get aliasTarget(): OutputSymbol | undefined;
84
+ /**
85
+ * Create an output scope to hold member symbols. By default this just creates
86
+ * an OutputScope, but can be subclassed to build scope subtypes when needed.
87
+ */
88
+ protected createMemberScope(name: string, options: {
89
+ owner?: OutputSymbol;
90
+ flags?: OutputScopeFlags;
91
+ }): OutputScope;
92
+ get staticMemberScope(): OutputScope | undefined;
93
+ get metadata(): Record<string, unknown>;
94
+ /**
95
+ * Tell \@vue/reactivity that this symbol should never be wrapped in a reactive
96
+ * proxy.
97
+ */
98
+ [ReactiveFlags.SKIP]: boolean;
99
+ constructor(name: string, options?: OutputSymbolOptions);
100
+ delete(): void;
101
+ /**
102
+ * Takes the instance members or static members on this symbol and creates
103
+ * corresponding static members on the target symbol. Instance or static
104
+ * members of instantiated symbols are copied. The refkey of any instantiated
105
+ * symbols are set to a composite refkey of the target symbol's refkey and the
106
+ * instantiated symbol's refkey.
107
+ */
108
+ instantiateTo(targetSymbol: OutputSymbol): void;
109
+ /**
110
+ * Copy member symbols from the target symbol into the target symbol. The
111
+ * copied symbols have their refkey set to
112
+ * `refkey(targetSymbol.refkey, this.refkey)`.
113
+ */
114
+ copyTo(targetSymbol: OutputSymbol): void;
115
+ /**
116
+ * Move member symbols from this transient symbol to the target symbol.
117
+ */
118
+ moveTo(targetSymbol: OutputSymbol): void;
119
+ /**
120
+ * Makes a copy of this symbol which will update the name and flags
121
+ * of the clone when the original symbol is updated.
122
+ *
123
+ * @remarks
124
+ *
125
+ * This is used to create a symbol that is a copy of this symbol, but
126
+ * with a different scope. Changes to the copy will not affect the
127
+ * original symbol, and changes to the original symbol's name and flags
128
+ * will overwrite the copy's name and flags.
129
+ *
130
+ * @param newScope - The scope to use for the copy.
131
+ */
132
+ copyToScope(newScope: OutputScope, baseSymbol?: OutputSymbol): OutputSymbol;
133
+ }
134
+ //# sourceMappingURL=output-symbol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output-symbol.d.ts","sourceRoot":"","sources":["../../../src/symbols/output-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAOd,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C,OAAO,EAAoB,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAS7D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,IAAI,IAAI;IAER;;;OAGG;IACH,uBAAuB,IAAS;IAEhC;;;OAGG;IACH,qBAAqB,IAAS;IAE9B;;OAEG;IACH,eAAe,IAAkD;IAEjE;;;OAGG;IACH,cAAc,IAAS;IAEvB;;;OAGG;IACH,YAAY,IAAS;IAErB;;;;OAIG;IACH,SAAS,KAAS;IAElB;;;;OAIG;IACH,KAAK,KAAS;IAEd;;OAEG;IACH,MAAM,KAAgC;CACvC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,YAAY,CAAC;CAC5B;AAID;;;;;;;;;GASG;AACH,qBAAa,YAAY;;IAEvB,IAAI,YAAY,WAEf;IAGD,IAAI,IAAI,IAIO,MAAM,CADpB;IACD,IAAI,IAAI,CAAC,IAAI,EAAE,MAAM,EASpB;IAGD,IAAI,EAAE,WAEL;IAGD,IAAI,KAAK,IAIQ,iBAAiB,CADjC;IACD,IAAI,KAAK,CAAC,KAAK,EAAE,iBAAiB,EAYjC;IAGD,IAAI,KAAK,IAKQ,WAAW,CAF3B;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,WAAW,EAY3B;IAwBD,IAAI,MAAM,uBAET;IAGD,IAAI,OAAO,IAKU,MAAM,EAAE,CAF5B;IAED,IAAI,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAW5B;IAGD,IAAI,mBAAmB,4BAGtB;IAGD,IAAI,WAAW,6BAEd;IA2BD;;;OAGG;IACH,SAAS,CAAC,iBAAiB,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,KAAK,CAAC,EAAE,gBAAgB,CAAC;KAC1B;IAUH,IAAI,iBAAiB,4BAGpB;IAyBD,IAAI,QAAQ,4BAEX;IAED;;;OAGG;IACH,CAAC,aAAa,CAAC,IAAI,CAAC,UAAQ;gBAEhB,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,mBAAwB;IA+B3D,MAAM;IASN;;;;;;OAMG;IACH,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAuC/C;;;;OAIG;IACH,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAiBxC;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI;IAqBxC;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,YAAY,GAAG,YAAY;CA8D5E"}