@alloy-js/typescript 0.6.0 → 0.8.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 (230) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/dist/src/components/ArrayExpression.d.ts.map +1 -1
  3. package/dist/src/components/ArrayExpression.js +9 -3
  4. package/dist/src/components/ArrayExpression.js.map +1 -1
  5. package/dist/src/components/BlockScope.d.ts +13 -0
  6. package/dist/src/components/BlockScope.d.ts.map +1 -0
  7. package/dist/src/components/BlockScope.js +20 -0
  8. package/dist/src/components/BlockScope.js.map +1 -0
  9. package/dist/src/components/CallSignature.d.ts +38 -0
  10. package/dist/src/components/CallSignature.d.ts.map +1 -0
  11. package/dist/src/components/CallSignature.js +26 -0
  12. package/dist/src/components/CallSignature.js.map +1 -0
  13. package/dist/src/components/ClassDeclaration.d.ts +3 -4
  14. package/dist/src/components/ClassDeclaration.d.ts.map +1 -1
  15. package/dist/src/components/ClassDeclaration.js +99 -41
  16. package/dist/src/components/ClassDeclaration.js.map +1 -1
  17. package/dist/src/components/Declaration.d.ts +21 -4
  18. package/dist/src/components/Declaration.d.ts.map +1 -1
  19. package/dist/src/components/Declaration.js +40 -21
  20. package/dist/src/components/Declaration.js.map +1 -1
  21. package/dist/src/components/EnumDeclaration.d.ts.map +1 -1
  22. package/dist/src/components/EnumDeclaration.js +19 -6
  23. package/dist/src/components/EnumDeclaration.js.map +1 -1
  24. package/dist/src/components/EnumMember.d.ts +8 -0
  25. package/dist/src/components/EnumMember.d.ts.map +1 -1
  26. package/dist/src/components/EnumMember.js +27 -5
  27. package/dist/src/components/EnumMember.js.map +1 -1
  28. package/dist/src/components/ExportStatement.d.ts.map +1 -1
  29. package/dist/src/components/ExportStatement.js +3 -1
  30. package/dist/src/components/ExportStatement.js.map +1 -1
  31. package/dist/src/components/FunctionCallExpression.js +1 -1
  32. package/dist/src/components/FunctionCallExpression.js.map +1 -1
  33. package/dist/src/components/FunctionDeclaration.d.ts +21 -12
  34. package/dist/src/components/FunctionDeclaration.d.ts.map +1 -1
  35. package/dist/src/components/FunctionDeclaration.js +80 -45
  36. package/dist/src/components/FunctionDeclaration.js.map +1 -1
  37. package/dist/src/components/IfStatement.d.ts +25 -0
  38. package/dist/src/components/IfStatement.d.ts.map +1 -0
  39. package/dist/src/components/IfStatement.js +34 -0
  40. package/dist/src/components/IfStatement.js.map +1 -0
  41. package/dist/src/components/Interface.d.ts +10 -2
  42. package/dist/src/components/Interface.d.ts.map +1 -1
  43. package/dist/src/components/Interface.js +66 -6
  44. package/dist/src/components/Interface.js.map +1 -1
  45. package/dist/src/components/JSDoc.d.ts.map +1 -1
  46. package/dist/src/components/JSDoc.js +1 -5
  47. package/dist/src/components/JSDoc.js.map +1 -1
  48. package/dist/src/components/JSDocParam.d.ts +22 -0
  49. package/dist/src/components/JSDocParam.d.ts.map +1 -0
  50. package/dist/src/components/JSDocParam.js +121 -0
  51. package/dist/src/components/JSDocParam.js.map +1 -0
  52. package/dist/src/components/MemberChainExpression.d.ts +2 -2
  53. package/dist/src/components/MemberChainExpression.d.ts.map +1 -1
  54. package/dist/src/components/MemberChainExpression.js +43 -7
  55. package/dist/src/components/MemberChainExpression.js.map +1 -1
  56. package/dist/src/components/ObjectExpression.d.ts.map +1 -1
  57. package/dist/src/components/ObjectExpression.js +9 -2
  58. package/dist/src/components/ObjectExpression.js.map +1 -1
  59. package/dist/src/components/PackageDirectory.d.ts +1 -3
  60. package/dist/src/components/PackageDirectory.d.ts.map +1 -1
  61. package/dist/src/components/PackageDirectory.js +9 -16
  62. package/dist/src/components/PackageDirectory.js.map +1 -1
  63. package/dist/src/components/PackageJson.d.ts +39 -0
  64. package/dist/src/components/PackageJson.d.ts.map +1 -1
  65. package/dist/src/components/PackageJson.js +30 -12
  66. package/dist/src/components/PackageJson.js.map +1 -1
  67. package/dist/src/components/PropertyName.d.ts +19 -0
  68. package/dist/src/components/PropertyName.d.ts.map +1 -0
  69. package/dist/src/components/PropertyName.js +36 -0
  70. package/dist/src/components/PropertyName.js.map +1 -0
  71. package/dist/src/components/SingleLineCommentBlock.d.ts +10 -0
  72. package/dist/src/components/SingleLineCommentBlock.d.ts.map +1 -0
  73. package/dist/src/components/SingleLineCommentBlock.js +20 -0
  74. package/dist/src/components/SingleLineCommentBlock.js.map +1 -0
  75. package/dist/src/components/SourceFile.d.ts +6 -0
  76. package/dist/src/components/SourceFile.d.ts.map +1 -1
  77. package/dist/src/components/SourceFile.js +31 -0
  78. package/dist/src/components/SourceFile.js.map +1 -1
  79. package/dist/src/components/SwitchStatement.d.ts +31 -0
  80. package/dist/src/components/SwitchStatement.d.ts.map +1 -0
  81. package/dist/src/components/SwitchStatement.js +48 -0
  82. package/dist/src/components/SwitchStatement.js.map +1 -0
  83. package/dist/src/components/TypeDeclaration.d.ts.map +1 -1
  84. package/dist/src/components/TypeDeclaration.js +16 -3
  85. package/dist/src/components/TypeDeclaration.js.map +1 -1
  86. package/dist/src/components/VarDeclaration.d.ts +1 -1
  87. package/dist/src/components/VarDeclaration.d.ts.map +1 -1
  88. package/dist/src/components/VarDeclaration.js +20 -6
  89. package/dist/src/components/VarDeclaration.js.map +1 -1
  90. package/dist/src/components/index.d.ts +7 -0
  91. package/dist/src/components/index.d.ts.map +1 -1
  92. package/dist/src/components/index.js +7 -0
  93. package/dist/src/components/index.js.map +1 -1
  94. package/dist/src/components/stc/index.d.ts +35 -112
  95. package/dist/src/components/stc/index.d.ts.map +1 -1
  96. package/dist/src/components/stc/index.js +8 -1
  97. package/dist/src/components/stc/index.js.map +1 -1
  98. package/dist/src/context/index.d.ts +2 -0
  99. package/dist/src/context/index.d.ts.map +1 -0
  100. package/dist/src/context/index.js +1 -0
  101. package/dist/src/context/index.js.map +1 -0
  102. package/dist/src/context/private-scope.d.ts +18 -0
  103. package/dist/src/context/private-scope.d.ts.map +1 -0
  104. package/dist/src/context/private-scope.js +9 -0
  105. package/dist/src/context/private-scope.js.map +1 -0
  106. package/dist/src/index.d.ts +1 -0
  107. package/dist/src/index.d.ts.map +1 -1
  108. package/dist/src/index.js +1 -0
  109. package/dist/src/index.js.map +1 -1
  110. package/dist/src/parameter-descriptor.d.ts +60 -0
  111. package/dist/src/parameter-descriptor.d.ts.map +1 -0
  112. package/dist/src/parameter-descriptor.js +1 -0
  113. package/dist/src/parameter-descriptor.js.map +1 -0
  114. package/dist/src/symbols/reference.d.ts.map +1 -1
  115. package/dist/src/symbols/reference.js +55 -14
  116. package/dist/src/symbols/reference.js.map +1 -1
  117. package/dist/src/symbols/ts-member-scope.d.ts +1 -1
  118. package/dist/src/symbols/ts-member-scope.d.ts.map +1 -1
  119. package/dist/src/symbols/ts-member-scope.js +2 -0
  120. package/dist/src/symbols/ts-member-scope.js.map +1 -1
  121. package/dist/src/symbols/ts-output-symbol.d.ts +7 -3
  122. package/dist/src/symbols/ts-output-symbol.d.ts.map +1 -1
  123. package/dist/src/symbols/ts-output-symbol.js +14 -2
  124. package/dist/src/symbols/ts-output-symbol.js.map +1 -1
  125. package/dist/src/symbols/ts-package-scope.d.ts +0 -15
  126. package/dist/src/symbols/ts-package-scope.d.ts.map +1 -1
  127. package/dist/src/symbols/ts-package-scope.js +0 -8
  128. package/dist/src/symbols/ts-package-scope.js.map +1 -1
  129. package/dist/src/utils.d.ts +7 -0
  130. package/dist/src/utils.d.ts.map +1 -1
  131. package/dist/src/utils.js +17 -0
  132. package/dist/src/utils.js.map +1 -1
  133. package/dist/test/block-scope.test.d.ts +2 -0
  134. package/dist/test/block-scope.test.d.ts.map +1 -0
  135. package/dist/test/enum-jsdoc.test.d.ts +2 -0
  136. package/dist/test/enum-jsdoc.test.d.ts.map +1 -0
  137. package/dist/test/function-declaration-jsdoc.test.d.ts +2 -0
  138. package/dist/test/function-declaration-jsdoc.test.d.ts.map +1 -0
  139. package/dist/test/if-statement.test.d.ts +2 -0
  140. package/dist/test/if-statement.test.d.ts.map +1 -0
  141. package/dist/test/interface-jsdoc.test.d.ts +2 -0
  142. package/dist/test/interface-jsdoc.test.d.ts.map +1 -0
  143. package/dist/test/jscomment.test.d.ts +2 -0
  144. package/dist/test/jscomment.test.d.ts.map +1 -0
  145. package/dist/test/jsdoc.test.d.ts.map +1 -1
  146. package/dist/test/jsdocparam.test.d.ts +2 -0
  147. package/dist/test/jsdocparam.test.d.ts.map +1 -0
  148. package/dist/test/name-conflict.test.d.ts +2 -0
  149. package/dist/test/name-conflict.test.d.ts.map +1 -0
  150. package/dist/test/package-json.test.d.ts +2 -0
  151. package/dist/test/package-json.test.d.ts.map +1 -0
  152. package/dist/test/source-file.test.d.ts +2 -0
  153. package/dist/test/source-file.test.d.ts.map +1 -0
  154. package/dist/test/switch-statement.test.d.ts +2 -0
  155. package/dist/test/switch-statement.test.d.ts.map +1 -0
  156. package/dist/test/var-declaration-jsdoc.test.d.ts +2 -0
  157. package/dist/test/var-declaration-jsdoc.test.d.ts.map +1 -0
  158. package/dist/tsconfig.tsbuildinfo +1 -1
  159. package/package.json +3 -3
  160. package/src/components/ArrayExpression.tsx +13 -8
  161. package/src/components/BlockScope.tsx +31 -0
  162. package/src/components/CallSignature.tsx +67 -0
  163. package/src/components/ClassDeclaration.tsx +103 -50
  164. package/src/components/Declaration.tsx +72 -22
  165. package/src/components/EnumDeclaration.tsx +27 -19
  166. package/src/components/EnumMember.tsx +24 -4
  167. package/src/components/ExportStatement.tsx +3 -1
  168. package/src/components/FunctionCallExpression.tsx +1 -1
  169. package/src/components/FunctionDeclaration.tsx +107 -81
  170. package/src/components/IfStatement.tsx +51 -0
  171. package/src/components/Interface.tsx +61 -14
  172. package/src/components/JSDoc.tsx +1 -10
  173. package/src/components/JSDocParam.tsx +115 -0
  174. package/src/components/MemberChainExpression.tsx +37 -5
  175. package/src/components/ObjectExpression.tsx +7 -2
  176. package/src/components/PackageDirectory.tsx +12 -22
  177. package/src/components/PackageJson.tsx +86 -27
  178. package/src/components/PropertyName.tsx +50 -0
  179. package/src/components/SingleLineCommentBlock.tsx +21 -0
  180. package/src/components/SourceFile.tsx +29 -0
  181. package/src/components/SwitchStatement.tsx +78 -0
  182. package/src/components/TypeDeclaration.tsx +11 -4
  183. package/src/components/VarDeclaration.tsx +20 -12
  184. package/src/components/index.ts +7 -0
  185. package/src/components/stc/index.ts +8 -1
  186. package/src/context/index.ts +1 -0
  187. package/src/context/private-scope.ts +23 -0
  188. package/src/index.ts +1 -0
  189. package/src/parameter-descriptor.ts +71 -0
  190. package/src/symbols/reference.ts +77 -22
  191. package/src/symbols/ts-member-scope.ts +6 -2
  192. package/src/symbols/ts-output-symbol.ts +27 -10
  193. package/src/symbols/ts-package-scope.ts +0 -28
  194. package/src/utils.ts +33 -0
  195. package/temp/api.json +5372 -3410
  196. package/test/array.test.tsx +72 -0
  197. package/test/basic.test.tsx +2 -2
  198. package/test/block-scope.test.tsx +29 -0
  199. package/test/class.test.tsx +173 -5
  200. package/test/enum-jsdoc.test.tsx +74 -0
  201. package/test/enum.test.tsx +50 -3
  202. package/test/function-call-expression.test.tsx +5 -2
  203. package/test/function-declaration-jsdoc.test.tsx +89 -0
  204. package/test/function-declaration.test.tsx +13 -9
  205. package/test/if-statement.test.tsx +28 -0
  206. package/test/imports.test.tsx +25 -10
  207. package/test/interface-jsdoc.test.tsx +164 -0
  208. package/test/interface.test.tsx +17 -3
  209. package/test/jscomment.test.tsx +104 -0
  210. package/test/jsdoc.test.tsx +9 -15
  211. package/test/jsdocparam.test.tsx +188 -0
  212. package/test/member-chain.test.tsx +77 -0
  213. package/test/name-conflict.test.tsx +105 -0
  214. package/test/name-policy.test.tsx +1 -1
  215. package/test/package-external.test.tsx +98 -3
  216. package/test/package-json.test.tsx +93 -0
  217. package/test/package.test.tsx +56 -3
  218. package/test/reference.test.tsx +6 -2
  219. package/test/source-file.test.tsx +38 -0
  220. package/test/switch-statement.test.tsx +50 -0
  221. package/test/value-expression.test.tsx +9 -0
  222. package/test/var-declaration-jsdoc.test.tsx +70 -0
  223. package/test/var-declaration.test.tsx +1 -1
  224. package/tsconfig.json +1 -8
  225. package/vitest.config.ts +2 -10
  226. package/dist/src/components/JSDocParagraph.d.ts +0 -10
  227. package/dist/src/components/JSDocParagraph.d.ts.map +0 -1
  228. package/dist/src/components/JSDocParagraph.js +0 -23
  229. package/dist/src/components/JSDocParagraph.js.map +0 -1
  230. package/src/components/JSDocParagraph.tsx +0 -35
