@alloy-js/core 0.20.0-dev.4 → 0.20.0-dev.7

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 (334) hide show
  1. package/dist/src/binder.d.ts +74 -38
  2. package/dist/src/binder.d.ts.map +1 -1
  3. package/dist/src/binder.js +235 -173
  4. package/dist/src/binder.js.map +1 -0
  5. package/dist/src/code.js +2 -1
  6. package/dist/src/code.js.map +1 -0
  7. package/dist/src/components/AppendFile.js +2 -1
  8. package/dist/src/components/AppendFile.js.map +1 -0
  9. package/dist/src/components/Block.js +2 -1
  10. package/dist/src/components/Block.js.map +1 -0
  11. package/dist/src/components/CopyFile.js +2 -1
  12. package/dist/src/components/CopyFile.js.map +1 -0
  13. package/dist/src/components/Declaration.d.ts +2 -2
  14. package/dist/src/components/Declaration.d.ts.map +1 -1
  15. package/dist/src/components/Declaration.js +10 -3
  16. package/dist/src/components/Declaration.js.map +1 -0
  17. package/dist/src/components/For.js +2 -1
  18. package/dist/src/components/For.js.map +1 -0
  19. package/dist/src/components/Indent.js +2 -1
  20. package/dist/src/components/Indent.js.map +1 -0
  21. package/dist/src/components/List.js +2 -1
  22. package/dist/src/components/List.js.map +1 -0
  23. package/dist/src/components/MemberDeclaration.d.ts +2 -2
  24. package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
  25. package/dist/src/components/MemberDeclaration.js +11 -6
  26. package/dist/src/components/MemberDeclaration.js.map +1 -0
  27. package/dist/src/components/MemberName.js +2 -1
  28. package/dist/src/components/MemberName.js.map +1 -0
  29. package/dist/src/components/MemberScope.d.ts +30 -13
  30. package/dist/src/components/MemberScope.d.ts.map +1 -1
  31. package/dist/src/components/MemberScope.js +39 -16
  32. package/dist/src/components/MemberScope.js.map +1 -0
  33. package/dist/src/components/Name.js +2 -1
  34. package/dist/src/components/Name.js.map +1 -0
  35. package/dist/src/components/Output.d.ts.map +1 -1
  36. package/dist/src/components/Output.js +4 -6
  37. package/dist/src/components/Output.js.map +1 -0
  38. package/dist/src/components/Prose.js +2 -1
  39. package/dist/src/components/Prose.js.map +1 -0
  40. package/dist/src/components/ReferenceOrContent.d.ts +1 -1
  41. package/dist/src/components/ReferenceOrContent.d.ts.map +1 -1
  42. package/dist/src/components/ReferenceOrContent.js +2 -1
  43. package/dist/src/components/ReferenceOrContent.js.map +1 -0
  44. package/dist/src/components/Scope.d.ts +5 -5
  45. package/dist/src/components/Scope.d.ts.map +1 -1
  46. package/dist/src/components/Scope.js +11 -6
  47. package/dist/src/components/Scope.js.map +1 -0
  48. package/dist/src/components/Show.js +2 -1
  49. package/dist/src/components/Show.js.map +1 -0
  50. package/dist/src/components/SourceDirectory.js +2 -1
  51. package/dist/src/components/SourceDirectory.js.map +1 -0
  52. package/dist/src/components/SourceFile.js +2 -1
  53. package/dist/src/components/SourceFile.js.map +1 -0
  54. package/dist/src/components/StatementList.js +2 -1
  55. package/dist/src/components/StatementList.js.map +1 -0
  56. package/dist/src/components/Switch.js +2 -1
  57. package/dist/src/components/Switch.js.map +1 -0
  58. package/dist/src/components/TemplateFile.js +2 -1
  59. package/dist/src/components/TemplateFile.js.map +1 -0
  60. package/dist/src/components/UpdateFile.js +2 -1
  61. package/dist/src/components/UpdateFile.js.map +1 -0
  62. package/dist/src/components/Wrap.js +2 -1
  63. package/dist/src/components/Wrap.js.map +1 -0
  64. package/dist/src/components/index.js +2 -1
  65. package/dist/src/components/index.js.map +1 -0
  66. package/dist/src/components/stc/index.js +2 -1
  67. package/dist/src/components/stc/index.js.map +1 -0
  68. package/dist/src/components/stc/sti.js +2 -1
  69. package/dist/src/components/stc/sti.js.map +1 -0
  70. package/dist/src/context/assignment.js +2 -1
  71. package/dist/src/context/assignment.js.map +1 -0
  72. package/dist/src/context/binder.js +2 -1
  73. package/dist/src/context/binder.js.map +1 -0
  74. package/dist/src/context/declaration.js +2 -1
  75. package/dist/src/context/declaration.js.map +1 -0
  76. package/dist/src/context/index.js +2 -1
  77. package/dist/src/context/index.js.map +1 -0
  78. package/dist/src/context/member-declaration.js +2 -1
  79. package/dist/src/context/member-declaration.js.map +1 -0
  80. package/dist/src/context/member-scope.d.ts +7 -8
  81. package/dist/src/context/member-scope.d.ts.map +1 -1
  82. package/dist/src/context/member-scope.js +7 -6
  83. package/dist/src/context/member-scope.js.map +1 -0
  84. package/dist/src/context/name-policy.d.ts.map +1 -1
  85. package/dist/src/context/name-policy.js +5 -1
  86. package/dist/src/context/name-policy.js.map +1 -0
  87. package/dist/src/context/scope.d.ts +1 -0
  88. package/dist/src/context/scope.d.ts.map +1 -1
  89. package/dist/src/context/scope.js +9 -1
  90. package/dist/src/context/scope.js.map +1 -0
  91. package/dist/src/context/source-directory.js +2 -1
  92. package/dist/src/context/source-directory.js.map +1 -0
  93. package/dist/src/context/source-file.js +2 -1
  94. package/dist/src/context/source-file.js.map +1 -0
  95. package/dist/src/context.js +2 -1
  96. package/dist/src/context.js.map +1 -0
  97. package/dist/src/debug.js +2 -1
  98. package/dist/src/debug.js.map +1 -0
  99. package/dist/src/host/alloy-host.browser.js +2 -1
  100. package/dist/src/host/alloy-host.browser.js.map +1 -0
  101. package/dist/src/host/alloy-host.js +2 -1
  102. package/dist/src/host/alloy-host.js.map +1 -0
  103. package/dist/src/host/interface.js +2 -1
  104. package/dist/src/host/interface.js.map +1 -0
  105. package/dist/src/index.browser.js +2 -1
  106. package/dist/src/index.browser.js.map +1 -0
  107. package/dist/src/index.js +2 -1
  108. package/dist/src/index.js.map +1 -0
  109. package/dist/src/inspect.browser.d.ts +5 -0
  110. package/dist/src/inspect.browser.d.ts.map +1 -0
  111. package/dist/src/inspect.browser.js +6 -0
  112. package/dist/src/inspect.browser.js.map +1 -0
  113. package/dist/src/inspect.d.ts +2 -0
  114. package/dist/src/inspect.d.ts.map +1 -0
  115. package/dist/src/inspect.js +2 -0
  116. package/dist/src/inspect.js.map +1 -0
  117. package/dist/src/jsx-runtime.js +2 -1
  118. package/dist/src/jsx-runtime.js.map +1 -0
  119. package/dist/src/name-policy.d.ts +11 -0
  120. package/dist/src/name-policy.d.ts.map +1 -1
  121. package/dist/src/name-policy.js +5 -1
  122. package/dist/src/name-policy.js.map +1 -0
  123. package/dist/src/props-combinators.js +2 -1
  124. package/dist/src/props-combinators.js.map +1 -0
  125. package/dist/src/reactive-union-set.d.ts.map +1 -1
  126. package/dist/src/reactive-union-set.js +14 -9
  127. package/dist/src/reactive-union-set.js.map +1 -0
  128. package/dist/src/reactivity.js +2 -1
  129. package/dist/src/reactivity.js.map +1 -0
  130. package/dist/src/refkey.d.ts +39 -3
  131. package/dist/src/refkey.d.ts.map +1 -1
  132. package/dist/src/refkey.js +65 -10
  133. package/dist/src/refkey.js.map +1 -0
  134. package/dist/src/render.js +2 -1
  135. package/dist/src/render.js.map +1 -0
  136. package/dist/src/resource.js +2 -1
  137. package/dist/src/resource.js.map +1 -0
  138. package/dist/src/runtime/component.js +2 -1
  139. package/dist/src/runtime/component.js.map +1 -0
  140. package/dist/src/runtime/intrinsic.js +2 -1
  141. package/dist/src/runtime/intrinsic.js.map +1 -0
  142. package/dist/src/scheduler.js +2 -1
  143. package/dist/src/scheduler.js.map +1 -0
  144. package/dist/src/stc.js +2 -1
  145. package/dist/src/stc.js.map +1 -0
  146. package/dist/src/sti.js +2 -1
  147. package/dist/src/sti.js.map +1 -0
  148. package/dist/src/symbols/basic-scope.d.ts +14 -0
  149. package/dist/src/symbols/basic-scope.d.ts.map +1 -0
  150. package/dist/src/symbols/basic-scope.js +21 -0
  151. package/dist/src/symbols/basic-scope.js.map +1 -0
  152. package/dist/src/symbols/basic-symbol.d.ts +19 -0
  153. package/dist/src/symbols/basic-symbol.d.ts.map +1 -0
  154. package/dist/src/symbols/basic-symbol.js +29 -0
  155. package/dist/src/symbols/basic-symbol.js.map +1 -0
  156. package/dist/src/symbols/index.d.ts +3 -1
  157. package/dist/src/symbols/index.d.ts.map +1 -1
  158. package/dist/src/symbols/index.js +5 -2
  159. package/dist/src/symbols/index.js.map +1 -0
  160. package/dist/src/symbols/output-scope.d.ts +70 -41
  161. package/dist/src/symbols/output-scope.d.ts.map +1 -1
  162. package/dist/src/symbols/output-scope.js +100 -131
  163. package/dist/src/symbols/output-scope.js.map +1 -0
  164. package/dist/src/symbols/output-space.d.ts +25 -0
  165. package/dist/src/symbols/output-space.d.ts.map +1 -0
  166. package/dist/src/symbols/output-space.js +36 -0
  167. package/dist/src/symbols/output-space.js.map +1 -0
  168. package/dist/src/symbols/output-symbol.d.ts +213 -37
  169. package/dist/src/symbols/output-symbol.d.ts.map +1 -1
  170. package/dist/src/symbols/output-symbol.js +325 -204
  171. package/dist/src/symbols/output-symbol.js.map +1 -0
  172. package/dist/src/symbols/symbol-flow.d.ts +1 -1
  173. package/dist/src/symbols/symbol-flow.d.ts.map +1 -1
  174. package/dist/src/symbols/symbol-flow.js +24 -8
  175. package/dist/src/symbols/symbol-flow.js.map +1 -0
  176. package/dist/src/symbols/symbol-slot.d.ts +27 -9
  177. package/dist/src/symbols/symbol-slot.d.ts.map +1 -1
  178. package/dist/src/symbols/symbol-slot.js +22 -5
  179. package/dist/src/symbols/symbol-slot.js.map +1 -0
  180. package/dist/src/symbols/symbol-table.d.ts +19 -8
  181. package/dist/src/symbols/symbol-table.d.ts.map +1 -1
  182. package/dist/src/symbols/symbol-table.js +67 -17
  183. package/dist/src/symbols/symbol-table.js.map +1 -0
  184. package/dist/src/tap.js +2 -1
  185. package/dist/src/tap.js.map +1 -0
  186. package/dist/src/tracer.d.ts +15 -3
  187. package/dist/src/tracer.d.ts.map +1 -1
  188. package/dist/src/tracer.js +41 -64
  189. package/dist/src/tracer.js.map +1 -0
  190. package/dist/src/utils.js +2 -1
  191. package/dist/src/utils.js.map +1 -0
  192. package/dist/src/write-output.js +2 -1
  193. package/dist/src/write-output.js.map +1 -0
  194. package/dist/test/browser-build.test.js +2 -1
  195. package/dist/test/browser-build.test.js.map +1 -0
  196. package/dist/test/children.test.js +2 -1
  197. package/dist/test/children.test.js.map +1 -0
  198. package/dist/test/components/append-file.test.js +2 -1
  199. package/dist/test/components/append-file.test.js.map +1 -0
  200. package/dist/test/components/block.test.js +2 -1
  201. package/dist/test/components/block.test.js.map +1 -0
  202. package/dist/test/components/copy-file.test.js +2 -1
  203. package/dist/test/components/copy-file.test.js.map +1 -0
  204. package/dist/test/components/declaration.test.js +11 -15
  205. package/dist/test/components/declaration.test.js.map +1 -0
  206. package/dist/test/components/list.test.js +2 -1
  207. package/dist/test/components/list.test.js.map +1 -0
  208. package/dist/test/components/prose.test.js +2 -1
  209. package/dist/test/components/prose.test.js.map +1 -0
  210. package/dist/test/components/reference-or-content.test.js +4 -3
  211. package/dist/test/components/reference-or-content.test.js.map +1 -0
  212. package/dist/test/components/source-file.test.js +2 -1
  213. package/dist/test/components/source-file.test.js.map +1 -0
  214. package/dist/test/components/template-file.test.js +2 -1
  215. package/dist/test/components/template-file.test.js.map +1 -0
  216. package/dist/test/components/update-file.test.js +2 -1
  217. package/dist/test/components/update-file.test.js.map +1 -0
  218. package/dist/test/components/wrap.test.js +2 -1
  219. package/dist/test/components/wrap.test.js.map +1 -0
  220. package/dist/test/control-flow/for.test.js +2 -1
  221. package/dist/test/control-flow/for.test.js.map +1 -0
  222. package/dist/test/control-flow/match.test.js +2 -1
  223. package/dist/test/control-flow/match.test.js.map +1 -0
  224. package/dist/test/control-flow/show.test.js +2 -1
  225. package/dist/test/control-flow/show.test.js.map +1 -0
  226. package/dist/test/name-policy.test.js +2 -1
  227. package/dist/test/name-policy.test.js.map +1 -0
  228. package/dist/test/props-with-defaults.test.js +2 -1
  229. package/dist/test/props-with-defaults.test.js.map +1 -0
  230. package/dist/test/reactive-union-set.test.js +2 -1
  231. package/dist/test/reactive-union-set.test.js.map +1 -0
  232. package/dist/test/reactivity/circular-reactives.test.js +2 -1
  233. package/dist/test/reactivity/circular-reactives.test.js.map +1 -0
  234. package/dist/test/reactivity/cleanup.test.js +2 -1
  235. package/dist/test/reactivity/cleanup.test.js.map +1 -0
  236. package/dist/test/reactivity/memo.test.js +2 -1
  237. package/dist/test/reactivity/memo.test.js.map +1 -0
  238. package/dist/test/reactivity/ref-rendering.test.js +2 -1
  239. package/dist/test/reactivity/ref-rendering.test.js.map +1 -0
  240. package/dist/test/reactivity/test.test.js +2 -1
  241. package/dist/test/reactivity/test.test.js.map +1 -0
  242. package/dist/test/reactivity/untrack.test.js +2 -1
  243. package/dist/test/reactivity/untrack.test.js.map +1 -0
  244. package/dist/test/refkey.test.js +2 -1
  245. package/dist/test/refkey.test.js.map +1 -0
  246. package/dist/test/rendering/basic.test.js +2 -1
  247. package/dist/test/rendering/basic.test.js.map +1 -0
  248. package/dist/test/rendering/code.test.js +2 -1
  249. package/dist/test/rendering/code.test.js.map +1 -0
  250. package/dist/test/rendering/formatting.test.js +2 -1
  251. package/dist/test/rendering/formatting.test.js.map +1 -0
  252. package/dist/test/rendering/indent.test.js +2 -1
  253. package/dist/test/rendering/indent.test.js.map +1 -0
  254. package/dist/test/rendering/memoization.test.js +2 -1
  255. package/dist/test/rendering/memoization.test.js.map +1 -0
  256. package/dist/test/rendering/refkeys.test.js +2 -1
  257. package/dist/test/rendering/refkeys.test.js.map +1 -0
  258. package/dist/test/split-props.test.js +2 -1
  259. package/dist/test/split-props.test.js.map +1 -0
  260. package/dist/test/stc.test.js +2 -1
  261. package/dist/test/stc.test.js.map +1 -0
  262. package/dist/test/symbols/output-scope.test.js +34 -198
  263. package/dist/test/symbols/output-scope.test.js.map +1 -0
  264. package/dist/test/symbols/output-symbol.test.js +141 -386
  265. package/dist/test/symbols/output-symbol.test.js.map +1 -0
  266. package/dist/test/symbols/resolution.test.js +433 -115
  267. package/dist/test/symbols/resolution.test.js.map +1 -0
  268. package/dist/test/symbols/symbol-table.test.d.ts +2 -0
  269. package/dist/test/symbols/symbol-table.test.d.ts.map +1 -0
  270. package/dist/test/symbols/symbol-table.test.js +15 -0
  271. package/dist/test/symbols/symbol-table.test.js.map +1 -0
  272. package/dist/test/symbols/utils.d.ts +10 -24
  273. package/dist/test/symbols/utils.d.ts.map +1 -1
  274. package/dist/test/symbols/utils.js +25 -46
  275. package/dist/test/symbols/utils.js.map +1 -0
  276. package/dist/test/utils.test.js +2 -1
  277. package/dist/test/utils.test.js.map +1 -0
  278. package/dist/testing/extend-expect.js +2 -1
  279. package/dist/testing/extend-expect.js.map +1 -0
  280. package/dist/testing/extend-expect.test.js +2 -1
  281. package/dist/testing/extend-expect.test.js.map +1 -0
  282. package/dist/testing/index.js +2 -1
  283. package/dist/testing/index.js.map +1 -0
  284. package/dist/testing/render.js +2 -1
  285. package/dist/testing/render.js.map +1 -0
  286. package/dist/testing/vitest.d.js +2 -1
  287. package/dist/testing/vitest.d.js.map +1 -0
  288. package/dist/tsconfig.tsbuildinfo +1 -1
  289. package/package.json +5 -3
  290. package/src/binder.ts +368 -273
  291. package/src/components/Declaration.tsx +13 -3
  292. package/src/components/MemberDeclaration.tsx +15 -8
  293. package/src/components/MemberScope.tsx +61 -20
  294. package/src/components/Output.tsx +0 -4
  295. package/src/components/Scope.tsx +16 -9
  296. package/src/context/member-scope.ts +10 -10
  297. package/src/context/name-policy.ts +3 -0
  298. package/src/context/scope.ts +9 -0
  299. package/src/inspect.browser.ts +6 -0
  300. package/src/inspect.ts +1 -0
  301. package/src/name-policy.ts +14 -0
  302. package/src/reactive-union-set.ts +14 -8
  303. package/src/refkey.ts +106 -14
  304. package/src/symbols/basic-scope.ts +23 -0
  305. package/src/symbols/basic-symbol.ts +32 -0
  306. package/src/symbols/index.ts +3 -1
  307. package/src/symbols/output-scope.ts +131 -170
  308. package/src/symbols/output-space.ts +49 -0
  309. package/src/symbols/output-symbol.ts +434 -258
  310. package/src/symbols/symbol-flow.ts +38 -9
  311. package/src/symbols/symbol-slot.tsx +46 -8
  312. package/src/symbols/symbol-table.ts +95 -21
  313. package/src/tracer.ts +53 -83
  314. package/temp/api.json +7009 -4461
  315. package/test/components/declaration.test.tsx +6 -19
  316. package/test/components/reference-or-content.test.tsx +2 -2
  317. package/test/symbols/output-scope.test.ts +33 -125
  318. package/test/symbols/output-symbol.test.ts +128 -348
  319. package/test/symbols/resolution.test.ts +530 -117
  320. package/test/symbols/symbol-table.test.ts +15 -0
  321. package/test/symbols/utils.ts +38 -74
  322. package/tsdoc.json +4 -0
  323. package/dist/src/slot.d.ts +0 -15
  324. package/dist/src/slot.d.ts.map +0 -1
  325. package/dist/src/slot.js +0 -50
  326. package/dist/src/symbols/flags.d.ts +0 -70
  327. package/dist/src/symbols/flags.d.ts.map +0 -1
  328. package/dist/src/symbols/flags.js +0 -72
  329. package/dist/test/components/slot.test.d.ts +0 -2
  330. package/dist/test/components/slot.test.d.ts.map +0 -1
  331. package/dist/test/components/slot.test.js +0 -134
  332. package/src/slot.ts +0 -89
  333. package/src/symbols/flags.ts +0 -82
  334. package/test/components/slot.test.tsx +0 -174
