@alloy-js/typescript 0.10.0 → 0.11.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 (200) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/src/builtins/node.js +1 -2
  3. package/dist/src/components/ArrayExpression.js +2 -5
  4. package/dist/src/components/ArrowFunction.d.ts +40 -0
  5. package/dist/src/components/ArrowFunction.d.ts.map +1 -0
  6. package/dist/src/components/ArrowFunction.js +67 -0
  7. package/dist/src/components/BarrelFile.js +1 -2
  8. package/dist/src/components/BlockScope.js +2 -4
  9. package/dist/src/components/CallSignature.js +2 -4
  10. package/dist/src/components/ClassDeclaration.js +2 -6
  11. package/dist/src/components/CommaList.js +2 -5
  12. package/dist/src/components/Declaration.js +3 -5
  13. package/dist/src/components/EnumDeclaration.js +2 -5
  14. package/dist/src/components/EnumMember.js +2 -4
  15. package/dist/src/components/ExportStatement.js +1 -2
  16. package/dist/src/components/FunctionBase.d.ts +60 -0
  17. package/dist/src/components/FunctionBase.d.ts.map +1 -0
  18. package/dist/src/components/FunctionBase.js +207 -0
  19. package/dist/src/components/FunctionCallExpression.js +2 -5
  20. package/dist/src/components/FunctionDeclaration.d.ts +3 -18
  21. package/dist/src/components/FunctionDeclaration.d.ts.map +1 -1
  22. package/dist/src/components/FunctionDeclaration.js +9 -157
  23. package/dist/src/components/FunctionExpression.d.ts +39 -0
  24. package/dist/src/components/FunctionExpression.d.ts.map +1 -0
  25. package/dist/src/components/FunctionExpression.js +66 -0
  26. package/dist/src/components/FunctionType.d.ts +39 -0
  27. package/dist/src/components/FunctionType.d.ts.map +1 -0
  28. package/dist/src/components/FunctionType.js +73 -0
  29. package/dist/src/components/IfStatement.js +2 -4
  30. package/dist/src/components/ImportStatement.js +1 -2
  31. package/dist/src/components/Interface.d.ts.map +1 -1
  32. package/dist/src/components/Interface.js +32 -11
  33. package/dist/src/components/InterfaceMethod.d.ts +43 -0
  34. package/dist/src/components/InterfaceMethod.d.ts.map +1 -0
  35. package/dist/src/components/InterfaceMethod.js +87 -0
  36. package/dist/src/components/JSDoc.js +1 -2
  37. package/dist/src/components/JSDocComment.js +2 -4
  38. package/dist/src/components/JSDocExample.js +2 -5
  39. package/dist/src/components/JSDocParam.js +2 -5
  40. package/dist/src/components/MemberChainExpression.js +2 -4
  41. package/dist/src/components/MemberDeclaration.d.ts +30 -0
  42. package/dist/src/components/MemberDeclaration.d.ts.map +1 -0
  43. package/dist/src/components/MemberDeclaration.js +29 -0
  44. package/dist/src/components/MemberExpression.js +2 -5
  45. package/dist/src/components/ObjectExpression.js +2 -5
  46. package/dist/src/components/PackageDirectory.js +2 -5
  47. package/dist/src/components/PackageJson.js +1 -2
  48. package/dist/src/components/PropertyName.js +1 -2
  49. package/dist/src/components/Reference.js +1 -2
  50. package/dist/src/components/SingleLineCommentBlock.js +2 -4
  51. package/dist/src/components/SourceFile.js +2 -4
  52. package/dist/src/components/SwitchStatement.js +2 -5
  53. package/dist/src/components/TsConfigJson.js +1 -2
  54. package/dist/src/components/TypeDeclaration.js +2 -6
  55. package/dist/src/components/ValueExpression.js +1 -2
  56. package/dist/src/components/VarDeclaration.js +2 -5
  57. package/dist/src/components/index.d.ts +6 -0
  58. package/dist/src/components/index.d.ts.map +1 -1
  59. package/dist/src/components/index.js +6 -1
  60. package/dist/src/components/stc/index.d.ts +7 -0
  61. package/dist/src/components/stc/index.d.ts.map +1 -1
  62. package/dist/src/components/stc/index.js +8 -2
  63. package/dist/src/context/private-scope.js +1 -2
  64. package/dist/src/create-package.js +1 -2
  65. package/dist/src/index.js +1 -2
  66. package/dist/src/name-conflict-resolver.js +1 -2
  67. package/dist/src/name-policy.js +1 -2
  68. package/dist/src/parameter-descriptor.d.ts +27 -17
  69. package/dist/src/parameter-descriptor.d.ts.map +1 -1
  70. package/dist/src/source-directory-data.js +1 -2
  71. package/dist/src/symbols/index.js +1 -2
  72. package/dist/src/symbols/reference.js +2 -3
  73. package/dist/src/symbols/scopes.js +1 -2
  74. package/dist/src/symbols/ts-member-scope.js +1 -2
  75. package/dist/src/symbols/ts-module-scope.js +1 -2
  76. package/dist/src/symbols/ts-output-symbol.js +1 -2
  77. package/dist/src/symbols/ts-package-scope.js +1 -2
  78. package/dist/src/utils.js +1 -2
  79. package/dist/test/array.test.js +105 -0
  80. package/dist/test/arrow-function.test.d.ts +2 -0
  81. package/dist/test/arrow-function.test.d.ts.map +1 -0
  82. package/dist/test/arrow-function.test.js +194 -0
  83. package/dist/test/barrel.test.js +53 -0
  84. package/dist/test/basic.test.js +91 -0
  85. package/dist/test/block-scope.test.js +30 -0
  86. package/dist/test/class.test.js +438 -0
  87. package/dist/test/enum-jsdoc.test.js +88 -0
  88. package/dist/test/enum.test.js +247 -0
  89. package/dist/test/externals.test.js +145 -0
  90. package/dist/test/function-call-expression.test.js +87 -0
  91. package/dist/test/function-declaration-jsdoc.test.js +91 -0
  92. package/dist/test/function-declaration.test.js +228 -0
  93. package/dist/test/function-expression.test.d.ts +2 -0
  94. package/dist/test/function-expression.test.d.ts.map +1 -0
  95. package/dist/test/function-expression.test.js +194 -0
  96. package/dist/test/function-type.test.d.ts +2 -0
  97. package/dist/test/function-type.test.d.ts.map +1 -0
  98. package/dist/test/function-type.test.js +122 -0
  99. package/dist/test/if-statement.test.js +25 -0
  100. package/dist/test/imports.test.js +434 -0
  101. package/dist/test/interface-jsdoc.test.js +178 -0
  102. package/dist/test/interface.test.d.ts.map +1 -1
  103. package/dist/test/interface.test.js +490 -0
  104. package/dist/test/jscomment.test.js +70 -0
  105. package/dist/test/jsdoc.test.js +134 -0
  106. package/dist/test/jsdocparam.test.js +164 -0
  107. package/dist/test/member-chain.test.js +141 -0
  108. package/dist/test/member-expression.test.js +359 -0
  109. package/dist/test/name-conflict.test.js +108 -0
  110. package/dist/test/name-policy.test.js +122 -0
  111. package/dist/test/package-external.test.js +196 -0
  112. package/dist/test/package-json.test.js +93 -0
  113. package/dist/test/package.test.js +136 -0
  114. package/dist/test/reference.test.js +81 -0
  115. package/dist/test/source-file.test.js +36 -0
  116. package/dist/test/switch-statement.test.js +61 -0
  117. package/dist/test/utils.js +45 -0
  118. package/dist/test/value-expression.test.js +30 -0
  119. package/dist/test/values.test.js +351 -0
  120. package/dist/test/var-declaration-jsdoc.test.js +50 -0
  121. package/dist/test/var-declaration.test.js +63 -0
  122. package/dist/test/vitest.d.js +1 -0
  123. package/dist/tsconfig.tsbuildinfo +1 -1
  124. package/package.json +12 -17
  125. package/src/components/ArrowFunction.tsx +87 -0
  126. package/src/components/Declaration.tsx +1 -1
  127. package/src/components/FunctionBase.tsx +271 -0
  128. package/src/components/FunctionDeclaration.tsx +13 -195
  129. package/src/components/FunctionExpression.tsx +86 -0
  130. package/src/components/FunctionType.tsx +88 -0
  131. package/src/components/Interface.tsx +33 -5
  132. package/src/components/InterfaceMethod.tsx +96 -0
  133. package/src/components/MemberDeclaration.tsx +70 -0
  134. package/src/components/index.ts +10 -0
  135. package/src/components/stc/index.ts +7 -0
  136. package/src/parameter-descriptor.ts +29 -18
  137. package/src/symbols/reference.ts +4 -1
  138. package/temp/api.json +2605 -680
  139. package/test/arrow-function.test.tsx +188 -0
  140. package/test/class.test.tsx +1 -2
  141. package/test/function-call-expression.test.tsx +1 -2
  142. package/test/function-declaration.test.tsx +1 -2
  143. package/test/function-expression.test.tsx +195 -0
  144. package/test/function-type.test.tsx +118 -0
  145. package/test/interface.test.tsx +256 -6
  146. package/tsdoc-metadata.json +1 -1
  147. package/babel.config.cjs +0 -4
  148. package/dist/src/builtins/index.js.map +0 -1
  149. package/dist/src/builtins/node.js.map +0 -1
  150. package/dist/src/components/ArrayExpression.js.map +0 -1
  151. package/dist/src/components/BarrelFile.js.map +0 -1
  152. package/dist/src/components/BlockScope.js.map +0 -1
  153. package/dist/src/components/CallSignature.js.map +0 -1
  154. package/dist/src/components/ClassDeclaration.js.map +0 -1
  155. package/dist/src/components/CommaList.js.map +0 -1
  156. package/dist/src/components/Declaration.js.map +0 -1
  157. package/dist/src/components/EnumDeclaration.js.map +0 -1
  158. package/dist/src/components/EnumMember.js.map +0 -1
  159. package/dist/src/components/ExportStatement.js.map +0 -1
  160. package/dist/src/components/FunctionCallExpression.js.map +0 -1
  161. package/dist/src/components/FunctionDeclaration.js.map +0 -1
  162. package/dist/src/components/IfStatement.js.map +0 -1
  163. package/dist/src/components/ImportStatement.js.map +0 -1
  164. package/dist/src/components/Interface.js.map +0 -1
  165. package/dist/src/components/JSDoc.js.map +0 -1
  166. package/dist/src/components/JSDocComment.js.map +0 -1
  167. package/dist/src/components/JSDocExample.js.map +0 -1
  168. package/dist/src/components/JSDocParam.js.map +0 -1
  169. package/dist/src/components/MemberChainExpression.js.map +0 -1
  170. package/dist/src/components/MemberExpression.js.map +0 -1
  171. package/dist/src/components/ObjectExpression.js.map +0 -1
  172. package/dist/src/components/PackageDirectory.js.map +0 -1
  173. package/dist/src/components/PackageJson.js.map +0 -1
  174. package/dist/src/components/PropertyName.js.map +0 -1
  175. package/dist/src/components/Reference.js.map +0 -1
  176. package/dist/src/components/SingleLineCommentBlock.js.map +0 -1
  177. package/dist/src/components/SourceFile.js.map +0 -1
  178. package/dist/src/components/SwitchStatement.js.map +0 -1
  179. package/dist/src/components/TsConfigJson.js.map +0 -1
  180. package/dist/src/components/TypeDeclaration.js.map +0 -1
  181. package/dist/src/components/ValueExpression.js.map +0 -1
  182. package/dist/src/components/VarDeclaration.js.map +0 -1
  183. package/dist/src/components/index.js.map +0 -1
  184. package/dist/src/components/stc/index.js.map +0 -1
  185. package/dist/src/context/index.js.map +0 -1
  186. package/dist/src/context/private-scope.js.map +0 -1
  187. package/dist/src/create-package.js.map +0 -1
  188. package/dist/src/index.js.map +0 -1
  189. package/dist/src/name-conflict-resolver.js.map +0 -1
  190. package/dist/src/name-policy.js.map +0 -1
  191. package/dist/src/parameter-descriptor.js.map +0 -1
  192. package/dist/src/source-directory-data.js.map +0 -1
  193. package/dist/src/symbols/index.js.map +0 -1
  194. package/dist/src/symbols/reference.js.map +0 -1
  195. package/dist/src/symbols/scopes.js.map +0 -1
  196. package/dist/src/symbols/ts-member-scope.js.map +0 -1
  197. package/dist/src/symbols/ts-module-scope.js.map +0 -1
  198. package/dist/src/symbols/ts-output-symbol.js.map +0 -1
  199. package/dist/src/symbols/ts-package-scope.js.map +0 -1
  200. package/dist/src/utils.js.map +0 -1
