@powerlines/plugin-alloy 0.26.237 → 0.26.238

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 (331) hide show
  1. package/dist/core/components/index.cjs +1 -9
  2. package/dist/core/components/index.d.cts +1 -5
  3. package/dist/core/components/index.d.mts +1 -5
  4. package/dist/core/components/index.mjs +1 -5
  5. package/dist/core/components/infrastructure-file.cjs +6 -3
  6. package/dist/core/components/infrastructure-file.d.cts +1 -1
  7. package/dist/core/components/infrastructure-file.d.cts.map +1 -1
  8. package/dist/core/components/infrastructure-file.d.mts +1 -1
  9. package/dist/core/components/infrastructure-file.mjs +5 -2
  10. package/dist/core/contexts/index.cjs +1 -11
  11. package/dist/core/contexts/index.d.cts +1 -3
  12. package/dist/core/contexts/index.d.mts +1 -3
  13. package/dist/core/contexts/index.mjs +1 -3
  14. package/dist/core/index.cjs +2 -23
  15. package/dist/core/index.d.cts +2 -10
  16. package/dist/core/index.d.mts +2 -10
  17. package/dist/core/index.mjs +2 -10
  18. package/dist/helpers/capnp.cjs +2 -2
  19. package/dist/helpers/capnp.mjs +2 -2
  20. package/dist/index.cjs +10 -2
  21. package/dist/index.d.cts +10 -4
  22. package/dist/index.d.cts.map +1 -1
  23. package/dist/index.d.mts +10 -4
  24. package/dist/index.mjs +10 -2
  25. package/dist/render.cjs +67 -48
  26. package/dist/render.d.cts +33 -2
  27. package/dist/render.d.cts.map +1 -1
  28. package/dist/render.d.mts +33 -2
  29. package/dist/render.mjs +68 -49
  30. package/dist/types/index.d.cts +2 -3
  31. package/dist/types/index.d.mts +2 -3
  32. package/dist/types/plugin.d.cts +7 -4
  33. package/dist/types/plugin.d.cts.map +1 -1
  34. package/dist/types/plugin.d.mts +7 -4
  35. package/dist/typescript/components/builtin-file.cjs +6 -6
  36. package/dist/typescript/components/builtin-file.d.cts +2 -2
  37. package/dist/typescript/components/builtin-file.d.cts.map +1 -1
  38. package/dist/typescript/components/builtin-file.d.mts +2 -2
  39. package/dist/typescript/components/builtin-file.mjs +2 -2
  40. package/dist/typescript/components/entry-file.cjs +2 -2
  41. package/dist/typescript/components/entry-file.d.cts +1 -1
  42. package/dist/typescript/components/entry-file.d.cts.map +1 -1
  43. package/dist/typescript/components/entry-file.d.mts +1 -1
  44. package/dist/typescript/components/entry-file.mjs +1 -1
  45. package/dist/typescript/components/index.cjs +1 -56
  46. package/dist/typescript/components/index.d.cts +1 -12
  47. package/dist/typescript/components/index.d.mts +1 -12
  48. package/dist/typescript/components/index.mjs +1 -12
  49. package/dist/typescript/index.cjs +1 -64
  50. package/dist/typescript/index.d.cts +1 -17
  51. package/dist/typescript/index.d.mts +1 -17
  52. package/dist/typescript/index.mjs +1 -17
  53. package/package.json +18 -639
  54. package/dist/core/components/output.cjs +0 -40
  55. package/dist/core/components/output.d.cts +0 -22
  56. package/dist/core/components/output.d.cts.map +0 -1
  57. package/dist/core/components/output.d.mts +0 -22
  58. package/dist/core/components/output.d.mts.map +0 -1
  59. package/dist/core/components/output.mjs +0 -40
  60. package/dist/core/components/output.mjs.map +0 -1
  61. package/dist/core/components/single-line-comment.cjs +0 -22
  62. package/dist/core/components/single-line-comment.d.cts +0 -19
  63. package/dist/core/components/single-line-comment.d.cts.map +0 -1
  64. package/dist/core/components/single-line-comment.d.mts +0 -19
  65. package/dist/core/components/single-line-comment.d.mts.map +0 -1
  66. package/dist/core/components/single-line-comment.mjs +0 -22
  67. package/dist/core/components/single-line-comment.mjs.map +0 -1
  68. package/dist/core/components/source-file.cjs +0 -64
  69. package/dist/core/components/source-file.d.cts +0 -30
  70. package/dist/core/components/source-file.d.cts.map +0 -1
  71. package/dist/core/components/source-file.d.mts +0 -30
  72. package/dist/core/components/source-file.d.mts.map +0 -1
  73. package/dist/core/components/source-file.mjs +0 -62
  74. package/dist/core/components/source-file.mjs.map +0 -1
  75. package/dist/core/components/spacing.cjs +0 -19
  76. package/dist/core/components/spacing.d.cts +0 -19
  77. package/dist/core/components/spacing.d.cts.map +0 -1
  78. package/dist/core/components/spacing.d.mts +0 -19
  79. package/dist/core/components/spacing.d.mts.map +0 -1
  80. package/dist/core/components/spacing.mjs +0 -19
  81. package/dist/core/components/spacing.mjs.map +0 -1
  82. package/dist/core/contexts/meta.cjs +0 -40
  83. package/dist/core/contexts/meta.d.cts +0 -46
  84. package/dist/core/contexts/meta.d.cts.map +0 -1
  85. package/dist/core/contexts/meta.d.mts +0 -46
  86. package/dist/core/contexts/meta.d.mts.map +0 -1
  87. package/dist/core/contexts/meta.mjs +0 -37
  88. package/dist/core/contexts/meta.mjs.map +0 -1
  89. package/dist/core/contexts/schema.cjs +0 -38
  90. package/dist/core/contexts/schema.d.cts +0 -26
  91. package/dist/core/contexts/schema.d.cts.map +0 -1
  92. package/dist/core/contexts/schema.d.mts +0 -26
  93. package/dist/core/contexts/schema.d.mts.map +0 -1
  94. package/dist/core/contexts/schema.mjs +0 -35
  95. package/dist/core/contexts/schema.mjs.map +0 -1
  96. package/dist/core/helpers/code.cjs +0 -33
  97. package/dist/core/helpers/code.d.cts +0 -28
  98. package/dist/core/helpers/code.d.cts.map +0 -1
  99. package/dist/core/helpers/code.d.mts +0 -28
  100. package/dist/core/helpers/code.d.mts.map +0 -1
  101. package/dist/core/helpers/code.mjs +0 -33
  102. package/dist/core/helpers/code.mjs.map +0 -1
  103. package/dist/core/helpers/index.cjs +0 -4
  104. package/dist/core/helpers/index.d.cts +0 -2
  105. package/dist/core/helpers/index.d.mts +0 -2
  106. package/dist/core/helpers/index.mjs +0 -3
  107. package/dist/hcl/components/block-declaration.cjs +0 -33
  108. package/dist/hcl/components/block-declaration.d.cts +0 -19
  109. package/dist/hcl/components/block-declaration.d.cts.map +0 -1
  110. package/dist/hcl/components/block-declaration.d.mts +0 -19
  111. package/dist/hcl/components/block-declaration.d.mts.map +0 -1
  112. package/dist/hcl/components/block-declaration.mjs +0 -33
  113. package/dist/hcl/components/block-declaration.mjs.map +0 -1
  114. package/dist/hcl/components/hcl-file.cjs +0 -82
  115. package/dist/hcl/components/hcl-file.d.cts +0 -25
  116. package/dist/hcl/components/hcl-file.d.cts.map +0 -1
  117. package/dist/hcl/components/hcl-file.d.mts +0 -25
  118. package/dist/hcl/components/hcl-file.d.mts.map +0 -1
  119. package/dist/hcl/components/hcl-file.mjs +0 -81
  120. package/dist/hcl/components/hcl-file.mjs.map +0 -1
  121. package/dist/hcl/components/index.cjs +0 -11
  122. package/dist/hcl/components/index.d.cts +0 -5
  123. package/dist/hcl/components/index.d.mts +0 -5
  124. package/dist/hcl/components/index.mjs +0 -6
  125. package/dist/hcl/components/packer-file.cjs +0 -28
  126. package/dist/hcl/components/packer-file.d.cts +0 -16
  127. package/dist/hcl/components/packer-file.d.cts.map +0 -1
  128. package/dist/hcl/components/packer-file.d.mts +0 -16
  129. package/dist/hcl/components/packer-file.d.mts.map +0 -1
  130. package/dist/hcl/components/packer-file.mjs +0 -28
  131. package/dist/hcl/components/packer-file.mjs.map +0 -1
  132. package/dist/hcl/components/terraform-file.cjs +0 -29
  133. package/dist/hcl/components/terraform-file.d.cts +0 -17
  134. package/dist/hcl/components/terraform-file.d.cts.map +0 -1
  135. package/dist/hcl/components/terraform-file.d.mts +0 -17
  136. package/dist/hcl/components/terraform-file.d.mts.map +0 -1
  137. package/dist/hcl/components/terraform-file.mjs +0 -29
  138. package/dist/hcl/components/terraform-file.mjs.map +0 -1
  139. package/dist/hcl/index.cjs +0 -12
  140. package/dist/hcl/index.d.cts +0 -6
  141. package/dist/hcl/index.d.mts +0 -6
  142. package/dist/hcl/index.mjs +0 -7
  143. package/dist/markdown/components/alert.cjs +0 -74
  144. package/dist/markdown/components/alert.d.cts +0 -52
  145. package/dist/markdown/components/alert.d.cts.map +0 -1
  146. package/dist/markdown/components/alert.d.mts +0 -52
  147. package/dist/markdown/components/alert.d.mts.map +0 -1
  148. package/dist/markdown/components/alert.mjs +0 -69
  149. package/dist/markdown/components/alert.mjs.map +0 -1
  150. package/dist/markdown/components/front-matter.cjs +0 -30
  151. package/dist/markdown/components/front-matter.d.cts +0 -13
  152. package/dist/markdown/components/front-matter.d.cts.map +0 -1
  153. package/dist/markdown/components/front-matter.d.mts +0 -13
  154. package/dist/markdown/components/front-matter.d.mts.map +0 -1
  155. package/dist/markdown/components/front-matter.mjs +0 -30
  156. package/dist/markdown/components/front-matter.mjs.map +0 -1
  157. package/dist/markdown/components/heading.cjs +0 -23
  158. package/dist/markdown/components/heading.d.cts +0 -17
  159. package/dist/markdown/components/heading.d.cts.map +0 -1
  160. package/dist/markdown/components/heading.d.mts +0 -17
  161. package/dist/markdown/components/heading.d.mts.map +0 -1
  162. package/dist/markdown/components/heading.mjs +0 -23
  163. package/dist/markdown/components/heading.mjs.map +0 -1
  164. package/dist/markdown/components/index.cjs +0 -20
  165. package/dist/markdown/components/index.d.cts +0 -6
  166. package/dist/markdown/components/index.d.mts +0 -6
  167. package/dist/markdown/components/index.mjs +0 -7
  168. package/dist/markdown/components/markdown-file.cjs +0 -146
  169. package/dist/markdown/components/markdown-file.d.cts +0 -25
  170. package/dist/markdown/components/markdown-file.d.cts.map +0 -1
  171. package/dist/markdown/components/markdown-file.d.mts +0 -25
  172. package/dist/markdown/components/markdown-file.d.mts.map +0 -1
  173. package/dist/markdown/components/markdown-file.mjs +0 -145
  174. package/dist/markdown/components/markdown-file.mjs.map +0 -1
  175. package/dist/markdown/components/markdown-table.cjs +0 -106
  176. package/dist/markdown/components/markdown-table.d.cts +0 -37
  177. package/dist/markdown/components/markdown-table.d.cts.map +0 -1
  178. package/dist/markdown/components/markdown-table.d.mts +0 -37
  179. package/dist/markdown/components/markdown-table.d.mts.map +0 -1
  180. package/dist/markdown/components/markdown-table.mjs +0 -104
  181. package/dist/markdown/components/markdown-table.mjs.map +0 -1
  182. package/dist/markdown/contexts/index.cjs +0 -7
  183. package/dist/markdown/contexts/index.d.cts +0 -2
  184. package/dist/markdown/contexts/index.d.mts +0 -2
  185. package/dist/markdown/contexts/index.mjs +0 -3
  186. package/dist/markdown/contexts/markdown-table.cjs +0 -37
  187. package/dist/markdown/contexts/markdown-table.d.cts +0 -35
  188. package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
  189. package/dist/markdown/contexts/markdown-table.d.mts +0 -35
  190. package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
  191. package/dist/markdown/contexts/markdown-table.mjs +0 -34
  192. package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
  193. package/dist/markdown/index.cjs +0 -27
  194. package/dist/markdown/index.d.cts +0 -9
  195. package/dist/markdown/index.d.mts +0 -9
  196. package/dist/markdown/index.mjs +0 -10
  197. package/dist/types/components.cjs +0 -9
  198. package/dist/types/components.d.cts +0 -137
  199. package/dist/types/components.d.cts.map +0 -1
  200. package/dist/types/components.d.mts +0 -137
  201. package/dist/types/components.d.mts.map +0 -1
  202. package/dist/types/components.mjs +0 -10
  203. package/dist/types/components.mjs.map +0 -1
  204. package/dist/typescript/components/class-declaration.cjs +0 -305
  205. package/dist/typescript/components/class-declaration.d.cts +0 -139
  206. package/dist/typescript/components/class-declaration.d.cts.map +0 -1
  207. package/dist/typescript/components/class-declaration.d.mts +0 -139
  208. package/dist/typescript/components/class-declaration.d.mts.map +0 -1
  209. package/dist/typescript/components/class-declaration.mjs +0 -300
  210. package/dist/typescript/components/class-declaration.mjs.map +0 -1
  211. package/dist/typescript/components/dynamic-import-statement.cjs +0 -25
  212. package/dist/typescript/components/dynamic-import-statement.d.cts +0 -30
  213. package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
  214. package/dist/typescript/components/dynamic-import-statement.d.mts +0 -30
  215. package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
  216. package/dist/typescript/components/dynamic-import-statement.mjs +0 -25
  217. package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
  218. package/dist/typescript/components/interface-declaration.cjs +0 -257
  219. package/dist/typescript/components/interface-declaration.d.cts +0 -78
  220. package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
  221. package/dist/typescript/components/interface-declaration.d.mts +0 -78
  222. package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
  223. package/dist/typescript/components/interface-declaration.mjs +0 -254
  224. package/dist/typescript/components/interface-declaration.mjs.map +0 -1
  225. package/dist/typescript/components/object-declaration.cjs +0 -131
  226. package/dist/typescript/components/object-declaration.d.cts +0 -24
  227. package/dist/typescript/components/object-declaration.d.cts.map +0 -1
  228. package/dist/typescript/components/object-declaration.d.mts +0 -24
  229. package/dist/typescript/components/object-declaration.d.mts.map +0 -1
  230. package/dist/typescript/components/object-declaration.mjs +0 -130
  231. package/dist/typescript/components/object-declaration.mjs.map +0 -1
  232. package/dist/typescript/components/property-name.cjs +0 -31
  233. package/dist/typescript/components/property-name.d.cts +0 -21
  234. package/dist/typescript/components/property-name.d.cts.map +0 -1
  235. package/dist/typescript/components/property-name.d.mts +0 -21
  236. package/dist/typescript/components/property-name.d.mts.map +0 -1
  237. package/dist/typescript/components/property-name.mjs +0 -31
  238. package/dist/typescript/components/property-name.mjs.map +0 -1
  239. package/dist/typescript/components/record-expression.cjs +0 -12
  240. package/dist/typescript/components/record-expression.d.cts +0 -9
  241. package/dist/typescript/components/record-expression.d.cts.map +0 -1
  242. package/dist/typescript/components/record-expression.d.mts +0 -9
  243. package/dist/typescript/components/record-expression.d.mts.map +0 -1
  244. package/dist/typescript/components/record-expression.mjs +0 -12
  245. package/dist/typescript/components/record-expression.mjs.map +0 -1
  246. package/dist/typescript/components/tsdoc-schema.cjs +0 -166
  247. package/dist/typescript/components/tsdoc-schema.d.cts +0 -21
  248. package/dist/typescript/components/tsdoc-schema.d.cts.map +0 -1
  249. package/dist/typescript/components/tsdoc-schema.d.mts +0 -21
  250. package/dist/typescript/components/tsdoc-schema.d.mts.map +0 -1
  251. package/dist/typescript/components/tsdoc-schema.mjs +0 -165
  252. package/dist/typescript/components/tsdoc-schema.mjs.map +0 -1
  253. package/dist/typescript/components/tsdoc.cjs +0 -486
  254. package/dist/typescript/components/tsdoc.d.cts +0 -163
  255. package/dist/typescript/components/tsdoc.d.cts.map +0 -1
  256. package/dist/typescript/components/tsdoc.d.mts +0 -163
  257. package/dist/typescript/components/tsdoc.d.mts.map +0 -1
  258. package/dist/typescript/components/tsdoc.mjs +0 -465
  259. package/dist/typescript/components/tsdoc.mjs.map +0 -1
  260. package/dist/typescript/components/type-declaration.cjs +0 -38
  261. package/dist/typescript/components/type-declaration.d.cts +0 -15
  262. package/dist/typescript/components/type-declaration.d.cts.map +0 -1
  263. package/dist/typescript/components/type-declaration.d.mts +0 -15
  264. package/dist/typescript/components/type-declaration.d.mts.map +0 -1
  265. package/dist/typescript/components/type-declaration.mjs +0 -38
  266. package/dist/typescript/components/type-declaration.mjs.map +0 -1
  267. package/dist/typescript/components/type-parameters.cjs +0 -82
  268. package/dist/typescript/components/type-parameters.d.cts +0 -22
  269. package/dist/typescript/components/type-parameters.d.cts.map +0 -1
  270. package/dist/typescript/components/type-parameters.d.mts +0 -22
  271. package/dist/typescript/components/type-parameters.d.mts.map +0 -1
  272. package/dist/typescript/components/type-parameters.mjs +0 -82
  273. package/dist/typescript/components/type-parameters.mjs.map +0 -1
  274. package/dist/typescript/components/typescript-file.cjs +0 -231
  275. package/dist/typescript/components/typescript-file.d.cts +0 -46
  276. package/dist/typescript/components/typescript-file.d.cts.map +0 -1
  277. package/dist/typescript/components/typescript-file.d.mts +0 -46
  278. package/dist/typescript/components/typescript-file.d.mts.map +0 -1
  279. package/dist/typescript/components/typescript-file.mjs +0 -229
  280. package/dist/typescript/components/typescript-file.mjs.map +0 -1
  281. package/dist/typescript/contexts/index.cjs +0 -4
  282. package/dist/typescript/contexts/index.d.cts +0 -2
  283. package/dist/typescript/contexts/index.d.mts +0 -2
  284. package/dist/typescript/contexts/index.mjs +0 -3
  285. package/dist/typescript/contexts/lexical-scope.cjs +0 -25
  286. package/dist/typescript/contexts/lexical-scope.d.cts +0 -12
  287. package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
  288. package/dist/typescript/contexts/lexical-scope.d.mts +0 -12
  289. package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
  290. package/dist/typescript/contexts/lexical-scope.mjs +0 -25
  291. package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
  292. package/dist/typescript/contexts/member-scope.cjs +0 -23
  293. package/dist/typescript/contexts/member-scope.d.cts +0 -18
  294. package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
  295. package/dist/typescript/contexts/member-scope.d.mts +0 -18
  296. package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
  297. package/dist/typescript/contexts/member-scope.mjs +0 -23
  298. package/dist/typescript/contexts/member-scope.mjs.map +0 -1
  299. package/dist/typescript/helpers/get-call-signature-props.cjs +0 -25
  300. package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -13
  301. package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
  302. package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -13
  303. package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
  304. package/dist/typescript/helpers/get-call-signature-props.mjs +0 -25
  305. package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
  306. package/dist/typescript/helpers/index.cjs +0 -6
  307. package/dist/typescript/helpers/index.d.cts +0 -3
  308. package/dist/typescript/helpers/index.d.mts +0 -3
  309. package/dist/typescript/helpers/index.mjs +0 -4
  310. package/dist/typescript/helpers/utilities.cjs +0 -15
  311. package/dist/typescript/helpers/utilities.d.cts +0 -11
  312. package/dist/typescript/helpers/utilities.d.cts.map +0 -1
  313. package/dist/typescript/helpers/utilities.d.mts +0 -11
  314. package/dist/typescript/helpers/utilities.d.mts.map +0 -1
  315. package/dist/typescript/helpers/utilities.mjs +0 -14
  316. package/dist/typescript/helpers/utilities.mjs.map +0 -1
  317. package/dist/yaml/components/index.cjs +0 -5
  318. package/dist/yaml/components/index.d.cts +0 -2
  319. package/dist/yaml/components/index.d.mts +0 -2
  320. package/dist/yaml/components/index.mjs +0 -3
  321. package/dist/yaml/components/yaml-file.cjs +0 -148
  322. package/dist/yaml/components/yaml-file.d.cts +0 -31
  323. package/dist/yaml/components/yaml-file.d.cts.map +0 -1
  324. package/dist/yaml/components/yaml-file.d.mts +0 -31
  325. package/dist/yaml/components/yaml-file.d.mts.map +0 -1
  326. package/dist/yaml/components/yaml-file.mjs +0 -147
  327. package/dist/yaml/components/yaml-file.mjs.map +0 -1
  328. package/dist/yaml/index.cjs +0 -6
  329. package/dist/yaml/index.d.cts +0 -3
  330. package/dist/yaml/index.d.mts +0 -3
  331. package/dist/yaml/index.mjs +0 -4