@@ -1,15 +1,65 @@
1
- import { ReactiveFlags } from "@vue/reactivity";
1
+ import { ReactiveFlags, Ref } from "@vue/reactivity";
2
2
  import type { Binder } from "../binder.js";
3
- import { type Refkey } from "../refkey.js";
4
- import { OutputScopeFlags, OutputSymbolFlags } from "./flags.js";
5
- import { OutputScope } from "./output-scope.js";
3
+ import { inspect } from "../inspect.js";
4
+ import { NamePolicyGetter } from "../name-policy.js";
5
+ import { Namekey, type Refkey } from "../refkey.js";
6
+ import { OutputMemberSpace, OutputSpace } from "./output-space.js";
6
7
  export interface OutputSymbolOptions {
8
+ /**
9
+ * The binder instance associated with this symbol. Symbol updates and changes
10
+ * will be reported to this binder. This binder will be able to find this
11
+ * symbol via its refkey and other means. Without a binder, this symbol will
12
+ * be unbound, which means it cannot be referenced by refkey.
13
+ */
7
14
  binder?: Binder;
8
- scope?: OutputScope;
9
- flags?: OutputSymbolFlags;
15
+ /**
16
+ * The refkey or refkeys associated with this symbol.
17
+ */
10
18
  refkeys?: Refkey | Refkey[];
19
+ /**
20
+ * Arbitrary metadata about this symbol.
21
+ */
11
22
  metadata?: Record<string, unknown>;
23
+ /**
24
+ * The symbol this symbol is an alias for.
25
+ */
12
26
  aliasTarget?: OutputSymbol;
27
+ /**
28
+ * Whether this symbol is transient.
29
+ */
30
+ transient?: boolean;
31
+ /**
32
+ * The symbol that provides type information for this symbol. When present,
33
+ * this symbol will not contain its own members, and instead members will be
34
+ * provided by the type. This can be provided a Ref, in which case the type
35
+ * will be the value of that ref.
36
+ */
37
+ type?: OutputSymbol | Ref<OutputSymbol | undefined>;
38
+ /**
39
+ * When provided, this symbol will be named according to the provided name
40
+ * policy.
41
+ *
42
+ * @example
43
+ *
44
+ * ```ts
45
+ * const classNamer = useNamePolicy().for("class");
46
+ * const symbol = new BasicSymbol("my-class", { namePolicy: classNamer });
47
+ * console.log(symbol.name); // "MyClass" (assuming a PascalCase class naming policy)
48
+ * ```
49
+ */
50
+ namePolicy?: NamePolicyGetter;
51
+ /**
52
+ * Whether the name of this symbol should bypass the active name policy. When true,
53
+ * the name of this symbol will be fixed, though it may conflict with other symbols which are
54
+ * also ignoring the name policy.
55
+ */
56
+ ignoreNamePolicy?: boolean;
57
+ /**
58
+ * Whether the name of this symbol should bypass the active name conflict resolution.
59
+ * When true, the name of this symbol will be fixed, though it may conflict with other symbols which are
60
+ * also ignoring name conflict resolution.
61
+ */
62
+ ignoreNameConflict?: boolean;
13
63
  }