@@ -1,5 +1,4 @@
1
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
1
+ import { createIntrinsic as _$createIntrinsic, memo as _$memo } from "@alloy-js/core/jsx-runtime";
3
2
  /**
4
3
  * A JSDoc comment block. This is a low-level component that merely creates the
5
4
  * block. Consider using {@link JSDoc} if you want to create more complex
@@ -12,5 +11,4 @@ export function JSDocComment(props) {
12
11
  return [_$createIntrinsic("hbr", {}), _$memo(() => props.children)];
13
12
  }
14
13
  }), _$createIntrinsic("hbr", {}), " **/"];
15
- }
16
- //# sourceMappingURL=JSDocComment.js.map
14
+ }
@@ -1,6 +1,4 @@
1
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
3
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
1
+ import { createIntrinsic as _$createIntrinsic, memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
4
2
  import { Show } from "@alloy-js/core";
5
3
  /**
6
4
  * Create a JSDoc example set off with `@example`. When the `fenced` prop is true, a `language` prop can
@@ -22,5 +20,4 @@ export function JSDocExample(props) {
22
20
  return [_$createIntrinsic("hbr", {}), "```"];
23
21
  }
24
22
  })];
25
- }
26
- //# sourceMappingURL=JSDocExample.js.map
23
+ }
@@ -1,6 +1,4 @@
1
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
3
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
1
+ import { createComponent as _$createComponent, memo as _$memo, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
4
2
  import { For, Prose, Show } from "@alloy-js/core";
5
3
  /**
6
4
  * A component that creates a JSDoc block with `@param` tags for each parameter.
@@ -117,5 +115,4 @@ function JSDocParamDescription(props) {
117
115
  })];
118
116
  }
119
117
  });
120
- }
121
- //# sourceMappingURL=JSDocParam.js.map
118
+ }
@@ -1,5 +1,4 @@
1
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
1
+ import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
3
2
  import { childrenArray, computed, For, List, Show } from "@alloy-js/core";
4
3
  import { isComponentCreator } from "@alloy-js/core/jsx-runtime";
5
4
  import { FunctionCallExpression } from "./FunctionCallExpression.js";
@@ -96,5 +95,4 @@ function flattenCallChains(children) {
96
95
  }
97
96
  }
98
97
  return flatChildren;
99
- }
100
- //# sourceMappingURL=MemberChainExpression.js.map
98
+ }
@@ -0,0 +1,30 @@
1
+ import { MemberDeclarationPropsWithInfo, OutputSymbolFlags } from "@alloy-js/core";
2
+ import { TypeScriptElements } from "../name-policy.js";
3
+ import { TSOutputSymbol } from "../symbols/index.js";
4
+ export interface MemberDeclarationProps extends Omit<MemberDeclarationPropsWithInfo, "name"> {
5
+ /**
6
+ * The name of this member declaration.
7
+ */
8
+ name?: string;
9
+ /** Name that shouldn't go through the name policy resolver again. */
10
+ exactName?: string;
11
+ /**
12
+ * Whether this is a memberdeclaration of a type (e.g. interface, type alias) or a
13
+ * value (e.g. var, const, let).
14
+ */
15
+ kind?: "type" | "value";
16
+ /**
17
+ * The name policy kind to apply to the memberdeclaration.
18
+ */
19
+ nameKind?: TypeScriptElements;
20
+ /**
21
+ * Flags for the symbol created by this component.
22
+ */
23
+ flags?: OutputSymbolFlags;
24
+ /**
25
+ * The symbol to use for this memberdeclaration.
26
+ */
27
+ symbol?: TSOutputSymbol;
28
+ }
29
+ export declare function MemberDeclaration(props: Readonly<MemberDeclarationProps>): import("@alloy-js/core").Children;
30
+ //# sourceMappingURL=MemberDeclaration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MemberDeclaration.d.ts","sourceRoot":"","sources":["../../../src/components/MemberDeclaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,8BAA8B,EAC9B,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAmB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAEL,cAAc,EAEf,MAAM,qBAAqB,CAAC;AAE7B,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC;IACpD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAE9B;;OAEG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,qCAyBxE"}
@@ -0,0 +1,29 @@
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { MemberDeclaration as CoreMemberDeclaration } from "@alloy-js/core";
3
+ import { useTSNamePolicy } from "../name-policy.js";
4
+ import { createTSSymbol, TSSymbolFlags } from "../symbols/index.js";
5
+ export function MemberDeclaration(props) {
6
+ let sym;
7
+ if (props.symbol) {
8
+ sym = props.symbol;
9
+ } else {
10
+ const namePolicy = useTSNamePolicy();
11
+ let tsFlags = TSSymbolFlags.None;
12
+ if (props.kind === "type") {
13
+ tsFlags |= TSSymbolFlags.TypeSymbol;
14
+ }
15
+ sym = createTSSymbol({
16
+ name: props.exactName ?? namePolicy.getName(props.name, props.nameKind),
17
+ refkey: props.refkey,
18
+ flags: props.flags,
19
+ tsFlags,
20
+ metadata: props.metadata
21
+ });
22
+ }
23
+ return _$createComponent(CoreMemberDeclaration, {
24
+ symbol: sym,
25
+ get children() {
26
+ return props.children;
27
+ }
28
+ });
29
+ }
@@ -1,6 +1,4 @@
1
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
3
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
1
+ import { createIntrinsic as _$createIntrinsic, memo as _$memo, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
4
2
  import { childrenArray, computed, For, isComponentCreator, ref, toRef, useBinder } from "@alloy-js/core";
5
3
  import { isValidJSIdentifier } from "../utils.js";
6
4
  /**
@@ -175,5 +173,4 @@ MemberExpression.Part = function (props) {
175
173
  * This component does nothing except hold props which are retrieved by
176
174
  * the `MemberExpression` component.
177
175
  */
178
- };
179
- //# sourceMappingURL=MemberExpression.js.map
176
+ };
@@ -1,6 +1,4 @@
1
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
3
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
1
+ import { memo as _$memo, createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
4
2
  import { AssignmentContext, Block, computed, createAssignmentContext, For, getAssignmentSymbol, Match, MemberScope, OutputSymbolFlags, Switch, Wrap } from "@alloy-js/core";
5
3
  import { useTSNamePolicy } from "../name-policy.js";
6
4
  import { createTSSymbol } from "../symbols/index.js";
@@ -107,5 +105,4 @@ export function ObjectProperty(props) {
107
105
  value: assignmentContext,
108
106
  children: value
109
107
  })];