@@ -1,114 +1,37 @@
1
1
  import * as base from "../index.js";
2
- export declare const ArrayExpression: (props?: (Omit<base.ArrayExpressionProps, "children"> & Partial<Pick<base.ArrayExpressionProps, "children">>) | undefined) => import("@alloy-js/core").ComponentCreator<base.ArrayExpressionProps> & {
3
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ArrayExpressionProps>;
4
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ArrayExpressionProps>;
5
- };
6
- export declare const BarrelFile: (props?: base.BarrelFileProps | undefined) => import("@alloy-js/core").ComponentCreator<base.BarrelFileProps> & {
7
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.BarrelFileProps>;
8
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.BarrelFileProps>;
9
- };
10
- export declare const ClassDeclaration: (props: Omit<base.ClassDeclarationProps, "children"> & Partial<Pick<base.ClassDeclarationProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.ClassDeclarationProps> & {
11
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassDeclarationProps>;
12
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassDeclarationProps>;
13
- };
14
- export declare const ClassField: (props: Omit<base.ClassFieldProps, "children"> & Partial<Pick<base.ClassFieldProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.ClassFieldProps> & {
15
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassFieldProps>;
16
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassFieldProps>;
17
- };
18
- export declare const ClassMember: (props: Omit<base.ClassMemberProps, "children"> & Partial<Pick<base.ClassMemberProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.ClassMemberProps> & {
19
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassMemberProps>;
20
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassMemberProps>;
21
- };
22
- export declare const ClassMethod: (props: Omit<base.ClassMethodProps, "children"> & Partial<Pick<base.ClassMethodProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.ClassMethodProps> & {
23
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassMethodProps>;
24
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ClassMethodProps>;
25
- };
26
- export declare const Declaration: (props: Omit<base.DeclarationProps, "children"> & Partial<Pick<base.DeclarationProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.DeclarationProps> & {
27
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.DeclarationProps>;
28
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.DeclarationProps>;
29
- };
30
- export declare const EnumDeclaration: (props: Omit<base.EnumDeclarationProps, "children"> & Partial<Pick<base.EnumDeclarationProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.EnumDeclarationProps> & {
31
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.EnumDeclarationProps>;
32
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.EnumDeclarationProps>;
33
- };
34
- export declare const EnumMember: (props: base.EnumMemberProps) => import("@alloy-js/core").ComponentCreator<base.EnumMemberProps> & {
35
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.EnumMemberProps>;
36
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.EnumMemberProps>;
37
- };
38
- export declare const ExportStatement: (props?: base.ExportStatementProps | undefined) => import("@alloy-js/core").ComponentCreator<base.ExportStatementProps> & {
39
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ExportStatementProps>;
40
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ExportStatementProps>;
41
- };
42
- export declare const FunctionCallExpression: (props: base.FunctionCallExpressionProps) => import("@alloy-js/core").ComponentCreator<base.FunctionCallExpressionProps> & {
43
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.FunctionCallExpressionProps>;
44
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.FunctionCallExpressionProps>;
45
- };
46
- export declare const FunctionDeclaration: (props: Omit<base.FunctionDeclarationProps, "children"> & Partial<Pick<base.FunctionDeclarationProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.FunctionDeclarationProps> & {
47
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.FunctionDeclarationProps>;
48
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.FunctionDeclarationProps>;
49
- };
50
- export declare const ImportStatement: (props: base.ImportStatementProps) => import("@alloy-js/core").ComponentCreator<base.ImportStatementProps> & {
51
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ImportStatementProps>;
52
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ImportStatementProps>;
53
- };
54
- export declare const ImportStatements: (props: base.ImportStatementsProps) => import("@alloy-js/core").ComponentCreator<base.ImportStatementsProps> & {
55
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ImportStatementsProps>;
56
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ImportStatementsProps>;
57
- };
58
- export declare const InterfaceDeclaration: (props: Omit<base.InterfaceDeclarationProps, "children"> & Partial<Pick<base.InterfaceDeclarationProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.InterfaceDeclarationProps> & {
59
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.InterfaceDeclarationProps>;
60
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.InterfaceDeclarationProps>;
61
- };
62
- export declare const InterfaceExpression: (props?: (Omit<base.InterfaceExpressionProps, "children"> & Partial<Pick<base.InterfaceExpressionProps, "children">>) | undefined) => import("@alloy-js/core").ComponentCreator<base.InterfaceExpressionProps> & {
63
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.InterfaceExpressionProps>;
64
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.InterfaceExpressionProps>;
65
- };
66
- export declare const InterfaceMember: (props?: (Omit<base.InterfaceMemberProps, "children"> & Partial<Pick<base.InterfaceMemberProps, "children">>) | undefined) => import("@alloy-js/core").ComponentCreator<base.InterfaceMemberProps> & {
67
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.InterfaceMemberProps>;
68
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.InterfaceMemberProps>;
69
- };
70
- export declare const MemberchainExpression: (props?: (Omit<base.MemberChainExpressionProps, "children"> & Partial<Pick<base.MemberChainExpressionProps, "children">>) | undefined) => import("@alloy-js/core").ComponentCreator<base.MemberChainExpressionProps> & {
71
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.MemberChainExpressionProps>;
72
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.MemberChainExpressionProps>;
73
- };
74
- export declare const ObjectExpression: (props?: (Omit<base.ObjectExpressionProps, "children"> & Partial<Pick<base.ObjectExpressionProps, "children">>) | undefined) => import("@alloy-js/core").ComponentCreator<base.ObjectExpressionProps> & {
75
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ObjectExpressionProps>;
76
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ObjectExpressionProps>;
77
- };
78
- export declare const ObjectProperty: (props?: (Omit<base.ObjectPropertyProps, "children"> & Partial<Pick<base.ObjectPropertyProps, "children">>) | undefined) => import("@alloy-js/core").ComponentCreator<base.ObjectPropertyProps> & {
79
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ObjectPropertyProps>;
80
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ObjectPropertyProps>;
81
- };
82
- export declare const PackageDirectory: (props: Omit<base.PackageDirectoryProps, "children"> & Partial<Pick<base.PackageDirectoryProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.PackageDirectoryProps> & {
83
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.PackageDirectoryProps>;
84
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.PackageDirectoryProps>;
85
- };
86
- export declare const PackageJsonFile: (props: base.PackageJsonFileProps) => import("@alloy-js/core").ComponentCreator<base.PackageJsonFileProps> & {
87
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.PackageJsonFileProps>;
88
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.PackageJsonFileProps>;
89
- };
90
- export declare const Reference: (props: base.ReferenceProps) => import("@alloy-js/core").ComponentCreator<base.ReferenceProps> & {
91
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ReferenceProps>;
92
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ReferenceProps>;
93
- };
94
- export declare const SourceFile: (props: Omit<base.SourceFileProps, "children"> & Partial<Pick<base.SourceFileProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.SourceFileProps> & {
95
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.SourceFileProps>;
96
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.SourceFileProps>;
97
- };
98
- export declare const TSConfigJson: (props?: base.TSConfigJsonProps | undefined) => import("@alloy-js/core").ComponentCreator<base.TSConfigJsonProps> & {
99
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.TSConfigJsonProps>;
100
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.TSConfigJsonProps>;
101
- };
102
- export declare const TypeDeclaration: (props: Omit<base.TypeDeclarationProps, "children"> & Partial<Pick<base.TypeDeclarationProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.TypeDeclarationProps> & {
103
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.TypeDeclarationProps>;
104
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.TypeDeclarationProps>;
105
- };
106
- export declare const ValueExpression: (props?: base.ValueExpressionProps | undefined) => import("@alloy-js/core").ComponentCreator<base.ValueExpressionProps> & {
107
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ValueExpressionProps>;
108
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.ValueExpressionProps>;
109
- };
110
- export declare const VarDeclaration: (props: Omit<base.VarDeclarationProps, "children"> & Partial<Pick<base.VarDeclarationProps, "children">>) => import("@alloy-js/core").ComponentCreator<base.VarDeclarationProps> & {
111
- code(template: TemplateStringsArray, ...substitutions: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.VarDeclarationProps>;
112
- children(...children: import("@alloy-js/core").Children[]): import("@alloy-js/core").ComponentCreator<base.VarDeclarationProps>;
113
- };
2
+ export declare const ArrayExpression: import("@alloy-js/core").StcSignature<base.ArrayExpressionProps>;
3
+ export declare const BarrelFile: import("@alloy-js/core").StcSignature<base.BarrelFileProps>;
4
+ export declare const CallSignature: import("@alloy-js/core").StcSignature<base.CallSignatureProps>;
5
+ export declare const ClassDeclaration: import("@alloy-js/core").StcSignature<base.ClassDeclarationProps>;
6
+ export declare const ClassField: import("@alloy-js/core").StcSignature<base.ClassFieldProps>;
7
+ export declare const ClassMember: import("@alloy-js/core").StcSignature<base.ClassMemberProps>;
8
+ export declare const ClassMethod: import("@alloy-js/core").StcSignature<base.ClassMethodProps>;
9
+ export declare const CommaList: import("@alloy-js/core").StcSignature<base.CommaListProps>;
10
+ export declare const Declaration: import("@alloy-js/core").StcSignature<base.DeclarationProps>;
11
+ export declare const EnumDeclaration: import("@alloy-js/core").StcSignature<base.EnumDeclarationProps>;
12
+ export declare const EnumMember: import("@alloy-js/core").StcSignature<base.EnumMemberProps>;
13
+ export declare const ExportStatement: import("@alloy-js/core").StcSignature<base.ExportStatementProps>;
14
+ export declare const FunctionCallExpression: import("@alloy-js/core").StcSignature<base.FunctionCallExpressionProps>;
15
+ export declare const FunctionDeclaration: import("@alloy-js/core").StcSignature<base.FunctionDeclarationProps>;
16
+ export declare const ImportStatement: import("@alloy-js/core").StcSignature<base.ImportStatementProps>;
17
+ export declare const ImportStatements: import("@alloy-js/core").StcSignature<base.ImportStatementsProps>;
18
+ export declare const InterfaceDeclaration: import("@alloy-js/core").StcSignature<base.InterfaceDeclarationProps>;
19
+ export declare const InterfaceExpression: import("@alloy-js/core").StcSignature<base.InterfaceExpressionProps>;
20
+ export declare const InterfaceMember: import("@alloy-js/core").StcSignature<base.InterfaceMemberProps>;
21
+ export declare const JSDoc: import("@alloy-js/core").StcSignature<base.JSDocProps>;
22
+ export declare const JSDocExample: import("@alloy-js/core").StcSignature<base.JSDocExampleProps>;
23
+ export declare const JSDocComment: import("@alloy-js/core").StcSignature<base.JSDocCommentProps>;
24
+ export declare const MemberChainExpression: import("@alloy-js/core").StcSignature<base.MemberChainExpressionProps>;
25
+ export declare const ObjectExpression: import("@alloy-js/core").StcSignature<base.ObjectExpressionProps>;
26
+ export declare const ObjectProperty: import("@alloy-js/core").StcSignature<base.ObjectPropertyProps>;
27
+ export declare const PackageDirectory: import("@alloy-js/core").StcSignature<base.PackageDirectoryProps>;
28
+ export declare const PackageJsonFile: import("@alloy-js/core").StcSignature<base.PackageJsonFileProps>;
29
+ export declare const Reference: import("@alloy-js/core").StcSignature<base.ReferenceProps>;
30
+ export declare const SourceFile: import("@alloy-js/core").StcSignature<base.SourceFileProps>;
31
+ export declare const SwitchStatement: import("@alloy-js/core").StcSignature<base.SwitchStatementProps>;
32
+ export declare const CaseClause: import("@alloy-js/core").StcSignature<base.CaseClauseProps>;
33
+ export declare const TSConfigJson: import("@alloy-js/core").StcSignature<base.TSConfigJsonProps>;
34
+ export declare const TypeDeclaration: import("@alloy-js/core").StcSignature<base.TypeDeclarationProps>;
35
+ export declare const ValueExpression: import("@alloy-js/core").StcSignature<base.ValueExpressionProps>;
36
+ export declare const VarDeclaration: import("@alloy-js/core").StcSignature<base.VarDeclarationProps>;
114
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":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sB,CAAC;AAC7C,eAAO,MAAM,UAAU,6DAAuB,CAAC;AAC/C,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,UAAU,6DAAuB,CAAC;AAC/C,eAAO,MAAM,YAAY,+DAAyB,CAAC;AACnD,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,iEAA2B,CAAC"}
@@ -2,10 +2,12 @@ import { stc } from "@alloy-js/core";
2
2
  import * as base from "../index.js";
3
3
  export const ArrayExpression = stc(base.ArrayExpression);
4
4
  export const BarrelFile = stc(base.BarrelFile);
5
+ export const CallSignature = stc(base.CallSignature);
5
6
  export const ClassDeclaration = stc(base.ClassDeclaration);
6
7
  export const ClassField = stc(base.ClassField);
7
8
  export const ClassMember = stc(base.ClassMember);
8
9
  export const ClassMethod = stc(base.ClassMethod);
10
+ export const CommaList = stc(base.CommaList);
9
11
  export const Declaration = stc(base.Declaration);
10
12
  export const EnumDeclaration = stc(base.EnumDeclaration);
11
13
  export const EnumMember = stc(base.EnumMember);
@@ -17,13 +19,18 @@ export const ImportStatements = stc(base.ImportStatements);
17
19
  export const InterfaceDeclaration = stc(base.InterfaceDeclaration);
18
20
  export const InterfaceExpression = stc(base.InterfaceExpression);
19
21
  export const InterfaceMember = stc(base.InterfaceMember);
20
- export const MemberchainExpression = stc(base.MemberChainExpression);
22
+ export const JSDoc = stc(base.JSDoc);
23
+ export const JSDocExample = stc(base.JSDocExample);
24
+ export const JSDocComment = stc(base.JSDocComment);
25
+ export const MemberChainExpression = stc(base.MemberChainExpression);
21
26
  export const ObjectExpression = stc(base.ObjectExpression);
22
27
  export const ObjectProperty = stc(base.ObjectProperty);
23
28
  export const PackageDirectory = stc(base.PackageDirectory);
24
29
  export const PackageJsonFile = stc(base.PackageJsonFile);
25
30
  export const Reference = stc(base.Reference);
26
31
  export const SourceFile = stc(base.SourceFile);
32
+ export const SwitchStatement = stc(base.SwitchStatement);
33
+ export const CaseClause = stc(base.CaseClause);
27
34
  export const TSConfigJson = stc(base.TSConfigJson);
28
35
  export const TypeDeclaration = stc(base.TypeDeclaration);
29
36
  export const ValueExpression = stc(base.ValueExpression);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["stc","base","ArrayExpression","BarrelFile","ClassDeclaration","ClassField","ClassMember","ClassMethod","Declaration","EnumDeclaration","EnumMember","ExportStatement","FunctionCallExpression","FunctionDeclaration","ImportStatement","ImportStatements","InterfaceDeclaration","InterfaceExpression","InterfaceMember","MemberchainExpression","MemberChainExpression","ObjectExpression","ObjectProperty","PackageDirectory","PackageJsonFile","Reference","SourceFile","TSConfigJson","TypeDeclaration","ValueExpression","VarDeclaration"],"sources":["../../../../src/components/stc/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,OAAO,KAAKC,IAAI,MAAM,aAAa;AAEnC,OAAO,MAAMC,eAAe,GAAGF,GAAG,CAACC,IAAI,CAACC,eAAe,CAAC;AACxD,OAAO,MAAMC,UAAU,GAAGH,GAAG,CAACC,IAAI,CAACE,UAAU,CAAC;AAC9C,OAAO,MAAMC,gBAAgB,GAAGJ,GAAG,CAACC,IAAI,CAACG,gBAAgB,CAAC;AAC1D,OAAO,MAAMC,UAAU,GAAGL,GAAG,CAACC,IAAI,CAACI,UAAU,CAAC;AAC9C,OAAO,MAAMC,WAAW,GAAGN,GAAG,CAACC,IAAI,CAACK,WAAW,CAAC;AAChD,OAAO,MAAMC,WAAW,GAAGP,GAAG,CAACC,IAAI,CAACM,WAAW,CAAC;AAChD,OAAO,MAAMC,WAAW,GAAGR,GAAG,CAACC,IAAI,CAACO,WAAW,CAAC;AAChD,OAAO,MAAMC,eAAe,GAAGT,GAAG,CAACC,IAAI,CAACQ,eAAe,CAAC;AACxD,OAAO,MAAMC,UAAU,GAAGV,GAAG,CAACC,IAAI,CAACS,UAAU,CAAC;AAC9C,OAAO,MAAMC,eAA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AAMC,eAAe,GAAG7B,GAAG,CAACC,IAAI,CAAC4B,eAAe,CAAC;AACxD,OAAO,MAAMC,cAAc,GAAG9B,GAAG,CAACC,IAAI,CAAC6B,cAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["stc","base","ArrayExpression","BarrelFile","CallSignature","ClassDeclaration","ClassField","ClassMember","ClassMethod","CommaList","Declaration","EnumDeclaration","EnumMember","ExportStatement","FunctionCallExpression","FunctionDeclaration","ImportStatement","ImportStatements","InterfaceDeclaration","InterfaceExpression","InterfaceMember","JSDoc","JSDocExample","JSDocComment","MemberChainExpression","ObjectExpression","ObjectProperty","PackageDirectory","PackageJsonFile","Reference","SourceFile","SwitchStatement","CaseClause","TSConfigJson","TypeDeclaration","ValueExpression","VarDeclaration"],"sources":["../../../../src/components/stc/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,OAAO,KAAKC,IAAI,MAAM,aAAa;AAEnC,OAAO,MAAMC,eAAe,GAAGF,GAAG,CAACC,IAAI,CAACC,eAAe,CAAC;AACxD,OAAO,MAAMC,UAAU,GAAGH,GAAG,CAACC,IAAI,CAACE,UAAU,CAAC;AAC9C,OAAO,MAAMC,aAAa,GAAGJ,GAAG,CAACC,IAAI,CAACG,aAAa,CAAC;AACpD,OAAO,MAAMC,gBAAgB,GAAGL,GAAG,CAACC,IAAI,CAACI,gBAAgB,CAAC;AAC1D,OAAO,MAAMC,UAAU,GAAGN,GAAG,CAACC,IAAI,CAACK,UAAU,CAAC;AAC9C,OAAO,MAAMC,WAAW,GAAGP,GAAG,CAACC,IAAI,CAACM,WAAW,CAAC;AAChD,OAAO,MAAMC,WAAW,GAAGR,GAAG,CAACC,IAAI,CAACO,WAAW,CAAC;AAChD,OAAO,MAAMC,SAAS,GAAGT,GAAG,CAACC,IAAI,CAACQ,SAAS,CAAC;AAC5C,OAAO,MAAMC,WAAW,GAAGV,GAAG,CAACC,IAAI,CAACS,WAAW,C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AgB,CAAC;AAC1D,OAAO,MAAMC,eAAe,GAAG5B,GAAG,CAACC,IAAI,CAAC2B,eAAe,CAAC;AACxD,OAAO,MAAMC,SAAS,GAAG7B,GAAG,CAACC,IAAI,CAAC4B,SAAS,CAAC;AAC5C,OAAO,MAAMC,UAAU,GAAG9B,GAAG,CAACC,IAAI,CAAC6B,UAAU,CAAC;AAC9C,OAAO,MAAMC,eAAe,GAAG/B,GAAG,CAACC,IAAI,CAAC8B,eAAe,CAAC;AACxD,OAAO,MAAMC,UAAU,GAAGhC,GAAG,CAACC,IAAI,CAAC+B,UAAU,CAAC;AAC9C,OAAO,MAAMC,YAAY,GAAGjC,GAAG,CAACC,IAAI,CAACgC,YAAY,CAAC;AAClD,OAAO,MAAMC,eAAe,GAAGlC,GAAG,CAACC,IAAI,CAACiC,eAAe,CAAC;AACxD,OAAO,MAAMC,eAAe,GAAGnC,GAAG,CAACC,IAAI,CAACkC,eAAe,CAAC;AACxD,OAAO,MAAMC,cAAc,GAAGpC,GAAG,CAACC,IAAI,CAACmC,cAAc,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./private-scope.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./private-scope.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/context/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,oBAAoB","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ import { ComponentContext } from "@alloy-js/core";
2
+ import { TSMemberScope } from "../symbols/ts-member-scope.js";
3
+ export interface PrivateScopeContext {
4
+ /**
5
+ * Scope for private static members.
6
+ */
7
+ staticMembers: TSMemberScope;
8
+ /**
9
+ * Scope for private instance members.
10
+ */
11
+ instanceMembers: TSMemberScope;
12
+ }
13
+ /**
14
+ * Provides scopes for instance and static private members.
15
+ */
16
+ export declare const PrivateScopeContext: ComponentContext<PrivateScopeContext>;
17
+ export declare function usePrivateScope(): PrivateScopeContext | undefined;
18
+ //# sourceMappingURL=private-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-scope.d.ts","sourceRoot":"","sources":["../../../src/context/private-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA6B,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,aAAa,EAAE,aAAa,CAAC;IAC7B;;OAEG;IACH,eAAe,EAAE,aAAa,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,gBAAgB,CAAC,mBAAmB,CAChC,CAAC;AAEvC,wBAAgB,eAAe,oCAE9B"}
@@ -0,0 +1,9 @@
1
+ import { createContext, useContext } from "@alloy-js/core";
2
+ /**
3
+ * Provides scopes for instance and static private members.
4
+ */
5
+ export const PrivateScopeContext = createContext();
6
+ export function usePrivateScope() {
7
+ return useContext(PrivateScopeContext);
8
+ }
9
+ //# sourceMappingURL=private-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private-scope.js","names":["createContext","useContext","PrivateScopeContext","usePrivateScope"],"sources":["../../../src/context/private-scope.ts"],"sourcesContent":[null],"mappings":"AAAA,SAA2BA,aAAa,EAAEC,UAAU,QAAQ,gBAAgB;AAc5E;AACA;AACA;AACA,OAAO,MAAMC,mBAA0D,GACrEF,aAAa,CAAsB,CAAC;AAEtC,OAAO,SAASG,eAAeA,CAAA,EAAG;EAChC,OAAOF,UAAU,CAACC,mBAAmB,CAAC;AACxC","ignoreList":[]}
@@ -1,5 +1,6 @@
1
1
  export * from "./builtins/index.js";
2
2
  export * from "./components/index.js";
3
+ export * from "./context/index.js";
3
4
  export * from "./create-package.js";
4
5
  export * from "./name-conflict-resolver.js";
5
6
  export * from "./name-policy.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
package/dist/src/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./builtins/index.js";
2
2
  export * from "./components/index.js";
3
+ export * from "./context/index.js";
3
4
  export * from "./create-package.js";
4
5
  export * from "./name-conflict-resolver.js";
5
6
  export * from "./name-policy.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,qBAAqB;AACnC,cAAc,6BAA6B;AAC3C,cAAc,kBAAkB;AAChC,cAAc,oBAAoB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,qBAAqB;AACnC,cAAc,uBAAuB;AACrC,cAAc,oBAAoB;AAClC,cAAc,qBAAqB;AACnC,cAAc,6BAA6B;AAC3C,cAAc,kBAAkB;AAChC,cAAc,oBAAoB","ignoreList":[]}
@@ -0,0 +1,60 @@
1
+ import { Children, Refkey } from "@alloy-js/core";
2
+ /**
3
+ * Information for a TypeScript function parameter.
4
+ */
5
+ export interface ParameterDescriptor {
6
+ /**
7
+ * The name of the parameter.
8
+ */
9
+ name: string;
10
+ /**
11
+ * The type of the parameter.
12
+ */
13
+ type?: Children;
14
+ /**
15
+ * The default value of the parameter.
16
+ */
17
+ default?: Children;
18
+ /**
19
+ * The refkey for this parameter.
20
+ */
21
+ refkey?: Refkey | Refkey[];
22
+ /**
23
+ * Whether the parameter is optional.
24
+ */
25
+ optional?: boolean;
26
+ /**
27
+ * Arbitrary metadata for the parameter symbol.
28
+ */
29
+ metadata?: Record<string, unknown>;
30
+ /**
31
+ * Documentation for the parameter.
32
+ */
33
+ doc?: Children;
34
+ }
35
+ /**
36
+ * Information for a TypeScript generic type parameter.
37
+ */
38
+ export interface TypeParameterDescriptor {
39
+ /**
40
+ * The name of the type parameter.
41
+ */
42
+ name: string;
43
+ /**
44
+ * The extends constraint for the type parameter.
45
+ */
46
+ extends?: Children;
47
+ /**
48
+ * The default type of the type parameter.
49
+ */
50
+ default?: Children;
51
+ /**
52
+ * A refkey or array of refkeys for this type parameter.
53
+ */
54
+ refkey?: Refkey | Refkey[];
55
+ /**
56
+ * Arbitrary metadata for the type parameter symbol.
57
+ */
58
+ metadata?: Record<string, unknown>;
59
+ }
60
+ //# sourceMappingURL=parameter-descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameter-descriptor.d.ts","sourceRoot":"","sources":["../../src/parameter-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC;;OAEG;IACH,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameter-descriptor.js","names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/symbols/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAIP,MAAM,gBAAgB,CAAC;AASxB,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,MAAM,CAiFhD"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/symbols/reference.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,MAAM,EAKP,MAAM,gBAAgB,CAAC;AAcxB,wBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,MAAM,CAkGhD"}
@@ -1,9 +1,14 @@
1
- import { memo, OutputSymbolFlags, resolve, untrack, useContext } from "@alloy-js/core";
1
+ import { memo, OutputSymbolFlags, resolve, untrack, useContext, useMemberScope } from "@alloy-js/core";
2
2
  import { usePackage } from "../components/PackageDirectory.js";
3
3
  import { SourceFileContext } from "../components/SourceFile.js";
4
+ import { usePrivateScope } from "../context/private-scope.js";
5
+ import { isValidJSIdentifier } from "../utils.js";
6
+ import { TSSymbolFlags } from "./ts-output-symbol.js";
4
7
  export function ref(refkey) {
5
8
  const sourceFile = useContext(SourceFileContext);
6
9
  const resolveResult = resolve(refkey);
10
+ const currentScope = useMemberScope();
11
+ const currentPrivateScope = usePrivateScope();
7
12
  return memo(() => {
8
13
  if (resolveResult.value === undefined) {
9
14
  return "<Unresolved Symbol>";
@@ -13,7 +18,21 @@ export function ref(refkey) {
13
18
  pathDown,
14
19
  memberPath
15
20
  } = resolveResult.value;
16
- validateSymbolReachable(pathDown);
21
+
22
+ // if we resolved a instance member, check if we should be able to access
23
+ // it.
24
+ if (targetDeclaration.flags & OutputSymbolFlags.InstanceMember) {
25
+ if (targetDeclaration.tsFlags & TSSymbolFlags.PrivateMember) {
26
+ if (currentPrivateScope?.instanceMembers !== targetDeclaration.scope) {
27
+ throw new Error("Cannot resolve private member symbols from a different scope");
28
+ }
29
+ } else {
30
+ if (currentScope?.instanceMembers !== targetDeclaration.scope) {
31
+ throw new Error("Cannot resolve member symbols from a different member scope");
32
+ }
33
+ }
34
+ }
35
+ validateSymbolReachable(pathDown, memberPath, currentPrivateScope);
17
36
 
18
37
  // Where the target declaration is relative to the referencing scope.
19
38
  // * package: target symbol is in a different package
@@ -33,8 +52,11 @@ export function ref(refkey) {
33
52
 
34
53
  // find public dependency
35
54
  for (const module of sourcePackage.exportedSymbols.values()) {
36
- if (module.exportedSymbols.has(importSymbol.refkey)) {
37
- localSymbol = untrack(() => sourceFile.scope.addImport(importSymbol, module));
55
+ for (const refkey of importSymbol.refkeys) {
56
+ if (module.exportedSymbols.has(refkey)) {
57
+ localSymbol = untrack(() => sourceFile.scope.addImport(importSymbol, module));
58
+ break;
59
+ }
38
60
  }
39
61
  }
40
62
  if (!localSymbol) {
@@ -49,27 +71,46 @@ export function ref(refkey) {
49
71
  if (localSymbol) {
50
72
  memberPath[0] = localSymbol;
51
73
  }
52
- return addThisPrefix(targetDeclaration, buildMemberExpression(memberPath));
74
+ return buildMemberExpression(memberPath);
53
75
  } else {
54
- return addThisPrefix(localSymbol ?? targetDeclaration, localSymbol ? localSymbol.name : targetDeclaration.name);
76
+ return buildMemberExpression([localSymbol ?? targetDeclaration]);
55
77
  }
56
78
  });
57
79
  }
58
- function addThisPrefix(rootSymbol, name) {
59
- if (rootSymbol.flags & OutputSymbolFlags.InstanceMember) {
60
- return `this.${name}`;
80
+ function buildMemberExpression(path) {
81
+ let memberExpr = "";
82
+ const base = path[0];
83
+ if (base.flags & OutputSymbolFlags.InstanceMember) {
84
+ memberExpr += "this";
61
85
  } else {
62
- return name;
86
+ memberExpr += base.name;
87
+ path = path.slice(1);
63
88
  }
89
+ for (const sym of path) {
90
+ if (sym.tsFlags & TSSymbolFlags.PrivateMember) {
91
+ memberExpr += `.#${sym.name}`;
92
+ } else if (isValidJSIdentifier(sym.name)) {
93
+ memberExpr += `.${sym.name}`;
94
+ } else {
95
+ memberExpr += `[${JSON.stringify(sym.name)}]`;
96
+ }
97
+ }
98
+ return memberExpr;
64
99
  }
65
- function buildMemberExpression(symbolPath) {
66
- return symbolPath.map(sym => sym.name).join(".");
67
- }
68
- function validateSymbolReachable(path) {
100
+ function validateSymbolReachable(path, memberPath, currentPrivateScope) {
69
101
  for (const scope of path) {
70
102
  if (scope.kind === "function") {
71
103
  throw new Error("Cannot reference a symbol inside a function from outside a function");
72
104
  }
73
105
  }
106
+ if (memberPath) {
107
+ for (const sym of memberPath) {
108
+ // make sure we're not trying to access a static private from outside
109
+ // the static member scope.
110
+ if (sym.flags & OutputSymbolFlags.StaticMember && sym.tsFlags & TSSymbolFlags.PrivateMember && currentPrivateScope?.staticMembers !== sym.scope) {
111
+ throw new Error("Cannot resolve private static member symbols from a different scope");
112
+ }
113
+ }
114
+ }
74
115
  }
75
116
  //# sourceMappingURL=reference.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.js","names":["memo","OutputSymbolFlags","resolve","untrack","useContext","usePackage","SourceFileContext","ref","refkey","sourceFile","resolveResult","value","undefined","targetDeclaration","pathDown","memberPath","validateSymbolReachable","targetLocation","kind","localSymbol","pkg","sourcePackage","builtin","scope","addDependency","symbolPath","slice","map","s","owner","importSymbol","module","exportedSymbols","values","has","addImport","Error","name","length","addThisPrefix","buildMemberExpression","rootSymbol","flags","InstanceMember","sym","join","path"],"sources":["../../../src/symbols/reference.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,IAAI,EACJC,iBAAiB,EAEjBC,OAAO,EACPC,OAAO,EACPC,UAAU,QACL,gBAAgB;AACvB,SAASC,UAAU;AACnB,SAASC,iBAAiB;AAO1B,OAAO,SAASC,GAAGA,CAACC,MAAc,EAAgB;EAChD,MAAMC,UAAU,GAAGL,UAAU,CAACE,iBAAiB,CAAC;EAChD,MAAMI,aAAa,GAAGR,OAAO,CAC3BM,MACF,CAAC;EAED,OAAOR,IAAI,CAAC,MAAM;IAChB,IAAIU,aAAa,CAACC,KAAK,KAAKC,SAAS,EAAE;MACrC,OAAO,qBAAqB;IAC9B;IAEA,MAAM;MAAEC,iBAAiB;MAAEC,QAAQ;MAAEC;IAAW,CAAC,GAAGL,aAAa,CAACC,KAAK;IAEvEK,uBAAuB,CAACF,QAAQ,CAAC;;IAEjC;IACA;IACA;IACA;IACA,MAAMG,cAAc,GAAGH,QAAQ,CAAC,CAAC,CAAC,EAAEI,IAAI,IAAI,OAAO;IACnD,IAAIC,WAAuC;IAE3C,IAAIF,cAAc,KAAK,SAAS,EAAE;MAChC;MACA,MAAMG,GAAG,GAAGf,UAAU,CAAC,CAAC;MACxB,MAAMgB,aAAa,GAAGP,QAAQ,CAAC,CAAC,CAAmB;MAEnD,IAAIM,GAAG,IAAI,CAACC,aAAa,CAACC,OAAO,EAAE;QACjCF,GAAG,CAACG,KAAK,CAACC,aAAa,CAACH,aAAa,CAAC;MACxC;MACA,MAAMI,UAAU,GAAG,CACjB,GAAIX,QAAQ,CAACY,KAAK,CAAC,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BAAiB,EAChCM,WAAW,GAAGA,WAAW,CAACkB,IAAI,GAAGxB,iBAAiB,CAACwB,IACrD,CAAC;IACH;EACF,CAAC,CAAC;AACJ;AAEA,SAASE,aAAaA,CAACE,UAA0B,EAAEJ,IAAY,EAAE;EAC/D,IAAII,UAAU,CAACC,KAAK,GAAGzC,iBAAiB,CAAC0C,cAAc,EAAE;IACvD,OAAO,QAAQN,IAAI,EAAE;EACvB,CAAC,MAAM;IACL,OAAOA,IAAI;EACb;AACF;AAEA,SAASG,qBAAqBA,CAACf,UAA4B,EAAE;EAC3D,OAAOA,UAAU,CAACE,GAAG,CAAEiB,GAAG,IAAKA,GAAG,CAACP,IAAI,CAAC,CAACQ,IAAI,CAAC,GAAG,CAAC;AACpD;AAEA,SAAS7B,uBAAuBA,CAAC8B,IAAqB,EAAE;EACtD,KAAK,MAAMvB,KAAK,IAAIuB,IAAI,EAAE;IACxB,IAAIvB,KAAK,CAACL,IAAI,KAAK,UAAU,EAAE;MAC7B,MAAM,IAAIkB,KAAK,CACb,qEACF,CAAC;IACH;EACF;AACF","ignoreList":[]}
1
+ {"version":3,"file":"reference.js","names":["memo","OutputSymbolFlags","resolve","untrack","useContext","useMemberScope","usePackage","SourceFileContext","usePrivateScope","isValidJSIdentifier","TSSymbolFlags","ref","refkey","sourceFile","resolveResult","currentScope","currentPrivateScope","value","undefined","targetDeclaration","pathDown","memberPath","flags","InstanceMember","tsFlags","PrivateMember","instanceMembers","scope","Error","validateSymbolReachable","targetLocation","kind","localSymbol","pkg","sourcePackage","builtin","addDependency","symbolPath","slice","map","s","owner","importSymbol","module","exportedSymbols","values","refkeys","has","addImport","name","length","buildMemberExpression","path","memberExpr","base","sym","JSON","stringify","StaticMember","staticMembers"],"sources":["../../../src/symbols/reference.ts"],"sourcesContent":[null],"mappings":"AAAA,SACEA,IAAI,EACJC,iBAAiB,EAEjBC,OAAO,EACPC,OAAO,EACPC,UAAU,EACVC,cAAc,QACT,gBAAgB;AACvB,SAASC,UAAU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K,CAACI,IAAI,KAAK,UAAU,EAAE;MAC7B,MAAM,IAAIH,KAAK,CACb,qEACF,CAAC;IACH;EACF;EAEA,IAAIP,UAAU,EAAE;IACd,KAAK,MAAMkC,GAAG,IAAIlC,UAAU,EAAE;MAC5B;MACA;MACA,IACEkC,GAAG,CAACjC,KAAK,GAAGrB,iBAAiB,CAACyD,YAAY,IAC1CH,GAAG,CAAC/B,OAAO,GAAGd,aAAa,CAACe,aAAa,IACzCT,mBAAmB,EAAE2C,aAAa,KAAKJ,GAAG,CAAC5B,KAAK,EAChD;QACA,MAAM,IAAIC,KAAK,CACb,qEACF,CAAC;MACH;IACF;EACF;AACF","ignoreList":[]}
@@ -5,5 +5,5 @@ export interface TSMemberScope extends OutputScope {
5
5
  owner: TSOutputSymbol;
6
6
  isStatic: boolean;
7
7
  }
8
- export declare function createTSMemberScope(binder: Binder, parent: OutputScope, owner: TSOutputSymbol, isStatic?: boolean): TSMemberScope;
8
+ export declare function createTSMemberScope(binder: Binder, parent: OutputScope | undefined, owner: TSOutputSymbol, isStatic?: boolean): TSMemberScope;
9
9
  //# sourceMappingURL=ts-member-scope.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ts-member-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/ts-member-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,cAAc,EACrB,QAAQ,GAAE,OAAe,GACxB,aAAa,CAQf"}
1
+ {"version":3,"file":"ts-member-scope.d.ts","sourceRoot":"","sources":["../../../src/symbols/ts-member-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,MAAM,WAAW,aAAc,SAAQ,WAAW;IAChD,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,WAAW,GAAG,SAAS,EAC/B,KAAK,EAAE,cAAc,EACrB,QAAQ,GAAE,OAAe,GACxB,aAAa,CAYf"}
@@ -1,7 +1,9 @@
1
+ import { OutputScopeFlags } from "@alloy-js/core";
1
2
  export function createTSMemberScope(binder, parent, owner, isStatic = false) {
2
3
  return binder.createScope({
3
4
  kind: "member",
4
5
  name: "members",
6
+ flags: isStatic ? OutputScopeFlags.StaticMemberScope : OutputScopeFlags.MemberScope,
5
7
  owner,
6
8
  parent,
7
9
  isStatic
@@ -1 +1 @@
1
- {"version":3,"file":"ts-member-scope.js","names":["createTSMemberScope","binder","parent","owner","isStatic","createScope","kind","name"],"sources":["../../../src/symbols/ts-member-scope.ts"],"sourcesContent":[null],"mappings":"AASA,OAAO,SAASA,mBAAmBA,CACjCC,MAAc,EACdC,MAAmB,EACnBC,KAAqB,EACrBC,QAAiB,GAAG,KAAK,EACV;EACf,OAAOH,MAAM,CAACI,WAAW,CAAgB;IACvCC,IAAI,EAAE,QAAQ;IACdC,IAAI,EAAE,SAAS;IACfJ,KAAK;IACLD,MAAM;IACNE;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"ts-member-scope.js","names":["OutputScopeFlags","createTSMemberScope","binder","parent","owner","isStatic","createScope","kind","name","flags","StaticMemberScope","MemberScope"],"sources":["../../../src/symbols/ts-member-scope.ts"],"sourcesContent":[null],"mappings":"AAAA,SAA8BA,gBAAgB,QAAQ,gBAAgB;AAStE,OAAO,SAASC,mBAAmBA,CACjCC,MAAc,EACdC,MAA+B,EAC/BC,KAAqB,EACrBC,QAAiB,GAAG,KAAK,EACV;EACf,OAAOH,MAAM,CAACI,WAAW,CAAgB;IACvCC,IAAI,EAAE,QAAQ;IACdC,IAAI,EAAE,SAAS;IACfC,KAAK,EACHJ,QAAQ,GACNL,gBAAgB,CAACU,iBAAiB,GAClCV,gBAAgB,CAACW,WAAW;IAChCP,KAAK;IACLD,MAAM;IACNE;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -5,24 +5,28 @@ export declare enum TSSymbolFlags {
5
5
  None = 0,
6
6
  LocalImportSymbol = 1,
7
7
  TypeSymbol = 2,
8
- ParameterSymbol = 4
8
+ ParameterSymbol = 4,
9
+ PrivateMember = 8,
10
+ PrivateMemberContainer = 16
9
11
  }
10
12
  export interface TSOutputSymbol extends OutputSymbol {
11
13
  scope: TSOutputScope;
12
14
  export: boolean;
13
15
  default: boolean;
14
16
  tsFlags: TSSymbolFlags;
15
- memberScope?: TSMemberScope;
17
+ privateMemberScope?: TSMemberScope;
18
+ privateStaticMemberScope?: TSMemberScope;
16
19
  }
17
20
  export interface createTsSymbolOptions {
18
21
  name: string;
19
- refkey: Refkey;
22
+ refkey?: Refkey | Refkey[];
20
23
  binder?: Binder;
21
24
  scope?: TSOutputScope;
22
25
  export?: boolean;
23
26
  default?: boolean;
24
27
  flags?: OutputSymbolFlags;
25
28
  tsFlags?: TSSymbolFlags;
29
+ metadata?: Record<string, unknown>;
26
30
  }
27
31
  export declare function createTSSymbol(options: createTsSymbolOptions): TSOutputSymbol;
28
32
  //# sourceMappingURL=ts-output-symbol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ts-output-symbol.d.ts","sourceRoot":"","sources":["../../../src/symbols/ts-output-symbol.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,M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