14
64
  /**
15
65
  * An output symbol is a named entity that can be referenced in your output
@@ -21,56 +71,174 @@ export interface OutputSymbolOptions {
21
71
  * subtypes that provide additional metadata. Symbols are reactive values, so
22
72
  * you can observe changes to their properties in a reactive context.
23
73
  */
24
- export declare class OutputSymbol {
74
+ export declare abstract class OutputSymbol {
25
75
  #private;
76
+ static readonly memberSpaces: Readonly<string[]>;
77
+ /**
78
+ * Read only. The requested name of this symbol. The symbol's actual name may
79
+ * be different depending on naming policy or conflicts with other symbols.
80
+ *
81
+ * @readonly
82
+ */
26
83
  get originalName(): string;
84
+ /**
85
+ * The name of this symbol.
86
+ *
87
+ * @reactive
88
+ */
27
89
  get name(): string;
28
90
  set name(name: string);
91
+ /**
92
+ * The unique id of this symbol.
93
+ *
94
+ * @readonly
95
+ */
29
96
  get id(): number;
30
- get flags(): OutputSymbolFlags;
31
- set flags(flags: OutputSymbolFlags);
32
- get scope(): OutputScope;
33
- set scope(scope: OutputScope);
97
+ /**
98
+ * Whether the name of this symbol bypasses the active name policy. When true,
99
+ * the name of this symbol will be fixed, though it may conflict with other
100
+ * symbols which are also ignoring the name policy.
101
+ *
102
+ * @readonly
103
+ */
104
+ get ignoreNamePolicy(): boolean;
105
+ /**
106
+ * Whether the name of this symbol bypasses the active name conflict
107
+ * resolution. When true, the name of this symbol will be fixed, though it may
108
+ * conflict with other symbols which are also ignoring name conflict
109
+ * resolution.
110
+ */
111
+ get ignoreNameConflict(): boolean;
112
+ /**
113
+ * The member spaces of this symbol.
114
+ *
115
+ * @readonly
116
+ */
117
+ get memberSpaces(): OutputMemberSpace[];
118
+ /**
119
+ * Get the member space for the given key.
120
+ */
121
+ memberSpaceFor(spaceKey: string): OutputMemberSpace | undefined;
122
+ /**
123
+ * The scope this symbol is in. When this symbol is a member symbol, this will
124
+ * return undefined.
125
+ *
126
+ * @readonly
127
+ */
128
+ get scope(): import("./output-scope.js").OutputScope | undefined;
129
+ /**
130
+ * The declaration or member spaces this symbol belongs to.
131
+ *
132
+ * @reactive
133
+ */
134
+ get spaces(): OutputSpace[];
135
+ set spaces(spaces: OutputSpace[] | OutputSpace | undefined);
136
+ /**
137
+ * The binder that is tracking this symbol.
138
+ *
139
+ * @readonly
140
+ */
34
141
  get binder(): Binder | undefined;
142
+ /**
143
+ * The refkeys for this symbol.
144
+ *
145
+ * @reactive
146
+ */
35
147
  get refkeys(): Refkey[];
36
148
  set refkeys(refkeys: Refkey[]);
37
- get instanceMemberScope(): OutputScope | undefined;
149
+ /**
150
+ * The symbol that this symbol is an alias for.
151
+ *
152
+ * @readonly
153
+ */
38
154
  get aliasTarget(): OutputSymbol | undefined;
39
155
  /**
40
- * Create an output scope to hold member symbols. By default this just creates
41
- * an OutputScope, but can be subclassed to build scope subtypes when needed.
156
+ * If this symbol is an alias for another symbol, return the the aliased symbol. Otherwise, return this symbol.
157
+ */
158
+ dealias(): OutputSymbol;
159
+ /**
160
+ * Whether this symbol is an alias for another symbol.
161
+ *
162
+ * @readonly
163
+ */
164
+ get isAlias(): boolean;
165
+ /**
166
+ * An arbitrary bag of metadata for this symbol. This property is read only,
167
+ * but the metadata is a reactive object.
168
+ *
169
+ * @readonly
42
170
  */
43
- protected createMemberScope(name: string, options: {
44
- owner?: OutputSymbol;
45
- flags?: OutputScopeFlags;
46
- }): OutputScope;
47
- get staticMemberScope(): OutputScope | undefined;
48
171
  get metadata(): Record<string, unknown>;
172
+ copyToSpace(space: OutputSpace): OutputSymbol;
49
173
  /**
50
- * Tell \@vue/reactivity that this symbol should never be wrapped in a reactive
51
- * proxy.
174
+ * Whether this symbol is a member of another symbol.
175
+ *
176
+ * @readonly
52
177
  */
53
- [ReactiveFlags.SKIP]: boolean;
54
- constructor(name: string, options?: OutputSymbolOptions);
55
- delete(): void;
178
+ get isMemberSymbol(): boolean;
179
+ /**
180
+ * When this is a member symbol, this returns the symbol that this is symbol
181
+ * is a member of.
182
+ */
183
+ get ownerSymbol(): OutputSymbol | undefined;
184
+ /**
185
+ * Whether this symbol is a transient symbol. Transient symbols cannot be
186
+ * referenced and are meant to be combined with other symbols.
187
+ *
188
+ * @readonly
189
+ */
190
+ get isTransient(): boolean;
191
+ /**
192
+ * The symbol that this symbol's members have been moved to.
193
+ *
194
+ * @readonly
195
+ * @reactive
196
+ */
197
+ get movedTo(): OutputSymbol | undefined;
198
+ /**
199
+ * Whether this symbol's members have been moved to another symbol.
200
+ *
201
+ * @reactive
202
+ */
203
+ get isMoved(): boolean;
204
+ /**
205
+ * The symbol which defines the type of this symbol. The type symbol provides
206
+ * information about the value this symbol contains, such as what members it
207
+ * has.
208
+ *
209
+ * @reactive
210
+ */
211
+ get type(): OutputSymbol | undefined;
212
+ set type(value: OutputSymbol | Ref<OutputSymbol | undefined> | undefined);
56
213
  /**
57
- * Takes the instance members or static members on this symbol and creates
58
- * corresponding static members on the target symbol. Instance or static
59
- * members of instantiated symbols are copied. The refkey of any instantiated
60
- * symbols are set to a composite refkey of the target symbol's refkey and the
61
- * instantiated symbol's refkey.
214
+ * Whether this symbol has its symbol representing its type available.
215
+ *
216
+ * @readonly
217
+ * @reactive
218
+ */
219
+ get hasTypeSymbol(): boolean;
220
+ /**
221
+ * Whether this symbol's members are provided by a type symbol. The
222
+ * `typeSymbol` property is this symbol. It may not be available yet, so check
223
+ * `hasTypeSymbol`.
62
224
  */
63
- instantiateTo(targetSymbol: OutputSymbol): void;
225
+ get isTyped(): boolean;
226
+ get namePolicy(): NamePolicyGetter | undefined;
227
+ [ReactiveFlags.SKIP]: boolean;
228
+ constructor(name: string | Namekey, spaces: OutputSpace[] | OutputSpace | undefined, options?: OutputSymbolOptions);
229
+ delete(): void;
64
230
  /**
65
- * Copy member symbols from the target symbol into the target symbol. The
66
- * copied symbols have their refkey set to
67
- * `refkey(targetSymbol.refkey, this.refkey)`.
231
+ * Move member symbols from this transient symbol to the target symbol. This is reactive -
232
+ * whenever a member is added to this symbol, it will be moved to the target
233
+ * symbol.
68
234
  */
69
- copyTo(targetSymbol: OutputSymbol): void;
235
+ moveMembersTo(targetSymbol: OutputSymbol): void;
70
236
  /**
71
- * Move member symbols from this transient symbol to the target symbol.
237
+ * Copy the members of this symbol to the target symbol. This is reactive -
238
+ * whenever a member is added to this symbol, it will be copied to the target
239
+ * symbol.
72
240
  */
73
- moveTo(targetSymbol: OutputSymbol): void;
241
+ copyMembersTo(targetSymbol: OutputSymbol): void;
74
242
  /**
75
243
  * Makes a copy of this symbol which will update the name and flags
76
244
  * of the clone when the original symbol is updated.
@@ -84,6 +252,14 @@ export declare class OutputSymbol {
84
252
  *
85
253
  * @param newScope - The scope to use for the copy.
86
254
  */
87
- copyToScope(newScope: OutputScope, baseSymbol?: OutputSymbol): OutputSymbol;
255
+ abstract copy(): OutputSymbol;
256
+ protected getCopyOptions(): {
257
+ binder: Binder | undefined;
258
+ aliasTarget: OutputSymbol | undefined;
259
+ metadata: Record<string, unknown>;
260
+ transient: boolean;
261
+ };
262
+ protected initializeCopy(copy: OutputSymbol): void;
263
+ [inspect.custom](): string;
88
264
  }
89
265
  //# sourceMappingURL=output-symbol.d.ts.map
@@ -1 +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,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,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,I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