110
- }
111
- //# sourceMappingURL=ObjectExpression.js.map
108
+ }
@@ -1,6 +1,4 @@
1
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
3
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
1
+ import { memo as _$memo, mergeProps as _$mergeProps, createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
4
2
  import { createNamedContext, Scope, shallowRef, SourceDirectory, SourceDirectoryContext, splitProps, useBinder, useContext, useScope } from "@alloy-js/core";
5
3
  import { join } from "pathe";
6
4
  import { createTSPackageScope } from "../symbols/index.js";
@@ -51,5 +49,4 @@ function createPackageContext(name, version, path) {
51
49
  scope,
52
50
  outFileMapper: shallowRef(path => modulePath(path))
53
51
  };
54
- }
55
- //# sourceMappingURL=PackageDirectory.js.map
52
+ }
@@ -50,5 +50,4 @@ export function PackageJsonFile(props) {
50
50
  filetype: "json",
51
51
  children: jsonContent
52
52
  });
53
- }
54
- //# sourceMappingURL=PackageJson.js.map
53
+ }
@@ -32,5 +32,4 @@ function quoteIfNeeded(name) {
32
32
  } else {
33
33
  return `"${name.replace(/"/g, '\\"')}"`;
34
34
  }
35
- }
36
- //# sourceMappingURL=PropertyName.js.map
35
+ }
@@ -4,5 +4,4 @@ export function Reference({
4
4
  }) {
5
5
  const reference = ref(refkey);
6
6
  return [reference];
7
- }
8
- //# sourceMappingURL=Reference.js.map
7
+ }
@@ -1,5 +1,4 @@
1
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
1
+ import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
3
2
  import { Prose } from "@alloy-js/core";