@@ -1,139 +0,0 @@
1
- import { TypeParameters } from "./type-parameters.cjs";
2
- import { Children, Namekey, Refkey } from "@alloy-js/core";
3
- import { CallSignatureProps, CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
4
- //#region src/typescript/components/class-declaration.d.ts
5
- /**
6
- * Props for the ClassDeclaration component, which represents a TypeScript class declaration
7
- */
8
- interface ClassDeclarationProps extends CommonDeclarationProps {
9
- /**
10
- * An indication of whether this class is abstract
11
- */
12
- abstract?: boolean;
13
- /**
14
- * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration
15
- */
16
- extends?: Children;
17
- /**
18
- * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration
19
- */
20
- implements?: Children[];
21
- /**
22
- * The generic type parameters of the class.
23
- */
24
- typeParameters?: TypeParameterDescriptor[] | string[];
25
- }
26
- /**
27
- * Create a TypeScript class declaration.
28
- *
29
- * @example
30
- * ```tsx
31
- * const myPetRefkey = refkey();
32
- * const Animal = refkey();
33
- * const staticMember = refkey();
34
- * const instanceMember = refkey();
35
- *
36
- * <ClassDeclaration name="Animal" refkey={Animal}>
37
- * <ClassMember public static name="something" type="string" refkey={staticMember}>
38
- * "hello"
39
- * </ClassMember>
40
- * <ClassMember public name="kind" type="string" />
41
- * <ClassMember public name="name" type="string" refkey={instanceMember} />
42
- * <ClassConstructor parameters="name: string">
43
- * this.name = name;
44
- * </ClassConstructor>
45
- * </ClassDeclaration>
46
- *
47
- * <VarDeclaration const name="myPet" refkey={myPetRefkey}>
48
- * new {Animal}();
49
- * </VarDeclaration>
50
- *
51
- * {staticMember}; // Animal.something
52
- * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
53
- * {memberRefkey(myPetRefkey, instanceMember)}
54
- * ```
55
- */
56
- declare function ClassDeclaration(props: ClassDeclarationProps): Children;
57
- declare namespace ClassDeclaration {
58
- var TypeParameters: typeof TypeParameters;
59
- }
60
- /**
61
- * Generates a TypeScript class member declaration for the given reflection class.
62
- */
63
- interface ClassMemberProps {
64
- name: string | Namekey;
65
- refkey?: Refkey;
66
- public?: boolean;
67
- private?: boolean;
68
- protected?: boolean;
69
- jsPrivate?: boolean;
70
- static?: boolean;
71
- abstract?: boolean;
72
- children?: Children;
73
- doc?: Children;
74
- nullish?: boolean;
75
- override?: boolean;
76
- }
77
- /**
78
- * Generates a TypeScript class member declaration for the given reflection class.
79
- *
80
- * @param props - The properties of the class member, including its name, visibility, and other modifiers.
81
- * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.
82
- */
83
- declare function ClassMember(props: ClassMemberProps): Children;
84
- /**
85
- * Props for a class field, which is a specific type of class member that represents a property of the class.
86
- */
87
- interface ClassFieldProps extends ClassMemberProps {
88
- name: string;
89
- type?: Children;
90
- optional?: boolean;
91
- children?: Children;
92
- isPrivateMember?: boolean;
93
- }
94
- /**
95
- * Generates a TypeScript class field declaration for the given reflection class.
96
- *
97
- * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.
98
- * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.
99
- */
100
- declare function ClassField(props: ClassFieldProps): Children;
101
- /**
102
- * Props for a class field, which is a specific type of class member that represents a property of the class.
103
- */
104
- interface ClassPropertyProps extends ClassMemberProps {
105
- name: string;
106
- type?: Children;
107
- children?: Children;
108
- }
109
- /**
110
- * Generates a TypeScript class property setter declaration for the given reflection class.
111
- *
112
- * @param props - The properties of the class property, including its name, type, and other modifiers.
113
- * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.
114
- */
115
- declare function ClassPropertySet(props: ClassPropertyProps): Children;
116
- /**
117
- * Generates a TypeScript class property getter declaration for the given reflection class.
118
- *
119
- * @param props - The properties of the class property, including its name, type, and other modifiers.
120
- * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.
121
- */
122
- declare function ClassPropertyGet(props: ClassPropertyProps): Children;
123
- /**
124
- * Props for a class method, which is a specific type of class member that represents a function defined within the class.
125
- */
126
- interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {
127
- async?: boolean;
128
- children?: Children;
129
- }
130
- /**
131
- * Generates a TypeScript class method declaration for the given reflection class.
132
- *
133
- * @param props - The properties of the class method, including its name, visibility, and other modifiers.
134
- * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.
135
- */
136
- declare function ClassMethod(props: ClassMethodProps): Children;
137
- //#endregion
138
- export { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet };
139
- //# sourceMappingURL=class-declaration.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":";;;;;;;UAoDiB,8BAA8B;;;;EAI7C;;;;EAKA,UAAU;;;;EAKV,aAAa;;;;EAKb,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiCH,iBAAiB,OAAO,wBAAqB;kBAA7C;6BAAA;;;;;UA4CC;EACf,eAAe;EACf,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,MAAM;EACN;EACA;;;;;;;;iBASc,YAAY,OAAO,mBAAgB;;;;UAiClC,wBAAwB;EACvC;EACA,OAAO;EACP;EACA,WAAW;EACX;;;;;;;;iBASc,WAAW,OAAO,kBAAe;;;;UAyBhC,2BAA2B;EAC1C;EACA,OAAO;EACP,WAAW;;;;;;;;iBASG,iBAAiB,OAAO,qBAAkB;;;;;;;iBA4B1C,iBAAiB,OAAO,qBAAkB;;;;UAkBzC,yBAAyB,kBAAkB;EAC1D;EACA,WAAW;;;;;;;;iBASG,YAAY,OAAO,mBAAgB"}
@@ -1,139 +0,0 @@
1
- import { TypeParameters } from "./type-parameters.mjs";
2
- import { Children, Namekey, Refkey } from "@alloy-js/core";
3
- import { CallSignatureProps, CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
4
- //#region src/typescript/components/class-declaration.d.ts
5
- /**
6
- * Props for the ClassDeclaration component, which represents a TypeScript class declaration
7
- */
8
- interface ClassDeclarationProps extends CommonDeclarationProps {
9
- /**
10
- * An indication of whether this class is abstract
11
- */
12
- abstract?: boolean;
13
- /**
14
- * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration
15
- */
16
- extends?: Children;
17
- /**
18
- * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration
19
- */
20
- implements?: Children[];
21
- /**
22
- * The generic type parameters of the class.
23
- */
24
- typeParameters?: TypeParameterDescriptor[] | string[];
25
- }
26
- /**
27
- * Create a TypeScript class declaration.
28
- *
29
- * @example
30
- * ```tsx
31
- * const myPetRefkey = refkey();
32
- * const Animal = refkey();
33
- * const staticMember = refkey();
34
- * const instanceMember = refkey();
35
- *
36
- * <ClassDeclaration name="Animal" refkey={Animal}>
37
- * <ClassMember public static name="something" type="string" refkey={staticMember}>
38
- * "hello"
39
- * </ClassMember>
40
- * <ClassMember public name="kind" type="string" />
41
- * <ClassMember public name="name" type="string" refkey={instanceMember} />
42
- * <ClassConstructor parameters="name: string">
43
- * this.name = name;
44
- * </ClassConstructor>
45
- * </ClassDeclaration>
46
- *
47
- * <VarDeclaration const name="myPet" refkey={myPetRefkey}>
48
- * new {Animal}();
49
- * </VarDeclaration>
50
- *
51
- * {staticMember}; // Animal.something
52
- * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
53
- * {memberRefkey(myPetRefkey, instanceMember)}
54
- * ```
55
- */
56
- declare function ClassDeclaration(props: ClassDeclarationProps): Children;
57
- declare namespace ClassDeclaration {
58
- var TypeParameters: typeof TypeParameters;
59
- }
60
- /**
61
- * Generates a TypeScript class member declaration for the given reflection class.
62
- */
63
- interface ClassMemberProps {
64
- name: string | Namekey;
65
- refkey?: Refkey;
66
- public?: boolean;
67
- private?: boolean;
68
- protected?: boolean;
69
- jsPrivate?: boolean;
70
- static?: boolean;
71
- abstract?: boolean;
72
- children?: Children;
73
- doc?: Children;
74
- nullish?: boolean;
75
- override?: boolean;
76
- }
77
- /**
78
- * Generates a TypeScript class member declaration for the given reflection class.
79
- *
80
- * @param props - The properties of the class member, including its name, visibility, and other modifiers.
81
- * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.
82
- */
83
- declare function ClassMember(props: ClassMemberProps): Children;
84
- /**
85
- * Props for a class field, which is a specific type of class member that represents a property of the class.
86
- */
87
- interface ClassFieldProps extends ClassMemberProps {
88
- name: string;
89
- type?: Children;
90
- optional?: boolean;
91
- children?: Children;
92
- isPrivateMember?: boolean;
93
- }
94
- /**
95
- * Generates a TypeScript class field declaration for the given reflection class.
96
- *
97
- * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.
98
- * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.
99
- */
100
- declare function ClassField(props: ClassFieldProps): Children;
101
- /**
102
- * Props for a class field, which is a specific type of class member that represents a property of the class.
103
- */
104
- interface ClassPropertyProps extends ClassMemberProps {
105
- name: string;
106
- type?: Children;
107
- children?: Children;
108
- }
109
- /**
110
- * Generates a TypeScript class property setter declaration for the given reflection class.
111
- *
112
- * @param props - The properties of the class property, including its name, type, and other modifiers.
113
- * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.
114
- */
115
- declare function ClassPropertySet(props: ClassPropertyProps): Children;
116
- /**
117
- * Generates a TypeScript class property getter declaration for the given reflection class.
118
- *
119
- * @param props - The properties of the class property, including its name, type, and other modifiers.
120
- * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.
121
- */
122
- declare function ClassPropertyGet(props: ClassPropertyProps): Children;
123
- /**
124
- * Props for a class method, which is a specific type of class member that represents a function defined within the class.
125
- */
126
- interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {
127
- async?: boolean;
128
- children?: Children;
129
- }
130
- /**
131
- * Generates a TypeScript class method declaration for the given reflection class.
132
- *
133
- * @param props - The properties of the class method, including its name, visibility, and other modifiers.
134
- * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.
135
- */
136
- declare function ClassMethod(props: ClassMethodProps): Children;
137
- //#endregion
138
- export { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet };
139
- //# sourceMappingURL=class-declaration.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-declaration.d.mts","names":[],"sources":["../../../src/typescript/components/class-declaration.tsx"],"mappings":""}
@@ -1,300 +0,0 @@
1
- import { TSDoc, TSDocParams } from "./tsdoc.mjs";
2
- import { LexicalScope } from "../contexts/lexical-scope.mjs";
3
- import "../contexts/index.mjs";
4
- import { MemberScope as MemberScope$1 } from "../contexts/member-scope.mjs";
5
- import { getCallSignatureProps } from "../helpers/get-call-signature-props.mjs";
6
- import "../helpers/index.mjs";
7
- import { PropertyName } from "./property-name.mjs";
8
- import { TypeParameters } from "./type-parameters.mjs";
9
- import { createComponent, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
10
- import { Block, For, MemberDeclaration, Name, Show, code, splitProps } from "@alloy-js/core";
11
- import { CallSignature, Declaration as Declaration$1, TSSymbolFlags, TypeRefContext, createMemberSymbol, createTypeAndValueSymbol, useTSNamePolicy } from "@alloy-js/typescript";
12
-
13
- //#region src/typescript/components/class-declaration.tsx
14
- /**
15
- * Props for the ClassDeclaration component, which represents a TypeScript class declaration
16
- */
17
- /**
18
- * Create a TypeScript class declaration.
19
- *
20
- * @example
21
- * ```tsx
22
- * const myPetRefkey = refkey();
23
- * const Animal = refkey();
24
- * const staticMember = refkey();
25
- * const instanceMember = refkey();
26
- *
27
- * <ClassDeclaration name="Animal" refkey={Animal}>
28
- * <ClassMember public static name="something" type="string" refkey={staticMember}>
29
- * "hello"
30
- * </ClassMember>
31
- * <ClassMember public name="kind" type="string" />
32
- * <ClassMember public name="name" type="string" refkey={instanceMember} />
33
- * <ClassConstructor parameters="name: string">
34
- * this.name = name;
35
- * </ClassConstructor>
36
- * </ClassDeclaration>
37
- *
38
- * <VarDeclaration const name="myPet" refkey={myPetRefkey}>
39
- * new {Animal}();
40
- * </VarDeclaration>
41
- *
42
- * {staticMember}; // Animal.something
43
- * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
44
- * {memberRefkey(myPetRefkey, instanceMember)}
45
- * ```
46
- */
47
- function ClassDeclaration(props) {
48
- const extendsPart = props.extends && [" extends ", memo(() => props.extends)];
49
- const implementsPart = props.implements && props.implements.length > 0 && [
50
- " ",
51
- "implements",
52
- " ",
53
- createComponent(For, {
54
- get each() {
55
- return props.implements;
56
- },
57
- comma: true,
58
- space: true,
59
- children: (implement) => implement
60
- })
61
- ];
62
- const sym = createTypeAndValueSymbol(props.name, {
63
- refkeys: props.refkey,
64
- export: props.export,
65
- default: props.default,
66
- metadata: props.metadata,
67
- hasInstanceMembers: true,
68
- namePolicy: useTSNamePolicy().for("class")
69
- });
70
- return [createComponent(Show, {
71
- get when() {
72
- return Boolean(props.doc);
73
- },
74
- get children() {
75
- return createComponent(TSDoc, { get heading() {
76
- return props.doc;
77
- } });
78
- }
79
- }), createComponent(Declaration$1, {
80
- symbol: sym,
81
- get ["export"]() {
82
- return props.export;
83
- },
84
- get ["default"]() {
85
- return props.default;
86
- },
87
- get children() {
88
- return createComponent(MemberScope$1, {
89
- ownerSymbol: sym,
90
- get children() {
91
- return [
92
- memo(() => props.abstract && code`abstract `),
93
- " class ",
94
- createComponent(Name, {}),
95
- memo(() => memo(() => !!props.typeParameters)() && createComponent(TypeParameters, { get parameters() {
96
- return props.typeParameters;
97
- } })),
98
- extendsPart,
99
- implementsPart,
100
- " ",
101
- createComponent(Block, { get children() {
102
- return props.children;
103
- } })
104
- ];
105
- }
106
- });
107
- }
108
- })];
109
- }
110
- ClassDeclaration.TypeParameters = TypeParameters;
111
- /**
112
- * Generates a TypeScript class member declaration for the given reflection class.
113
- */
114
- /**
115
- * Generates a TypeScript class member declaration for the given reflection class.
116
- *
117
- * @param props - The properties of the class member, including its name, visibility, and other modifiers.
118
- * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.
119
- */
120
- function ClassMember(props) {
121
- let tsFlags = TSSymbolFlags.None;
122
- if (props.nullish) tsFlags |= TSSymbolFlags.Nullish;
123
- const sym = createMemberSymbol(props.name, props, {
124
- refkeys: props.refkey,
125
- tsFlags,
126
- namePolicy: useTSNamePolicy().for("class-member-data")
127
- });
128
- return [createComponent(Show, {
129
- get when() {
130
- return Boolean(props.doc);
131
- },
132
- get children() {
133
- return createComponent(TSDoc, { get heading() {
134
- return props.doc;
135
- } });
136
- }
137
- }), createComponent(MemberDeclaration, {
138
- symbol: sym,
139
- get children() {
140
- return [
141
- memo(() => props.public && "public "),
142
- memo(() => props.private && "private "),
143
- memo(() => props.protected && "protected "),
144
- memo(() => props.abstract && "abstract "),
145
- memo(() => props.override && "override "),
146
- memo(() => props.static && "static "),
147
- memo(() => props.children)
148
- ];
149
- }
150
- })];
151
- }
152
- /**
153
- * Props for a class field, which is a specific type of class member that represents a property of the class.
154
- */
155
- /**
156
- * Generates a TypeScript class field declaration for the given reflection class.
157
- *
158
- * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.
159
- * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.
160
- */
161
- function ClassField(props) {
162
- const optionality = props.optional ? "?" : "";
163
- const typeSection = props.type && [
164
- optionality,
165
- ": ",
166
- createComponent(TypeRefContext, { get children() {
167
- return props.type;
168
- } })
169
- ];
170
- const initializerSection = props.children && [" = ", memo(() => props.children)];
171
- return createComponent(ClassMember, mergeProps(props, {
172
- nullish: props.nullish ?? props.optional,
173
- get children() {
174
- return [
175
- createComponent(PropertyName, {
176
- get ["private"]() {
177
- return props.isPrivateMember;
178
- },
179
- get name() {
180
- return props.isPrivateMember ? props.name : void 0;
181
- }
182
- }),
183
- typeSection,
184
- initializerSection
185
- ];
186
- }
187
- }));
188
- }
189
- /**
190
- * Props for a class field, which is a specific type of class member that represents a property of the class.
191
- */
192
- /**
193
- * Generates a TypeScript class property setter declaration for the given reflection class.
194
- *
195
- * @param props - The properties of the class property, including its name, type, and other modifiers.
196
- * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.
197
- */
198
- function ClassPropertySet(props) {
199
- return [createComponent(ClassMember, mergeProps(props, { get children() {
200
- return [
201
- "set ",
202
- createComponent(PropertyName, { get name() {
203
- return props.name;
204
- } }),
205
- createComponent(LexicalScope, { get children() {
206
- return [
207
- createComponent(CallSignature, { get parameters() {
208
- return [{
209
- name: "value",
210
- type: createComponent(TypeRefContext, { get children() {
211
- return props.type;
212
- } })
213
- }];
214
- } }),
215
- " ",
216
- createComponent(Block, { get children() {
217
- return props.children;
218
- } })
219
- ];
220
- } })
221
- ];
222
- } }))];
223
- }
224
- /**
225
- * Generates a TypeScript class property getter declaration for the given reflection class.
226
- *
227
- * @param props - The properties of the class property, including its name, type, and other modifiers.
228
- * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.
229
- */
230
- function ClassPropertyGet(props) {
231
- return createComponent(ClassMember, mergeProps(props, { get children() {
232
- return [
233
- "get ",
234
- createComponent(PropertyName, { get name() {
235
- return props.name;
236
- } }),
237
- createComponent(LexicalScope, { get children() {
238
- return [
239
- createComponent(CallSignature, { get returnType() {
240
- return createComponent(TypeRefContext, { get children() {
241
- return props.type;
242
- } });
243
- } }),
244
- " ",
245
- createComponent(Block, { get children() {
246
- return props.children;
247
- } })
248
- ];
249
- } })
250
- ];
251
- } }));
252
- }
253
- /**
254
- * Props for a class method, which is a specific type of class member that represents a function defined within the class.
255
- */
256
- /**
257
- * Generates a TypeScript class method declaration for the given reflection class.
258
- *
259
- * @param props - The properties of the class method, including its name, visibility, and other modifiers.
260
- * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.
261
- */
262
- function ClassMethod(props) {
263
- const callProps = getCallSignatureProps(props);
264
- const [_, rest] = splitProps(props, ["doc"]);
265
- return [createComponent(Show, {
266
- get when() {
267
- return Boolean(props.doc);
268
- },
269
- get children() {
270
- return createComponent(TSDoc, {
271
- get heading() {
272
- return props.doc;
273
- },
274
- get children() {
275
- return memo(() => !!Array.isArray(rest.parameters))() && createComponent(TSDocParams, { get parameters() {
276
- return rest.parameters;
277
- } });
278
- }
279
- });
280
- }
281
- }), createComponent(ClassMember, mergeProps(rest, { get children() {
282
- return [
283
- memo(() => props.async && "async "),
284
- createComponent(PropertyName, {}),
285
- createComponent(LexicalScope, { get children() {
286
- return [
287
- createComponent(CallSignature, callProps),
288
- " ",
289
- createComponent(Block, { get children() {
290
- return props.children;
291
- } })
292
- ];
293
- } })
294
- ];
295
- } }))];
296
- }
297
-
298
- //#endregion
299
- export { ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet };
300
- //# sourceMappingURL=class-declaration.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"class-declaration.mjs","names":[],"sources":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
3
- let _alloy_js_core = require("@alloy-js/core");
4
- let _alloy_js_typescript = require("@alloy-js/typescript");
5
-
6
- //#region src/typescript/components/dynamic-import-statement.tsx
7
- /**
8
- * Generates a dynamic import statement for a given module path and export name.
9
- *
10
- * @example
11
- * ```tsx
12
- * <DynamicImportStatement importPath="./my-module" exportName="myExport" const={true} name="myVar" />
13
- * // const myVar = await import("./my-module").then(m => m.myExport);
14
- * ```
15
- *
16
- * @param props - The properties for the dynamic import statement.
17
- * @returns A `VarDeclaration` component representing the dynamic import statement.
18
- */
19
- function DynamicImportStatement(props) {
20
- const { importPath, exportName = "default", const: isConst = true, ...rest } = props;
21
- return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_typescript.VarDeclaration, (0, _alloy_js_core_jsx_runtime.mergeProps)({ "const": isConst }, rest, { initializer: _alloy_js_core.code`await import("${importPath}").then(m => m.${exportName});` }));
22
- }
23
-
24
- //#endregion
25
- exports.DynamicImportStatement = DynamicImportStatement;
@@ -1,30 +0,0 @@
1
- import { VarDeclarationProps } from "@alloy-js/typescript";
2
- //#region src/typescript/components/dynamic-import-statement.d.ts
3
- interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initializer"> {
4
- /**
5
- * The path of the module to import.
6
- */
7
- importPath: string;
8
- /**
9
- * The name of the export to import from the module.
10
- *
11
- * @defaultValue "default"
12
- */
13
- exportName?: string;
14
- }
15
- /**
16
- * Generates a dynamic import statement for a given module path and export name.
17
- *
18
- * @example
19
- * ```tsx
20
- * <DynamicImportStatement importPath="./my-module" exportName="myExport" const={true} name="myVar" />
21
- * // const myVar = await import("./my-module").then(m => m.myExport);
22
- * ```
23
- *
24
- * @param props - The properties for the dynamic import statement.
25
- * @returns A `VarDeclaration` component representing the dynamic import statement.
26
- */
27
- declare function DynamicImportStatement(props: DynamicImportStatementProps): import("@alloy-js/core").Children;
28
- //#endregion
29
- export { DynamicImportStatement, DynamicImportStatementProps };
30
- //# sourceMappingURL=dynamic-import-statement.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-import-statement.d.cts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":";;UAqBiB,oCAAoC,KACnD;;;;EAMA;;;;;;EAOA;;;;;;;;;;;;;;iBAec,uBAAuB,OAAO,uDAA2B"}
@@ -1,30 +0,0 @@
1
- import { VarDeclarationProps } from "@alloy-js/typescript";
2
- //#region src/typescript/components/dynamic-import-statement.d.ts
3
- interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initializer"> {
4
- /**
5
- * The path of the module to import.
6
- */
7
- importPath: string;
8
- /**
9
- * The name of the export to import from the module.
10
- *
11
- * @defaultValue "default"
12
- */
13
- exportName?: string;
14
- }
15
- /**
16
- * Generates a dynamic import statement for a given module path and export name.
17
- *
18
- * @example
19
- * ```tsx
20
- * <DynamicImportStatement importPath="./my-module" exportName="myExport" const={true} name="myVar" />
21
- * // const myVar = await import("./my-module").then(m => m.myExport);
22
- * ```
23
- *
24
- * @param props - The properties for the dynamic import statement.
25
- * @returns A `VarDeclaration` component representing the dynamic import statement.
26
- */
27
- declare function DynamicImportStatement(props: DynamicImportStatementProps): import("@alloy-js/core").Children;
28
- //#endregion
29
- export { DynamicImportStatement, DynamicImportStatementProps };
30
- //# sourceMappingURL=dynamic-import-statement.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamic-import-statement.d.mts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"mappings":""}