4
3
  /**
5
4
  * A single line comment block. The children are rendered as a prose element, which means that they
@@ -16,5 +15,4 @@ export function SingleLineCommentBlock(props) {
16
15
  });
17
16
  }
18
17
  })];
19
- }
20
- //# sourceMappingURL=SingleLineCommentBlock.js.map
18
+ }
@@ -1,5 +1,4 @@
1
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
1
+ import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
3
2
  import { SourceFile as CoreSourceFile, createNamedContext, Scope, Show, SourceDirectoryContext, useBinder, useContext, useScope } from "@alloy-js/core";
4
3
  import { join } from "pathe";
5
4
  import { getSourceDirectoryData } from "../source-directory-data.js";
@@ -96,5 +95,4 @@ function SourceFileHeader(props) {
96
95
  return props.header;
97
96
  }
98
97
  }), _$createIntrinsic("hbr", {})];
99
- }
100
- //# sourceMappingURL=SourceFile.js.map
98
+ }
@@ -1,6 +1,4 @@
1
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
3
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
1
+ import { memo as _$memo, createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
4
2
  import { Block, Indent, Match, Switch } from "@alloy-js/core";
5
3
  import { BlockScope } from "./BlockScope.js";
6
4
  import { ValueExpression } from "./ValueExpression.js";
@@ -44,5 +42,4 @@ export function CaseClause(props) {
44
42
  return [_$memo(() => props.children), _$memo(() => _$memo(() => !!props.break)() && [_$createIntrinsic("hbr", {}), "break;"])];
45
43
  }
46
44
  })];
47
- }
48
- //# sourceMappingURL=SwitchStatement.js.map
45
+ }
@@ -49,5 +49,4 @@ export function TSConfigJson(props) {
49
49
  filetype: "json",
50
50
  children: jsonContent
51
51
  });
52
- }
53
- //# sourceMappingURL=TsConfigJson.js.map
52
+ }
@@ -1,7 +1,4 @@
1
- import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
2
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
3
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
4
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
1
+ import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic, memo as _$memo, mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
5
2
  import { Name, Show } from "@alloy-js/core";
6
3
  import { Declaration } from "./Declaration.js";
7
4
  import { JSDoc } from "./JSDoc.js";
@@ -23,5 +20,4 @@ export function TypeDeclaration(props) {
23
20
  return ["type ", _$createComponent(Name, {}), " = ", _$memo(() => props.children), ";"];
24
21
  }
25
22
  }))];
26
- }
27
- //# sourceMappingURL=TypeDeclaration.js.map
23
+ }
@@ -30,5 +30,4 @@ export function ValueExpression(props) {
30
30
  return jsValue;
31
31
  }
32
32
  });
33
- }
34
- //# sourceMappingURL=ValueExpression.js.map
33
+ }
@@ -1,6 +1,4 @@
1
- import { createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
3
- import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
1
+ import { memo as _$memo, createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
4
2
  import { AssignmentContext, Declaration as CoreDeclaration, createAssignmentContext, Name, Show } from "@alloy-js/core";
5
3
  import { useTSNamePolicy } from "../name-policy.js";
6
4
  import { createTSSymbol } from "../symbols/index.js";
@@ -39,5 +37,4 @@ export function VarDeclaration(props) {
39
37
  })];
40
38
  }
41
39
  })];
42
- }
43
- //# sourceMappingURL=VarDeclaration.js.map
40
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "../parameter-descriptor.js";
2
2
  export * from "./ArrayExpression.js";
3
+ export * from "./ArrowFunction.jsx";
3
4
  export * from "./BarrelFile.js";
4
5
  export * from "./BlockScope.js";
5
6
  export * from "./CallSignature.jsx";
@@ -9,10 +10,15 @@ export * from "./Declaration.js";
9
10
  export * from "./EnumDeclaration.js";
10
11
  export * from "./EnumMember.js";
11
12
  export * from "./ExportStatement.js";
13
+ export { type FunctionBodyProps, type FunctionParametersProps, type FunctionTypeParametersProps, } from "./FunctionBase.js";
12
14
  export * from "./FunctionCallExpression.js";
13
15
  export * from "./FunctionDeclaration.js";
16
+ export * from "./FunctionExpression.js";
17
+ export * from "./FunctionType.jsx";
18
+ export * from "./IfStatement.jsx";
14
19
  export * from "./ImportStatement.js";
15
20
  export * from "./Interface.js";
21
+ export * from "./InterfaceMethod.jsx";
16
22
  export * from "./JSDoc.jsx";
17
23
  export * from "./JSDocComment.jsx";
18
24
  export * from "./JSDocExample.jsx";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,GACjC,MAAM,mBAAmB,CAAC;AAC3B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from "../parameter-descriptor.js";
2
2
  export * from "./ArrayExpression.js";
3
+ export * from "./ArrowFunction.js";
3
4
  export * from "./BarrelFile.js";
4
5
  export * from "./BlockScope.js";
5
6
  export * from "./CallSignature.js";
@@ -11,8 +12,12 @@ export * from "./EnumMember.js";
11
12
  export * from "./ExportStatement.js";
12
13
  export * from "./FunctionCallExpression.js";
13
14
  export * from "./FunctionDeclaration.js";
15
+ export * from "./FunctionExpression.js";
16
+ export * from "./FunctionType.js";
17
+ export * from "./IfStatement.js";
14
18
  export * from "./ImportStatement.js";
15
19
  export * from "./Interface.js";
20
+ export * from "./InterfaceMethod.js";
16
21
  export * from "./JSDoc.js";
17
22
  export * from "./JSDocComment.js";
18
23
  export * from "./JSDocExample.js";
@@ -28,4 +33,4 @@ export * from "./TsConfigJson.js";
28
33
  export * from "./TypeDeclaration.js";
29
34
  export * from "./ValueExpression.js";
30
35
  export * from "./VarDeclaration.js";
31
- //# sourceMappingURL=index.js.map
36
+ export {};
@@ -1,5 +1,6 @@
1
1
  import * as base from "../index.js";
2
2
  export declare const ArrayExpression: import("@alloy-js/core").StcSignature<base.ArrayExpressionProps>;
3
+ export declare const ArrowFunction: import("@alloy-js/core").StcSignature<base.ArrowFunctionProps>;
3
4
  export declare const BarrelFile: import("@alloy-js/core").StcSignature<base.BarrelFileProps>;
4
5
  export declare const CallSignature: import("@alloy-js/core").StcSignature<base.CallSignatureProps>;
5
6
  export declare const ClassDeclaration: import("@alloy-js/core").StcSignature<base.ClassDeclarationProps>;
@@ -13,11 +14,16 @@ export declare const EnumMember: import("@alloy-js/core").StcSignature<base.Enum
13
14
  export declare const ExportStatement: import("@alloy-js/core").StcSignature<base.ExportStatementProps>;
14
15
  export declare const FunctionCallExpression: import("@alloy-js/core").StcSignature<base.FunctionCallExpressionProps>;
15
16
  export declare const FunctionDeclaration: import("@alloy-js/core").StcSignature<base.FunctionDeclarationProps>;
17
+ export declare const FunctionExpression: import("@alloy-js/core").StcSignature<base.FunctionExpressionProps>;
18
+ export declare const IfStatement: import("@alloy-js/core").StcSignature<base.IfStatementProps>;
19
+ export declare const ElseClause: import("@alloy-js/core").StcSignature<base.ElseClauseProps>;
20
+ export declare const ElseIfClause: import("@alloy-js/core").StcSignature<base.ElseIfClauseProps>;
16
21
  export declare const ImportStatement: import("@alloy-js/core").StcSignature<base.ImportStatementProps>;
17
22
  export declare const ImportStatements: import("@alloy-js/core").StcSignature<base.ImportStatementsProps>;
18
23
  export declare const InterfaceDeclaration: import("@alloy-js/core").StcSignature<base.InterfaceDeclarationProps>;
19
24
  export declare const InterfaceExpression: import("@alloy-js/core").StcSignature<base.InterfaceExpressionProps>;
20
25
  export declare const InterfaceMember: import("@alloy-js/core").StcSignature<base.InterfaceMemberProps>;
26
+ export declare const InterfaceMethod: import("@alloy-js/core").StcSignature<base.InterfaceMethodProps>;
21
27
  export declare const JSDoc: import("@alloy-js/core").StcSignature<base.JSDocProps>;
22
28
  export declare const JSDocExample: import("@alloy-js/core").StcSignature<base.JSDocExampleProps>;
23
29
  export declare const JSDocComment: import("@alloy-js/core").StcSignature<base.JSDocCommentProps>;
@@ -32,6 +38,7 @@ export declare const SourceFile: import("@alloy-js/core").StcSignature<base.Sour
32
38
  export declare const SwitchStatement: import("@alloy-js/core").StcSignature<base.SwitchStatementProps>;
33
39
  export declare const CaseClause: import("@alloy-js/core").StcSignature<base.CaseClauseProps>;
34
40
  export declare const TSConfigJson: import("@alloy-js/core").StcSignature<base.TSConfigJsonProps>;
41
+ export declare const FunctionType: import("@alloy-js/core").StcSignature<base.FunctionTypeProps>;
35
42
  export declare const TypeDeclaration: import("@alloy-js/core").StcSignature<base.TypeDeclarationProps>;
36
43
  export declare const ValueExpression: import("@alloy-js/core").StcSignature<base.ValueExpressionProps>;
37
44
  export declare const VarDeclaration: import("@alloy-js/core").StcSignature<base.VarDeclarationProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/stc/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,IAA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EAAgC,CAAC;AACjE,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,KAAK,wDAAkB,CAAC;AACrC,eAAO,MAAM,YAAY,+DAAyB,CAAC;AACnD,eAAO,MAAM,YAAY,+DAAyB,CAAC;AACnD,eAAO,MAAM,gBAAgB,mEAA6B,CAAC;AAC3D,eAAO,MAAM,qBAAqB,wEAAkC,CAAC;AACrE,eAAO,MAAM,gBAAgB,mEAA6B,CAAC;AAC3D,eAAO,MAAM,cAAc,iEAA2B,CAAC;AACvD,eAAO,MAAM,gBAAgB,mEAA6B,CAAC;AAC3D,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,SAAS,4DAAsB,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,YAAY,+DAAyB,CAAC;AACnD,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,eAAe,kEAA4B,CAAC;AACzD,eAAO,MAAM,cAAc,iEAA2B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { stc } from "@alloy-js/core";
2
2
  import * as base from "../index.js";
3
3
  export const ArrayExpression = stc(base.ArrayExpression);
4
+ export const ArrowFunction = stc(base.ArrowFunction);
4
5
  export const BarrelFile = stc(base.BarrelFile);
5
6
  export const CallSignature = stc(base.CallSignature);
6
7
  export const ClassDeclaration = stc(base.ClassDeclaration);
@@ -14,11 +15,16 @@ export const EnumMember = stc(base.EnumMember);
14
15
  export const ExportStatement = stc(base.ExportStatement);
15
16
  export const FunctionCallExpression = stc(base.FunctionCallExpression);
16
17
  export const FunctionDeclaration = stc(base.FunctionDeclaration);
18
+ export const FunctionExpression = stc(base.FunctionExpression);
19
+ export const IfStatement = stc(base.IfStatement);
20
+ export const ElseClause = stc(base.ElseClause);
21
+ export const ElseIfClause = stc(base.ElseIfClause);
17
22
  export const ImportStatement = stc(base.ImportStatement);
18
23
  export const ImportStatements = stc(base.ImportStatements);
19
24
  export const InterfaceDeclaration = stc(base.InterfaceDeclaration);
20
25
  export const InterfaceExpression = stc(base.InterfaceExpression);
21
26
  export const InterfaceMember = stc(base.InterfaceMember);
27
+ export const InterfaceMethod = stc(base.InterfaceMethod);
22
28
  export const JSDoc = stc(base.JSDoc);
23
29
  export const JSDocExample = stc(base.JSDocExample);
24
30
  export const JSDocComment = stc(base.JSDocComment);
@@ -33,7 +39,7 @@ export const SourceFile = stc(base.SourceFile);
33
39
  export const SwitchStatement = stc(base.SwitchStatement);
34
40
  export const CaseClause = stc(base.CaseClause);
35
41
  export const TSConfigJson = stc(base.TSConfigJson);
42
+ export const FunctionType = stc(base.FunctionType);
36
43
  export const TypeDeclaration = stc(base.TypeDeclaration);
37
44
  export const ValueExpression = stc(base.ValueExpression);
38
- export const VarDeclaration = stc(base.VarDeclaration);
39
- //# sourceMappingURL=index.js.map
45
+ export const VarDeclaration = stc(base.VarDeclaration);
@@ -5,5 +5,4 @@ import { createContext, useContext } from "@alloy-js/core";
5
5
  export const PrivateScopeContext = createContext();
6
6
  export function usePrivateScope() {
7
7
  return useContext(PrivateScopeContext);
8
- }
9
- //# sourceMappingURL=private-scope.js.map
8
+ }
@@ -46,5 +46,4 @@ export function createPackage(props) {
46
46
  }
47
47
  }
48
48
  return refkeys;
49
- }
50
- //# sourceMappingURL=create-package.js.map
49
+ }
package/dist/src/index.js CHANGED
@@ -4,5 +4,4 @@ export * from "./context/index.js";
4
4
  export * from "./create-package.js";
5
5
  export * from "./name-conflict-resolver.js";
6
6
  export * from "./name-policy.js";
7
- export * from "./symbols/index.js";
8
- //# sourceMappingURL=index.js.map
7
+ export * from "./symbols/index.js";
@@ -11,5 +11,4 @@ export function tsNameConflictResolver(name, symbols) {
11
11
  for (const sym of badNamedSymbols) {
12
12
  sym.name = name + "_" + nameCount++;
13
13
  }
14
- }
15
- //# sourceMappingURL=name-conflict-resolver.js.map
14
+ }
@@ -48,5 +48,4 @@ export function createTSNamePolicy() {
48
48
  }
49
49
  export function useTSNamePolicy() {
50
50
  return useNamePolicy();
51
- }
52
- //# sourceMappingURL=name-policy.js.map
51
+ }
@@ -1,36 +1,46 @@
1
1
  import { Children, Refkey } from "@alloy-js/core";
2
2
  /**
3
- * Information for a TypeScript function parameter.
3
+ * Common properties for ParameterDescriptor and FunctionTypeParameterDescriptor.
4
4
  */
5
- export interface ParameterDescriptor {
5
+ export interface ParameterDescriptorBase {
6
6
  /**
7
7
  * The name of the parameter.
8
8
  */
9
- name: string;
9
+ readonly name: string;
10
10
  /**
11
11
  * The type of the parameter.
12
12
  */
13
- type?: Children;
14
- /**
15
- * The default value of the parameter.
16
- */
17
- default?: Children;
13
+ readonly type?: Children;
18
14
  /**
19
15
  * The refkey for this parameter.
20
16
  */
21
- refkey?: Refkey | Refkey[];
17
+ readonly refkey?: Refkey | Refkey[];
22
18
  /**
23
19
  * Whether the parameter is optional.
24
20
  */
25
- optional?: boolean;
21
+ readonly optional?: boolean;
26
22
  /**
27
23
  * Arbitrary metadata for the parameter symbol.
28
24
  */
29
- metadata?: Record<string, unknown>;
25
+ readonly metadata?: Record<string, unknown>;
30
26
  /**
31
27
  * Documentation for the parameter.
32
28
  */
33
- doc?: Children;
29
+ readonly doc?: Children;
30
+ }
31
+ /**
32
+ * Information for a TypeScript function parameter.
33
+ */
34
+ export interface ParameterDescriptor extends ParameterDescriptorBase {
35
+ /**
36
+ * The default value of the parameter.
37
+ */
38
+ readonly default?: Children;
39
+ }
40
+ /**
41
+ * Information for a TypeScript type function parameter.
42
+ */
43
+ export interface FunctionTypeParameterDescriptor extends ParameterDescriptorBase {
34
44
  }
35
45
  /**
36
46
  * Information for a TypeScript generic type parameter.
@@ -39,22 +49,22 @@ export interface TypeParameterDescriptor {
39
49
  /**
40
50
  * The name of the type parameter.
41
51
  */
42
- name: string;
52
+ readonly name: string;
43
53
  /**
44
54
  * The extends constraint for the type parameter.
45
55
  */
46
- extends?: Children;
56
+ readonly extends?: Children;
47
57
  /**
48
58
  * The default type of the type parameter.
49
59
  */
50
- default?: Children;
60
+ readonly default?: Children;
51
61
  /**
52
62
  * A refkey or array of refkeys for this type parameter.
53
63
  */
54
- refkey?: Refkey | Refkey[];
64
+ readonly refkey?: Refkey | Refkey[];
55
65
  /**
56
66
  * Arbitrary metadata for the type parameter symbol.
57
67
  */
58
- metadata?: Record<string, unknown>;
68
+ readonly metadata?: Record<string, unknown>;
59
69
  }
60
70
  //# sourceMappingURL=parameter-descriptor.d.ts.map
@@ -1 +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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;IAEpC;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C"}
@@ -9,5 +9,4 @@ export function getSourceDirectoryData(sdContext) {
9
9
  };
10
10
  sourceDirectoryData.set(sdContext, sdData);
11
11
  return sdData;
12
- }
13
- //# sourceMappingURL=source-directory-data.js.map
12
+ }
@@ -3,5 +3,4 @@ export * from "./scopes.js";
3
3
  export * from "./ts-member-scope.js";
4
4
  export * from "./ts-module-scope.js";
5
5
  export * from "./ts-output-symbol.js";
6
- export * from "./ts-package-scope.js";
7
- //# sourceMappingURL=index.js.map
6
+ export * from "./ts-package-scope.js";
@@ -89,7 +89,7 @@ function buildMemberExpression(path) {
89
89
  for (const sym of path) {
90
90
  if (sym.tsFlags & TSSymbolFlags.PrivateMember) {
91
91
  memberExpr += `.#${sym.name}`;
92
- } else if (isValidJSIdentifier(sym.name)) {
92
+ } else if (isValidJSIdentifier(sym.name) && !(sym.tsFlags & TSSymbolFlags.TypeSymbol)) {
93
93
  memberExpr += `.${sym.name}`;
94
94
  } else {
95
95
  memberExpr += `[${JSON.stringify(sym.name)}]`;
@@ -112,5 +112,4 @@ function validateSymbolReachable(path, memberPath, currentPrivateScope) {
112
112
  }
113
113
  }
114
114
  }
115
- }
116
- //# sourceMappingURL=reference.js.map
115
+ }
@@ -1,5 +1,4 @@
1
1
  import { useScope } from "@alloy-js/core";
2
2
  export function useTSScope() {
3
3
  return useScope();
4
- }
5
- //# sourceMappingURL=scopes.js.map
4
+ }
@@ -8,5 +8,4 @@ export function createTSMemberScope(binder, parent, owner, isStatic = false) {
8
8
  parent,
9
9
  isStatic
10
10
  });
11
- }
12
- //# sourceMappingURL=ts-member-scope.js.map
11
+ }
@@ -33,5 +33,4 @@ export function createTSModuleScope(binder, parent, path) {
33
33
  return localSymbol;
34
34
  }
35
35
  });
36
- }
37
- //# sourceMappingURL=ts-module-scope.js.map
36
+ }
@@ -38,5 +38,4 @@ export function createTSSymbol(options) {
38
38
  }
39
39
  }
40
40
  return sym;
41
- }
42
- //# sourceMappingURL=ts-output-symbol.js.map
41
+ }