@alloy-js/csharp 0.20.0-dev.1 → 0.20.0-dev.10

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 (391) hide show
  1. package/dist/src/components/Declaration.d.ts +2 -2
  2. package/dist/src/components/Declaration.d.ts.map +1 -1
  3. package/dist/src/components/Declaration.js +5 -14
  4. package/dist/src/components/Declaration.js.map +1 -0
  5. package/dist/src/components/Name.js +2 -1
  6. package/dist/src/components/Name.js.map +1 -0
  7. package/dist/src/components/ProjectDirectory.js +2 -1
  8. package/dist/src/components/ProjectDirectory.js.map +1 -0
  9. package/dist/src/components/Reference.d.ts.map +1 -1
  10. package/dist/src/components/Reference.js +7 -2
  11. package/dist/src/components/Reference.js.map +1 -0
  12. package/dist/src/components/UsingDirective.d.ts +5 -1
  13. package/dist/src/components/UsingDirective.d.ts.map +1 -1
  14. package/dist/src/components/UsingDirective.js +5 -2
  15. package/dist/src/components/UsingDirective.js.map +1 -0
  16. package/dist/src/components/access-expression/access-expression.d.ts +54 -0
  17. package/dist/src/components/access-expression/access-expression.d.ts.map +1 -0
  18. package/dist/src/components/access-expression/access-expression.js +277 -0
  19. package/dist/src/components/access-expression/access-expression.js.map +1 -0
  20. package/dist/src/components/access-expression/access-expression.test.d.ts +2 -0
  21. package/dist/src/components/access-expression/access-expression.test.d.ts.map +1 -0
  22. package/dist/src/components/access-expression/access-expression.test.js +336 -0
  23. package/dist/src/components/access-expression/access-expression.test.js.map +1 -0
  24. package/dist/src/components/access-expression/part-descriptors.d.ts +32 -0
  25. package/dist/src/components/access-expression/part-descriptors.d.ts.map +1 -0
  26. package/dist/src/components/access-expression/part-descriptors.js +99 -0
  27. package/dist/src/components/access-expression/part-descriptors.js.map +1 -0
  28. package/dist/src/components/attributes/attributes.js +2 -1
  29. package/dist/src/components/attributes/attributes.js.map +1 -0
  30. package/dist/src/components/attributes/attributes.test.js +2 -1
  31. package/dist/src/components/attributes/attributes.test.js.map +1 -0
  32. package/dist/src/components/class/declaration.d.ts +2 -2
  33. package/dist/src/components/class/declaration.d.ts.map +1 -1
  34. package/dist/src/components/class/declaration.js +21 -34
  35. package/dist/src/components/class/declaration.js.map +1 -0
  36. package/dist/src/components/class/declaration.test.js +199 -200
  37. package/dist/src/components/class/declaration.test.js.map +1 -0
  38. package/dist/src/components/constructor/constructor.d.ts.map +1 -1
  39. package/dist/src/components/constructor/constructor.js +13 -20
  40. package/dist/src/components/constructor/constructor.js.map +1 -0
  41. package/dist/src/components/constructor/constructor.test.js +12 -20
  42. package/dist/src/components/constructor/constructor.test.js.map +1 -0
  43. package/dist/src/components/doc/comment.js +2 -1
  44. package/dist/src/components/doc/comment.js.map +1 -0
  45. package/dist/src/components/doc/comment.test.js +2 -1
  46. package/dist/src/components/doc/comment.test.js.map +1 -0
  47. package/dist/src/components/doc/from-markdown.js +2 -1
  48. package/dist/src/components/doc/from-markdown.js.map +1 -0
  49. package/dist/src/components/doc/from-markdown.test.js +2 -1
  50. package/dist/src/components/doc/from-markdown.test.js.map +1 -0
  51. package/dist/src/components/{EnumDeclaration.d.ts → enum/declaration.d.ts} +6 -11
  52. package/dist/src/components/enum/declaration.d.ts.map +1 -0
  53. package/dist/src/components/enum/declaration.js +55 -0
  54. package/dist/src/components/enum/declaration.js.map +1 -0
  55. package/dist/src/components/enum/declaration.ref.test.d.ts +2 -0
  56. package/dist/src/components/enum/declaration.ref.test.d.ts.map +1 -0
  57. package/dist/src/components/enum/declaration.ref.test.js +121 -0
  58. package/dist/src/components/enum/declaration.ref.test.js.map +1 -0
  59. package/dist/src/components/enum/declaration.test.d.ts +2 -0
  60. package/dist/src/components/enum/declaration.test.d.ts.map +1 -0
  61. package/dist/src/components/enum/declaration.test.js +40 -0
  62. package/dist/src/components/enum/declaration.test.js.map +1 -0
  63. package/dist/src/components/enum/member.d.ts +7 -0
  64. package/dist/src/components/enum/member.d.ts.map +1 -0
  65. package/dist/src/components/enum/member.js +30 -0
  66. package/dist/src/components/enum/member.js.map +1 -0
  67. package/dist/src/components/enum/member.test.d.ts +2 -0
  68. package/dist/src/components/enum/member.test.d.ts.map +1 -0
  69. package/dist/src/components/enum/member.test.js +29 -0
  70. package/dist/src/components/enum/member.test.js.map +1 -0
  71. package/dist/src/components/field/field.d.ts.map +1 -1
  72. package/dist/src/components/field/field.js +11 -18
  73. package/dist/src/components/field/field.js.map +1 -0
  74. package/dist/src/components/field/field.test.js +9 -8
  75. package/dist/src/components/field/field.test.js.map +1 -0
  76. package/dist/src/components/index.d.ts +7 -3
  77. package/dist/src/components/index.d.ts.map +1 -1
  78. package/dist/src/components/index.js +9 -4
  79. package/dist/src/components/index.js.map +1 -0
  80. package/dist/src/components/interface/declaration.d.ts.map +1 -1
  81. package/dist/src/components/interface/declaration.js +21 -22
  82. package/dist/src/components/interface/declaration.js.map +1 -0
  83. package/dist/src/components/interface/declaration.test.js +28 -36
  84. package/dist/src/components/interface/declaration.test.js.map +1 -0
  85. package/dist/src/components/interface/method.d.ts.map +1 -1
  86. package/dist/src/components/interface/method.js +9 -19
  87. package/dist/src/components/interface/method.js.map +1 -0
  88. package/dist/src/components/interface/method.test.js +40 -48
  89. package/dist/src/components/interface/method.test.js.map +1 -0
  90. package/dist/src/components/interface/property.d.ts.map +1 -1
  91. package/dist/src/components/interface/property.js +23 -40
  92. package/dist/src/components/interface/property.js.map +1 -0
  93. package/dist/src/components/interface/property.test.js +13 -12
  94. package/dist/src/components/interface/property.test.js.map +1 -0
  95. package/dist/src/components/invocation-expression/invocation-expression.d.ts +29 -0
  96. package/dist/src/components/invocation-expression/invocation-expression.d.ts.map +1 -0
  97. package/dist/src/components/invocation-expression/invocation-expression.js +70 -0
  98. package/dist/src/components/invocation-expression/invocation-expression.js.map +1 -0
  99. package/dist/src/components/invocation-expression/invocation-expression.test.d.ts +2 -0
  100. package/dist/src/components/invocation-expression/invocation-expression.test.d.ts.map +1 -0
  101. package/dist/src/components/invocation-expression/invocation-expression.test.js +105 -0
  102. package/dist/src/components/invocation-expression/invocation-expression.test.js.map +1 -0
  103. package/dist/src/components/lexical-scope.d.ts +8 -0
  104. package/dist/src/components/lexical-scope.d.ts.map +1 -0
  105. package/dist/src/components/lexical-scope.js +25 -0
  106. package/dist/src/components/lexical-scope.js.map +1 -0
  107. package/dist/src/components/method/method.d.ts +5 -2
  108. package/dist/src/components/method/method.d.ts.map +1 -1
  109. package/dist/src/components/method/method.js +9 -17
  110. package/dist/src/components/method/method.js.map +1 -0
  111. package/dist/src/components/method/method.test.js +13 -12
  112. package/dist/src/components/method/method.test.js.map +1 -0
  113. package/dist/src/components/method-scope.d.ts +8 -0
  114. package/dist/src/components/method-scope.d.ts.map +1 -0
  115. package/dist/src/components/method-scope.js +25 -0
  116. package/dist/src/components/method-scope.js.map +1 -0
  117. package/dist/src/components/namespace-scopes.d.ts +13 -0
  118. package/dist/src/components/namespace-scopes.d.ts.map +1 -0
  119. package/dist/src/components/namespace-scopes.js +45 -0
  120. package/dist/src/components/namespace-scopes.js.map +1 -0
  121. package/dist/src/components/namespace.d.ts +7 -0
  122. package/dist/src/components/namespace.d.ts.map +1 -0
  123. package/dist/src/components/namespace.js +47 -0
  124. package/dist/src/components/namespace.js.map +1 -0
  125. package/dist/src/components/namespace.ref.test.d.ts +2 -0
  126. package/dist/src/components/namespace.ref.test.d.ts.map +1 -0
  127. package/dist/src/components/namespace.ref.test.js +182 -0
  128. package/dist/src/components/namespace.ref.test.js.map +1 -0
  129. package/dist/src/components/namespace.test.d.ts.map +1 -0
  130. package/dist/src/components/namespace.test.js +79 -0
  131. package/dist/src/components/namespace.test.js.map +1 -0
  132. package/dist/src/components/parameters/parameters.d.ts +2 -3
  133. package/dist/src/components/parameters/parameters.d.ts.map +1 -1
  134. package/dist/src/components/parameters/parameters.js +15 -15
  135. package/dist/src/components/parameters/parameters.js.map +1 -0
  136. package/dist/src/components/parameters/parameters.test.d.ts +2 -0
  137. package/dist/src/components/parameters/parameters.test.d.ts.map +1 -0
  138. package/dist/src/components/parameters/parameters.test.js +154 -0
  139. package/dist/src/components/parameters/parameters.test.js.map +1 -0
  140. package/dist/src/components/property/property.d.ts +2 -2
  141. package/dist/src/components/property/property.d.ts.map +1 -1
  142. package/dist/src/components/property/property.js +30 -40
  143. package/dist/src/components/property/property.js.map +1 -0
  144. package/dist/src/components/property/property.test.js +16 -15
  145. package/dist/src/components/property/property.test.js.map +1 -0
  146. package/dist/src/components/record/declaration.d.ts +18 -0
  147. package/dist/src/components/record/declaration.d.ts.map +1 -1
  148. package/dist/src/components/record/declaration.js +21 -14
  149. package/dist/src/components/record/declaration.js.map +1 -0
  150. package/dist/src/components/record/declaration.test.js +52 -4
  151. package/dist/src/components/record/declaration.test.js.map +1 -0
  152. package/dist/src/components/source-file/source-file.d.ts +19 -0
  153. package/dist/src/components/source-file/source-file.d.ts.map +1 -0
  154. package/dist/src/components/source-file/source-file.js +59 -0
  155. package/dist/src/components/source-file/source-file.js.map +1 -0
  156. package/dist/src/components/source-file/source-file.test.d.ts +2 -0
  157. package/dist/src/components/source-file/source-file.test.d.ts.map +1 -0
  158. package/dist/src/components/source-file/source-file.test.js +136 -0
  159. package/dist/src/components/source-file/source-file.test.js.map +1 -0
  160. package/dist/src/components/stc/index.js +2 -1
  161. package/dist/src/components/stc/index.js.map +1 -0
  162. package/dist/src/components/struct/declaration.d.ts.map +1 -1
  163. package/dist/src/components/struct/declaration.js +6 -7
  164. package/dist/src/components/struct/declaration.js.map +1 -0
  165. package/dist/src/components/struct/declaration.test.js +32 -40
  166. package/dist/src/components/struct/declaration.test.js.map +1 -0
  167. package/dist/src/components/type-parameters/type-parameter-constraints.js +2 -1
  168. package/dist/src/components/type-parameters/type-parameter-constraints.js.map +1 -0
  169. package/dist/src/components/type-parameters/type-parameter-constraints.test.js +2 -1
  170. package/dist/src/components/type-parameters/type-parameter-constraints.test.js.map +1 -0
  171. package/dist/src/components/type-parameters/type-parameter.d.ts.map +1 -1
  172. package/dist/src/components/type-parameters/type-parameter.js +9 -11
  173. package/dist/src/components/type-parameters/type-parameter.js.map +1 -0
  174. package/dist/src/components/type-parameters/type-parameters.js +2 -1
  175. package/dist/src/components/type-parameters/type-parameters.js.map +1 -0
  176. package/dist/src/components/type-parameters/type-parameters.test.js +5 -4
  177. package/dist/src/components/type-parameters/type-parameters.test.js.map +1 -0
  178. package/dist/src/components/var/declaration.d.ts.map +1 -1
  179. package/dist/src/components/var/declaration.js +8 -9
  180. package/dist/src/components/var/declaration.js.map +1 -0
  181. package/dist/src/components/var/declaration.test.js +13 -21
  182. package/dist/src/components/var/declaration.test.js.map +1 -0
  183. package/dist/src/contexts/format-options.d.ts +5 -0
  184. package/dist/src/contexts/format-options.d.ts.map +1 -0
  185. package/dist/src/contexts/format-options.js +9 -0
  186. package/dist/src/contexts/format-options.js.map +1 -0
  187. package/dist/src/contexts/global-namespace.d.ts +5 -0
  188. package/dist/src/contexts/global-namespace.d.ts.map +1 -0
  189. package/dist/src/contexts/global-namespace.js +25 -0
  190. package/dist/src/contexts/global-namespace.js.map +1 -0
  191. package/dist/src/contexts/namespace.d.ts +8 -0
  192. package/dist/src/contexts/namespace.d.ts.map +1 -0
  193. package/dist/src/contexts/namespace.js +6 -0
  194. package/dist/src/contexts/namespace.js.map +1 -0
  195. package/dist/src/index.d.ts +2 -0
  196. package/dist/src/index.d.ts.map +1 -1
  197. package/dist/src/index.js +4 -1
  198. package/dist/src/index.js.map +1 -0
  199. package/dist/src/modifiers.d.ts +11 -0
  200. package/dist/src/modifiers.d.ts.map +1 -1
  201. package/dist/src/modifiers.js +2 -1
  202. package/dist/src/modifiers.js.map +1 -0
  203. package/dist/src/name-policy.js +2 -1
  204. package/dist/src/name-policy.js.map +1 -0
  205. package/dist/src/scopes/class.d.ts +10 -0
  206. package/dist/src/scopes/class.d.ts.map +1 -0
  207. package/dist/src/scopes/class.js +11 -0
  208. package/dist/src/scopes/class.js.map +1 -0
  209. package/dist/src/scopes/contexts.d.ts +9 -0
  210. package/dist/src/scopes/contexts.d.ts.map +1 -0
  211. package/dist/src/scopes/contexts.js +34 -0
  212. package/dist/src/scopes/contexts.js.map +1 -0
  213. package/dist/src/scopes/csharp.d.ts +10 -0
  214. package/dist/src/scopes/csharp.d.ts.map +1 -0
  215. package/dist/src/scopes/csharp.js +15 -0
  216. package/dist/src/scopes/csharp.js.map +1 -0
  217. package/dist/src/scopes/factories.d.ts +9 -0
  218. package/dist/src/scopes/factories.d.ts.map +1 -0
  219. package/dist/src/scopes/factories.js +24 -0
  220. package/dist/src/scopes/factories.js.map +1 -0
  221. package/dist/src/scopes/index.d.ts +10 -0
  222. package/dist/src/scopes/index.d.ts.map +1 -0
  223. package/dist/src/scopes/index.js +10 -0
  224. package/dist/src/scopes/index.js.map +1 -0
  225. package/dist/src/scopes/lexical.d.ts +7 -0
  226. package/dist/src/scopes/lexical.d.ts.map +1 -0
  227. package/dist/src/scopes/lexical.js +8 -0
  228. package/dist/src/scopes/lexical.js.map +1 -0
  229. package/dist/src/scopes/method.d.ts +9 -0
  230. package/dist/src/scopes/method.d.ts.map +1 -0
  231. package/dist/src/scopes/method.js +14 -0
  232. package/dist/src/scopes/method.js.map +1 -0
  233. package/dist/src/scopes/named-type.d.ts +22 -0
  234. package/dist/src/scopes/named-type.d.ts.map +1 -0
  235. package/dist/src/scopes/named-type.js +33 -0
  236. package/dist/src/scopes/named-type.js.map +1 -0
  237. package/dist/src/scopes/namespace.d.ts +11 -0
  238. package/dist/src/scopes/namespace.d.ts.map +1 -0
  239. package/dist/src/scopes/namespace.js +39 -0
  240. package/dist/src/scopes/namespace.js.map +1 -0
  241. package/dist/src/scopes/source-file.d.ts +16 -0
  242. package/dist/src/scopes/source-file.d.ts.map +1 -0
  243. package/dist/src/scopes/source-file.js +44 -0
  244. package/dist/src/scopes/source-file.js.map +1 -0
  245. package/dist/src/symbols/csharp.d.ts +87 -0
  246. package/dist/src/symbols/csharp.d.ts.map +1 -0
  247. package/dist/src/symbols/csharp.js +246 -0
  248. package/dist/src/symbols/csharp.js.map +1 -0
  249. package/dist/src/symbols/factories.d.ts +25 -0
  250. package/dist/src/symbols/factories.d.ts.map +1 -0
  251. package/dist/src/symbols/factories.js +93 -0
  252. package/dist/src/symbols/factories.js.map +1 -0
  253. package/dist/src/symbols/index.d.ts +5 -2
  254. package/dist/src/symbols/index.d.ts.map +1 -1
  255. package/dist/src/symbols/index.js +6 -2
  256. package/dist/src/symbols/index.js.map +1 -0
  257. package/dist/src/symbols/method.d.ts +13 -0
  258. package/dist/src/symbols/method.d.ts.map +1 -0
  259. package/dist/src/symbols/method.js +16 -0
  260. package/dist/src/symbols/method.js.map +1 -0
  261. package/dist/src/symbols/named-type.d.ts +19 -0
  262. package/dist/src/symbols/named-type.d.ts.map +1 -0
  263. package/dist/src/symbols/named-type.js +31 -0
  264. package/dist/src/symbols/named-type.js.map +1 -0
  265. package/dist/src/symbols/namespace.d.ts +22 -0
  266. package/dist/src/symbols/namespace.d.ts.map +1 -0
  267. package/dist/src/symbols/namespace.js +45 -0
  268. package/dist/src/symbols/namespace.js.map +1 -0
  269. package/dist/src/symbols/reference.d.ts +2 -2
  270. package/dist/src/symbols/reference.d.ts.map +1 -1
  271. package/dist/src/symbols/reference.js +50 -44
  272. package/dist/src/symbols/reference.js.map +1 -0
  273. package/dist/test/project-directory.test.js +20 -19
  274. package/dist/test/project-directory.test.js.map +1 -0
  275. package/dist/test/using.test.js +23 -21
  276. package/dist/test/using.test.js.map +1 -0
  277. package/dist/test/utils.d.ts.map +1 -1
  278. package/dist/test/utils.js +7 -4
  279. package/dist/test/utils.js.map +1 -0
  280. package/dist/test/vitest.setup.js +2 -1
  281. package/dist/test/vitest.setup.js.map +1 -0
  282. package/dist/tsconfig.tsbuildinfo +1 -1
  283. package/package.json +12 -6
  284. package/src/components/Declaration.tsx +3 -6
  285. package/src/components/Reference.tsx +3 -1
  286. package/src/components/UsingDirective.tsx +12 -2
  287. package/src/components/access-expression/access-expression.test.tsx +284 -0
  288. package/src/components/access-expression/access-expression.tsx +375 -0
  289. package/src/components/access-expression/part-descriptors.ts +175 -0
  290. package/src/components/class/declaration.test.tsx +142 -150
  291. package/src/components/class/declaration.tsx +20 -32
  292. package/src/components/constructor/constructor.test.tsx +10 -16
  293. package/src/components/constructor/constructor.tsx +13 -32
  294. package/src/components/enum/declaration.ref.test.tsx +93 -0
  295. package/src/components/enum/declaration.test.tsx +34 -0
  296. package/src/components/enum/declaration.tsx +65 -0
  297. package/src/components/enum/member.test.tsx +24 -0
  298. package/src/components/enum/member.tsx +36 -0
  299. package/src/components/field/field.test.tsx +7 -7
  300. package/src/components/field/field.tsx +12 -22
  301. package/src/components/index.ts +7 -3
  302. package/src/components/interface/declaration.test.tsx +26 -32
  303. package/src/components/interface/declaration.tsx +16 -18
  304. package/src/components/interface/method.test.tsx +38 -44
  305. package/src/components/interface/method.tsx +7 -20
  306. package/src/components/interface/property.test.tsx +11 -11
  307. package/src/components/interface/property.tsx +15 -34
  308. package/src/components/invocation-expression/invocation-expression.test.tsx +101 -0
  309. package/src/components/invocation-expression/invocation-expression.tsx +60 -0
  310. package/src/components/lexical-scope.tsx +29 -0
  311. package/src/components/method/method.test.tsx +11 -11
  312. package/src/components/method/method.tsx +12 -23
  313. package/src/components/method-scope.tsx +27 -0
  314. package/src/components/namespace-scopes.tsx +44 -0
  315. package/src/components/namespace.ref.test.tsx +139 -0
  316. package/src/components/namespace.test.tsx +52 -0
  317. package/src/components/namespace.tsx +45 -0
  318. package/src/components/parameters/parameters.test.tsx +117 -0
  319. package/src/components/parameters/parameters.tsx +11 -23
  320. package/src/components/property/property.test.tsx +14 -14
  321. package/src/components/property/property.tsx +23 -41
  322. package/src/components/record/declaration.test.tsx +47 -3
  323. package/src/components/record/declaration.tsx +34 -11
  324. package/src/components/source-file/source-file.test.tsx +96 -0
  325. package/src/components/source-file/source-file.tsx +98 -0
  326. package/src/components/struct/declaration.test.tsx +16 -22
  327. package/src/components/struct/declaration.tsx +4 -6
  328. package/src/components/type-parameters/type-parameter.tsx +14 -11
  329. package/src/components/type-parameters/type-parameters.test.tsx +4 -4
  330. package/src/components/var/declaration.test.tsx +8 -14
  331. package/src/components/var/declaration.tsx +12 -6
  332. package/src/contexts/format-options.ts +14 -0
  333. package/src/contexts/global-namespace.ts +29 -0
  334. package/src/contexts/namespace.ts +13 -0
  335. package/src/index.ts +2 -0
  336. package/src/modifiers.ts +14 -0
  337. package/src/scopes/class.ts +12 -0
  338. package/src/scopes/contexts.ts +45 -0
  339. package/src/scopes/csharp.ts +23 -0
  340. package/src/scopes/factories.ts +45 -0
  341. package/src/scopes/index.ts +9 -0
  342. package/src/scopes/lexical.ts +10 -0
  343. package/src/scopes/method.ts +22 -0
  344. package/src/scopes/named-type.ts +44 -0
  345. package/src/scopes/namespace.ts +59 -0
  346. package/src/scopes/source-file.ts +67 -0
  347. package/src/symbols/csharp.ts +339 -0
  348. package/src/symbols/factories.ts +215 -0
  349. package/src/symbols/index.ts +5 -2
  350. package/src/symbols/method.ts +26 -0
  351. package/src/symbols/named-type.ts +54 -0
  352. package/src/symbols/namespace.ts +62 -0
  353. package/src/symbols/reference.tsx +64 -0
  354. package/temp/api.json +6919 -2532
  355. package/test/project-directory.test.tsx +14 -16
  356. package/test/using.test.tsx +21 -21
  357. package/test/utils.tsx +2 -1
  358. package/tsconfig.json +4 -1
  359. package/tsdoc-metadata.json +1 -1
  360. package/dist/src/components/EnumDeclaration.d.ts.map +0 -1
  361. package/dist/src/components/EnumDeclaration.js +0 -85
  362. package/dist/src/components/Namespace.d.ts +0 -11
  363. package/dist/src/components/Namespace.d.ts.map +0 -1
  364. package/dist/src/components/Namespace.js +0 -33
  365. package/dist/src/components/SourceFile.d.ts +0 -14
  366. package/dist/src/components/SourceFile.d.ts.map +0 -1
  367. package/dist/src/components/SourceFile.js +0 -69
  368. package/dist/src/symbols/csharp-output-symbol.d.ts +0 -8
  369. package/dist/src/symbols/csharp-output-symbol.d.ts.map +0 -1
  370. package/dist/src/symbols/csharp-output-symbol.js +0 -19
  371. package/dist/src/symbols/scopes.d.ts +0 -14
  372. package/dist/src/symbols/scopes.d.ts.map +0 -1
  373. package/dist/src/symbols/scopes.js +0 -31
  374. package/dist/test/enum.test.d.ts +0 -2
  375. package/dist/test/enum.test.d.ts.map +0 -1
  376. package/dist/test/enum.test.js +0 -178
  377. package/dist/test/namespace.test.d.ts.map +0 -1
  378. package/dist/test/namespace.test.js +0 -81
  379. package/dist/test/sourcefile.test.d.ts +0 -2
  380. package/dist/test/sourcefile.test.d.ts.map +0 -1
  381. package/dist/test/sourcefile.test.js +0 -58
  382. package/src/components/EnumDeclaration.tsx +0 -99
  383. package/src/components/Namespace.tsx +0 -35
  384. package/src/components/SourceFile.tsx +0 -78
  385. package/src/symbols/csharp-output-symbol.ts +0 -22
  386. package/src/symbols/reference.ts +0 -65
  387. package/src/symbols/scopes.ts +0 -41
  388. package/test/enum.test.tsx +0 -149
  389. package/test/namespace.test.tsx +0 -55
  390. package/test/sourcefile.test.tsx +0 -47
  391. /package/dist/{test → src/components}/namespace.test.d.ts +0 -0
@@ -0,0 +1,31 @@
1
+ import { CSharpSymbol } from "./csharp.js";
2
+
3
+ // represents a symbol from a .cs file. Class, enum, interface etc.
4
+
5
+ /**
6
+ * A symbol for a named type in C# such as a class, interface, enum, and so
7
+ * forth. Named types are generally defined in a namespace, and can have members
8
+ * of their own.
9
+ */
10
+ export class NamedTypeSymbol extends CSharpSymbol {
11
+ symbolKind = "named-type";
12
+ static memberSpaces = ["members"];
13
+ constructor(name, spaces, kind, options) {
14
+ super(name, spaces, options);
15
+ this.#typeKind = kind;
16
+ }
17
+ #typeKind;
18
+ get typeKind() {
19
+ return this.#typeKind;
20
+ }
21
+ copy() {
22
+ const options = this.getCopyOptions();
23
+ const copy = new NamedTypeSymbol(this.name, undefined, this.#typeKind, options);
24
+ this.initializeCopy(copy);
25
+ return copy;
26
+ }
27
+ get members() {
28
+ return this.memberSpaceFor("members");
29
+ }
30
+ }
31
+ //# sourceMappingURL=named-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["CSharpSymbol","NamedTypeSymbol","symbolKind","memberSpaces","constructor","name","spaces","kind","options","typeKind","copy","getCopyOptions","undefined","initializeCopy","members","memberSpaceFor"],"sources":["../../../src/symbols/named-type.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,YAAY,QAAQ,aAAa;;AAE1C;;AAWA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,SAASD,YAAY,CAAC;EAChCE,UAAU,GAAwB,YAAY;EAC9D,OAAuBC,YAAY,GAAG,CAAC,SAAS,CAAC;EAEjDC,WAAWA,CACTC,IAAsB,EACtBC,MAA+C,EAC/CC,IAAuB,EACvBC,OAA6B,EAC7B;IACA,KAAK,CAACH,IAAI,EAAEC,MAAM,EAAEE,OAAO,CAAC;IAC5B,IAAI,CAAC,CAACC,QAAQ,GAAGF,IAAI;EACvB;EAEA,CAACE,QAAQ;EACT,IAAIA,QAAQA,CAAA,EAAG;IACb,OAAO,IAAI,CAAC,CAACA,QAAQ;EACvB;EAEAC,IAAIA,CAAA,EAAG;IACL,MAAMF,OAAO,GAAG,IAAI,CAACG,cAAc,CAAC,CAAC;IACrC,MAAMD,IAAI,GAAG,IAAIT,eAAe,CAC9B,IAAI,CAACI,IAAI,EACTO,SAAS,EACT,IAAI,CAAC,CAACH,QAAQ,EACdD,OACF,CAAC;IACD,IAAI,CAACK,cAAc,CAACH,IAAI,CAAC;IACzB,OAAOA,IAAI;EACb;EAEA,IAAII,OAAOA,CAAA,EAAG;IACZ,OAAO,IAAI,CAACC,cAAc,CAAC,SAAS,CAAC;EACvC;AACF","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ import { OutputSymbolOptions } from "@alloy-js/core";
2
+ import { NamedTypeSymbol } from "./named-type.js";
3
+ export interface NamespaceSymbolOptions extends OutputSymbolOptions {
4
+ isGlobal?: boolean;
5
+ }
6
+ /**
7
+ * A symbol for a namespace in C#.
8
+ */
9
+ export declare class NamespaceSymbol extends NamedTypeSymbol {
10
+ #private;
11
+ readonly symbolKind = "namespace";
12
+ constructor(name: string, parentNamespace?: NamespaceSymbol, options?: NamespaceSymbolOptions);
13
+ /**
14
+ * Whether this symbol is the global namespace symbol.
15
+ */
16
+ get isGlobal(): boolean;
17
+ getFullyQualifiedName(options?: {
18
+ omitGlobal?: boolean;
19
+ }): string;
20
+ copy(): NamespaceSymbol;
21
+ }
22
+ //# sourceMappingURL=namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../src/symbols/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,eAAe;;IAClD,SAAgB,UAAU,eAAe;gBAEvC,IAAI,EAAE,MAAM,EACZ,eAAe,CAAC,EAAE,eAAe,EACjC,OAAO,CAAC,EAAE,sBAAsB;IAUlC;;OAEG;IACH,IAAI,QAAQ,YAEX;IAED,qBAAqB,CAAC,OAAO,GAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,MAAM;IAoBrE,IAAI;CASL"}
@@ -0,0 +1,45 @@
1
+ import { NamedTypeSymbol } from "./named-type.js";
2
+ /**
3
+ * A symbol for a namespace in C#.
4
+ */
5
+ export class NamespaceSymbol extends NamedTypeSymbol {
6
+ symbolKind = "namespace";
7
+ constructor(name, parentNamespace, options) {
8
+ const space = parentNamespace?.members;
9
+ super(name, space, "namespace", options);
10
+ this.#isGlobal = !!options?.isGlobal;
11
+ }
12
+ #isGlobal;
13
+ /**
14
+ * Whether this symbol is the global namespace symbol.
15
+ */
16
+ get isGlobal() {
17
+ return this.#isGlobal;
18
+ }
19
+ getFullyQualifiedName(options = {}) {
20
+ const parts = [];
21
+
22
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
23
+ let current = this;
24
+ while (current && !current.isGlobal) {
25
+ parts.unshift(current.name);
26
+ current = current.ownerSymbol;
27
+ }
28
+ const idPart = parts.join(".");
29
+ if (options.omitGlobal) {
30
+ return idPart;
31
+ } else {
32
+ return `global::${idPart}`;
33
+ }
34
+ }
35
+ copy() {
36
+ const options = this.getCopyOptions();
37
+ const copy = new NamespaceSymbol(this.name, undefined, {
38
+ ...options,
39
+ isGlobal: this.#isGlobal
40
+ });
41
+ this.initializeCopy(copy);
42
+ return copy;
43
+ }
44
+ }
45
+ //# sourceMappingURL=namespace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NamedTypeSymbol","NamespaceSymbol","symbolKind","constructor","name","parentNamespace","options","space","members","isGlobal","getFullyQualifiedName","parts","current","unshift","ownerSymbol","idPart","join","omitGlobal","copy","getCopyOptions","undefined","initializeCopy"],"sources":["../../../src/symbols/namespace.ts"],"sourcesContent":[null],"mappings":"AACA,SAASA,eAAe,QAAQ,iBAAiB;AAMjD;AACA;AACA;AACA,OAAO,MAAMC,eAAe,SAASD,eAAe,CAAC;EACnCE,UAAU,GAAG,WAAW;EACxCC,WAAWA,CACTC,IAAY,EACZC,eAAiC,EACjCC,OAAgC,EAChC;IACA,MAAMC,KAAK,GAAGF,eAAe,EAAEG,OAAO;IAEtC,KAAK,CAACJ,IAAI,EAAEG,KAAK,EAAE,WAAW,EAAED,OAAO,CAAC;IAExC,IAAI,CAAC,CAACG,QAAQ,GAAG,CAAC,CAACH,OAAO,EAAEG,QAAQ;EACtC;EAEA,CAACA,QAAQ;EACT;AACF;AACA;EACE,IAAIA,QAAQA,CAAA,EAAG;IACb,OAAO,IAAI,CAAC,CAACA,QAAQ;EACvB;EAEAC,qBAAqBA,CAACJ,OAAiC,GAAG,CAAC,CAAC,EAAU;IACpE,MAAMK,KAAK,GAAG,EAAE;;IAEhB;IACA,IAAIC,OAAoC,GAAG,IAAI;IAE/C,OAAOA,OAAO,IAAI,CAACA,OAAO,CAACH,QAAQ,EAAE;MACnCE,KAAK,CAACE,OAAO,CAACD,OAAO,CAACR,IAAI,CAAC;MAC3BQ,OAAO,GAAGA,OAAO,CAACE,WAA0C;IAC9D;IAEA,MAAMC,MAAM,GAAGJ,KAAK,CAACK,IAAI,CAAC,GAAG,CAAC;IAE9B,IAAIV,OAAO,CAACW,UAAU,EAAE;MACtB,OAAOF,MAAM;IACf,CAAC,MAAM;MACL,OAAO,WAAWA,MAAM,EAAE;IAC5B;EACF;EAEAG,IAAIA,CAAA,EAAG;IACL,MAAMZ,OAAO,GAAG,IAAI,CAACa,cAAc,CAAC,CAAC;IACrC,MAAMD,IAAI,GAAG,IAAIjB,eAAe,CAAC,IAAI,CAACG,IAAI,EAAEgB,SAAS,EAAE;MACrD,GAAGd,OAAO;MACVG,QAAQ,EAAE,IAAI,CAAC,CAACA;IAClB,CAAC,CAAC;IACF,IAAI,CAACY,cAAc,CAACH,IAAI,CAAC;IACzB,OAAOA,IAAI;EACb;AACF","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import * as core from "@alloy-js/core";
2
- export declare function ref(refkey: core.Refkey): () => string;
1
+ import { Children, OutputSymbol, Refkey } from "@alloy-js/core";
2
+ export declare function ref(refkey: Refkey): () => [Children, OutputSymbol | undefined];
3
3
  //# sourceMappingURL=reference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/symbols/reference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAoBvC,wBAAgB,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,MAAM,MAAM,CA4CrD"}
1
+ {"version":3,"file":"reference.d.ts","sourceRoot":"","sources":["../../../src/symbols/reference.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAQ,YAAY,EAAE,MAAM,EAAW,MAAM,gBAAgB,CAAC;AAW/E,wBAAgB,GAAG,CACjB,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC,CAiD5C"}
@@ -1,54 +1,60 @@
1
- import * as core from "@alloy-js/core";
2
- import { useNamespace } from "../components/Namespace.js";
3
- import { useSourceFile } from "../components/SourceFile.js";
4
-
5
- // when resolving references across source files, the last element
6
- // in pathDown will be the containing source file. we only need this
7
- // here so we can find and remove this scope as it's not useful
8
- // when building the reference
9
-
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { AccessExpression } from "#components/access-expression/access-expression.js";
3
+ import { memo, resolve } from "@alloy-js/core";
4
+ import { CSharpNamespaceScope } from "../scopes/namespace.js";
5
+ import { useSourceFileScope } from "../scopes/source-file.js";
10
6
  // converts a refkey to its fully qualified name
11
7
  // e.g. if refkey is for bar in enum type foo, and
12
8
  // foo is in the same namespace as the refkey, then
13
9
  // the result would be foo.bar.
14
10
  export function ref(refkey) {
15
- const targetNamespaceCtx = useNamespace();
16
- const resolveResult = core.resolve(refkey);
17
- return core.memo(() => {
11
+ const refSfScope = useSourceFileScope();
12
+ const resolveResult = resolve(refkey);
13
+ return memo(() => {
18
14
  if (resolveResult.value === undefined) {
19
- return "<Unresolved Symbol>";
15
+ return ["<Unresolved Symbol>", undefined];
20
16
  }
21
-
22
- // targetDeclaration is the symbol with the refkey
23
- // pathDown is an array of scopes to that symbol and can be empty.
24
- // the entries are top-down, so namespace, source-file, member
25
- // - referencing a type within the same namespace will have an empty path
26
- // - referencing a member (e.g. enum value) within the same namespace will
27
- // have a single path entry that contains the owning type
28
- // - referencing a type within the same namespace but in a different source
29
- // file will have at least a source-file entry
30
- // - referencing a symbol outside the current namespace will have at least
31
- // two entries, namespace, source-file
17
+ const result = resolveResult.value;
32
18
  const {
33
- targetDeclaration,
34
- pathDown
35
- } = resolveResult.value;
36
- const sourceNamespace = pathDown.find(v => {
37
- return v.kind === "namespace";
38
- });
39
- if (sourceNamespace && sourceNamespace.name !== targetNamespaceCtx.name) {
40
- // the source symbol is in a different namespace that the target refkey.
41
- // add the applicable using statement to the target's source file.
42
- const targetSrc = useSourceFile();
43
- targetSrc.addUsing(sourceNamespace.name);
19
+ commonScope,
20
+ pathDown,
21
+ memberPath
22
+ } = result;
23
+ let {
24
+ lexicalDeclaration
25
+ } = result;
26
+ if (!commonScope) {
27
+ // this shouldn't be possible in csharp.
28
+ return ["<Unresolved Symbol>", undefined];
44
29
  }
45
-
46
- // we only need to build the fully-qualified name for members
47
- // TODO: possibly a subset of members
48
- const syms = pathDown.filter(v => {
49
- return v.kind === "member";
50
- }).map(s => s.owner);
51
- syms.push(targetDeclaration);
52
- return syms.map(sym => sym.name).join(".");
30
+ if (commonScope instanceof CSharpNamespaceScope && commonScope.ownerSymbol.isGlobal && lexicalDeclaration.symbolKind === "namespace" && memberPath.length > 0) {
31
+ // we need to using the namespace
32
+ let nsToUse;
33
+ while (lexicalDeclaration.symbolKind === "namespace" && memberPath.length > 0) {
34
+ nsToUse = lexicalDeclaration;
35
+ lexicalDeclaration = memberPath.shift();
36
+ }
37
+ refSfScope.addUsing(nsToUse);
38
+ }
39
+ const parts = [];
40
+ for (const nsScope of pathDown) {
41
+ parts.push(_$createComponent(AccessExpression.Part, {
42
+ get symbol() {
43
+ return nsScope.ownerSymbol;
44
+ }
45
+ }));
46
+ }
47
+ parts.push(_$createComponent(AccessExpression.Part, {
48
+ symbol: lexicalDeclaration
49
+ }));
50
+ for (const member of memberPath) {
51
+ parts.push(_$createComponent(AccessExpression.Part, {
52
+ symbol: member
53
+ }));
54
+ }
55
+ return [_$createComponent(AccessExpression, {
56
+ children: parts
57
+ }), result.symbol];
53
58
  });
54
- }
59
+ }
60
+ //# sourceMappingURL=reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["AccessExpression","memo","resolve","CSharpNamespaceScope","useSourceFileScope","ref","refkey","refSfScope","resolveResult","value","undefined","result","commonScope","pathDown","memberPath","lexicalDeclaration","ownerSymbol","isGlobal","symbolKind","length","nsToUse","shift","addUsing","parts","nsScope","push","_$createComponent","Part","symbol","member","children"],"sources":["../../../src/symbols/reference.tsx"],"sourcesContent":[null],"mappings":";AAAA,SAASA,gBAAgB;AACzB,SAAmBC,IAAI,EAAwBC,OAAO,QAAQ,gBAAgB;AAE9E,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,kBAAkB,QAAQ,0BAA0B;AAI7D;AACA;AACA;AACA;AACA,OAAO,SAASC,GAAGA,CACjBC,MAAc,EAC8B;EAC5C,MAAMC,UAAU,GAAGH,kBAAkB,CAAC,CAAE;EACxC,MAAMI,aAAa,GAAGN,OAAO,CAA4BI,MAAgB,CAAC;EAC1E,OAAOL,IAAI,CAAC,MAAM;IAChB,IAAIO,aAAa,CAACC,KAAK,KAAKC,SAAS,EAAE;MACrC,OAAO,CAAC,qBAAqB,EAAEA,SAAS,CAAC;IAC3C;IAEA,MAAMC,MAAM,GAAGH,aAAa,CAACC,KAAK;IAClC,MAAM;MAAEG,WAAW;MAAEC,QAAQ;MAAEC;IAAW,CAAC,GAAGH,MAAM;IACpD,IAAI;MAAEI;IAAmB,CAAC,GAAGJ,MAAM;IAEnC,IAAI,CAACC,WAAW,EAAE;MAChB;MACA,OAAO,CAAC,qBAAqB,EAAEF,SAAS,CAAC;IAC3C;IAEA,IACEE,WAAW,YAAYT,oBAAoB,IAC3CS,WAAW,CAACI,WAAW,CAACC,QAAQ,IAChCF,kBAAkB,CAACG,UAAU,KAAK,WAAW,IAC7CJ,UAAU,CAACK,MAAM,GAAG,CAAC,EACrB;MACA;MACA,IAAIC,OAAwB;MAC5B,OACEL,kBAAkB,CAACG,UAAU,KAAK,WAAW,IAC7CJ,UAAU,CAACK,MAAM,GAAG,CAAC,EACrB;QACAC,OAAO,GAAGL,kBAAqC;QAC/CA,kBAAkB,GAAGD,UAAU,CAACO,KAAK,CAAC,CAAE;MAC1C;MAEAd,UAAU,CAACe,QAAQ,CAACF,OAAQ,CAAC;IAC/B;IAEA,MAAMG,KAAK,GAAG,EAAE;IAEhB,KAAK,MAAMC,OAAO,IAAIX,QAAQ,EAAE;MAC9BU,KAAK,CAACE,IAAI,CAAAC,iBAAA,CAAE1B,gBAAgB,CAAC2B,IAAI;QAAA,IAACC,MAAMA,CAAA;UAAA,OAAEJ,OAAO,CAACR,WAAW;QAAA;MAAA,EAAK,CAAC;IACrE;IAEAO,KAAK,CAACE,IAAI,CAAAC,iBAAA,CAAE1B,gBAAgB,CAAC2B,IAAI;MAACC,MAAM,EAAEb;IAAkB,EAAI,CAAC;IACjE,KAAK,MAAMc,MAAM,IAAIf,UAAU,EAAE;MAC/BS,KAAK,CAACE,IAAI,CAAAC,iBAAA,CAAE1B,gBAAgB,CAAC2B,IAAI;QAACC,MAAM,EAAEC;MAAM,EAAI,CAAC;IACvD;IAEA,OAAO,CAAAH,iBAAA,CAAE1B,gBAAgB;MAAC8B,QAAQ,EAAEP;IAAK,IAAMZ,MAAM,CAACiB,MAAM,CAAC;EAC/D,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -37,7 +37,9 @@ it("defines a project directory file with multiple source files", () => {
37
37
  }
38
38
  });
39
39
  }
40
- }));
40
+ }), {
41
+ insertFinalNewLine: false
42
+ });
41
43
  const projDir = res.contents[0];
42
44
  expect(projDir.path).equals("~/projects/TestProject");
43
45
  expect(projDir.contents[0].path).equals("~/projects/TestProject/TestProject.csproj");
@@ -53,17 +55,15 @@ it("defines a project directory file with multiple source files", () => {
53
55
  const srcDir = projDir.contents[1];
54
56
  expect(srcDir.contents[0].path).equals("~/projects/TestProject/src/Test1.cs");
55
57
  expect(srcDir.contents[0].contents).toBe(coretest.d`
56
- namespace TestCode
57
- {
58
- public class TestClass1;
59
- }
58
+ namespace TestCode;
59
+
60
+ public class TestClass1;
60
61
  `);
61
62
  expect(srcDir.contents[1].path).equals("~/projects/TestProject/src/Test2.cs");
62
63
  expect(srcDir.contents[1].contents).toBe(coretest.d`
63
- namespace TestCode
64
- {
65
- public class TestClass2;
66
- }
64
+ namespace TestCode;
65
+
66
+ public class TestClass2;
67
67
  `);
68
68
  });
69
69
  it("defines a project directory file with multiple source files and a custom TFM", () => {
@@ -101,7 +101,9 @@ it("defines a project directory file with multiple source files and a custom TFM
101
101
  }
102
102
  });
103
103
  }
104
- }));
104
+ }), {
105
+ insertFinalNewLine: false
106
+ });
105
107
  const projDir = res.contents[0];
106
108
  expect(projDir.path).equals("~/projects/TestProject");
107
109
  expect(projDir.contents[0].path).equals("~/projects/TestProject/TestProject.csproj");
@@ -117,16 +119,15 @@ it("defines a project directory file with multiple source files and a custom TFM
117
119
  const srcDir = projDir.contents[1];
118
120
  expect(srcDir.contents[0].path).equals("~/projects/TestProject/src/Test1.cs");
119
121
  expect(srcDir.contents[0].contents).toBe(coretest.d`
120
- namespace TestCode
121
- {
122
- public class TestClass1;
123
- }
122
+ namespace TestCode;
123
+
124
+ public class TestClass1;
124
125
  `);
125
126
  expect(srcDir.contents[1].path).equals("~/projects/TestProject/src/Test2.cs");
126
127
  expect(srcDir.contents[1].contents).toBe(coretest.d`
127
- namespace TestCode
128
- {
129
- public class TestClass2;
130
- }
128
+ namespace TestCode;
129
+
130
+ public class TestClass2;
131
131
  `);
132
- });
132
+ });
133
+ //# sourceMappingURL=project-directory.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["core","coretest","expect","it","csharp","res","render","_$createComponent","Output","children","ProjectDirectory","name","path","version","description","Namespace","SourceFile","ClassDeclaration","insertFinalNewLine","projDir","contents","equals","toBe","d","srcDir","targetFrameworkMoniker"],"sources":["../../test/project-directory.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,OAAO,KAAKA,IAAI,MAAM,gBAAgB;AACtC,OAAO,KAAKC,QAAQ,MAAM,wBAAwB;AAClD,SAASC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,OAAO,KAAKC,MAAM,MAAM,iBAAiB;AAEzCD,EAAE,CAAC,6DAA6D,EAAE,MAAM;EACtE,MAAME,GAAG,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AA;IAAA;EAAA,IAK5C;IAAEO,kBAAkB,EAAE;EAAM,CAC9B,CAAC;EAED,MAAMC,OAAO,GAAGd,GAAG,CAACe,QAAQ,CAAC,CAAC,CAAyB;EAEvDlB,MAAM,CAACiB,OAAO,CAACP,IAAI,CAAC,CAACS,MAAM,CAAC,wBAAwB,CAAC;EACrDnB,MAAM,CAACiB,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CAACR,IAAI,CAAC,CAACS,MAAM,CACrC,2CACF,CAAC;EACDnB,MAAM,CAAEiB,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CAA4BA,QAAQ,CAAC,CAC7DE,IAAI,CAACrB,QAAQ,CAACsB,CAAC;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;EAEF,MAAMC,MAAM,GAAGL,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAyB;EAE1DlB,MAAM,CAACsB,MAAM,CAACJ,QAAQ,CAAC,CAAC,CAAC,CAACR,IAAI,CAAC,CAACS,MAAM,CAAC,qCAAqC,CAAC;EAC7EnB,MAAM,CAAEsB,MAAM,CAACJ,QAAQ,CAAC,CAAC,CAAC,CAA4BA,QAAQ,CAAC,CAC5DE,IAAI,CAACrB,QAAQ,CAACsB,CAAC;AACpB;AACA;AACA;AACA,GAAG,CAAC;EAEFrB,MAAM,CAACsB,MAAM,CAACJ,QAAQ,CAAC,CAAC,CAAC,CAACR,IAAI,CAAC,CAACS,MAAM,CAAC,qCAAqC,CAAC;EAC7EnB,MAAM,CAAEsB,MAAM,CAACJ,QAAQ,CAAC,CAAC,CAAC,CAA4BA,QAAQ,CAAC,CAC5DE,IAAI,CAACrB,QAAQ,CAACsB,CAAC;AACpB;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@ import * as core from "@alloy-js/core";
3
3
  import * as coretest from "@alloy-js/core/testing";
4
4
  import { expect, it } from "vitest";
5
5
  import * as csharp from "../src/index.js";
6
- import { assertFileContents, findFile } from "./utils.js";
6
+ import { findFile } from "./utils.js";
7
7
  it("uses a single namespace", () => {
8
8
  const res = core.render(_$createComponent(core.Output, {
9
9
  get children() {
@@ -21,7 +21,9 @@ it("uses a single namespace", () => {
21
21
  expect(findFile(res, "Test1.cs").contents).toBe(coretest.d`
22
22
  using Foo;
23
23
 
24
- namespace TestCode {}
24
+ namespace TestCode;
25
+
26
+
25
27
  `);
26
28
  });
27
29
  it("uses multiple namespaces", () => {
@@ -42,7 +44,9 @@ it("uses multiple namespaces", () => {
42
44
  using Bar.Baz;
43
45
  using Foo;
44
46
 
45
- namespace TestCode {}
47
+ namespace TestCode;
48
+
49
+
46
50
  `);
47
51
  });
48
52
  it("adds using statement across namespaces", () => {
@@ -53,7 +57,7 @@ it("adds using statement across namespaces", () => {
53
57
  name: "BodyParam",
54
58
  type: inputTypeRefkey
55
59
  }];
56
- const res = core.render(_$createComponent(core.Output, {
60
+ expect(_$createComponent(core.Output, {
57
61
  get namePolicy() {
58
62
  return csharp.createCSharpNamePolicy();
59
63
  },
@@ -111,32 +115,30 @@ it("adds using statement across namespaces", () => {
111
115
  }
112
116
  })];
113
117
  }
114
- }));
115
- assertFileContents(res, {
118
+ })).toRenderTo({
116
119
  "Models.cs": coretest.d`
117
- namespace Models
120
+ namespace Models;
121
+
122
+ public class Input;
123
+ public class Output;
124
+ public enum TestEnum
118
125
  {
119
- public class Input;
120
- public class Output;
121
- public enum TestEnum
122
- {
123
- One,
124
- Two
125
- }
126
+ One,
127
+ Two
126
128
  }
127
129
  `,
128
130
  "Client.cs": coretest.d`
129
131
  using Models;
130
132
  using System;
131
133
 
132
- namespace Client
134
+ namespace Client;
135
+
136
+ public class Client
133
137
  {
134
- public class Client
135
- {
136
- public Output MethodOne(Input bodyParam) {}
137
- }
138
- TestEnum.Two;
138
+ public Output MethodOne(Input bodyParam) {}
139
139
  }
140
+ TestEnum.Two;
140
141
  `
141
142
  });
142
- });
143
+ });
144
+ //# sourceMappingURL=using.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["core","coretest","expect","it","csharp","findFile","res","render","_$createComponent","Output","children","Namespace","name","SourceFile","path","using","contents","toBe","d","inputTypeRefkey","refkey","outputTypeRefkey","twoValRefkey","params","type","namePolicy","createCSharpNamePolicy","ClassDeclaration","_$createIntrinsic","EnumDeclaration","EnumMember","Method","parameters","returns","toRenderTo"],"sources":["../../test/using.test.tsx"],"sourcesContent":[null],"mappings":";AAAA,OAAO,KAAKA,IAAI,MAAM,gBAAgB;AACtC,OAAO,KAAKC,QAAQ,MAAM,wBAAwB;AAClD,SAASC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AACnC,OAAO,KAAKC,MAAM,MAAM,iBAAiB;AACzC,SAASC,QAAQ;AAEjBF,EAAE,CAAC,yBAAyB,EAAE,MAAM;EAClC,MAAMG,GAAG,GAAGN,IAAI,CAACO,MAAM,CAAAC,iBAAA,CACpBR,IAAI,CAACS,MAAM;IAAA,IAAAC,SAAA;MAAA,OAAAF,iBAAA,CACTJ,MAAM,CAACO,SAAS;QAACC,IAAI;QAAA,IAAAF,SAAA;UAAA,OAAAF,iBAAA,CACnBJ,MAAM,CAACS,UAAU;YAACC,IAAI;YAAYC,KAAK,EAAE,CAAC,KAAK;UAAC;QAAA;MAAA;IAAA;EAAA,EAGvD,CAAC;EAEDb,MAAM,CAACG,QAAQ,CAACC,GAAG,EAAE,UAAU,CAAC,CAACU,QAAQ,CAAC,CAACC,IAAI,CAAChB,QAAQ,CAACiB,CAAC;AAC5D;AACA;AACA;AACA;AACA;AACA,GAAG,CAAC;AACJ,CAAC,CAAC;AAEFf,EAAE,CAAC,0BAA0B,EAAE,MAAM;EACnC,MAAMG,GAAG,GAAGN,IAAI,CAACO,MAAM,CAAAC,iBAAA,CACpBR,IAAI,CAACS,MAAM;IAAA,IAAAC,SAAA;MAAA,OAAAF,iBAAA,CACTJ,MAAM,CAACO,SAAS;QAACC,IAAI;QAAA,IAAAF,SAA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I,CAAC,QAAQ,CAMhB;AACD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAWrD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAMjE;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,IAAI,EAAE,MAAM,GACX,IAAI,CAAC,iBAAiB,CA2BxB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI,CAKN"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../test/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAC;AAKvC,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC;CACzB,GAAG,IAAI,CAAC,QAAQ,CAMhB;AACD,wBAAgB,YAAY,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAYrD;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,eAAe,CAMjE;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,IAAI,EAAE,MAAM,GACX,IAAI,CAAC,iBAAiB,CA2BxB;AAED,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,IAAI,CAKN"}
@@ -9,8 +9,8 @@ export function TestNamespace(props) {
9
9
  return csharp.createCSharpNamePolicy();
10
10
  },
11
11
  get children() {
12
- return _$createComponent(csharp.Namespace, {
13
- name: "TestCode",
12
+ return _$createComponent(csharp.SourceFile, {
13
+ path: "Test.cs",
14
14
  get children() {
15
15
  return props.children;
16
16
  }
@@ -34,7 +34,9 @@ export function toSourceText(c) {
34
34
  }
35
35
  });
36
36
  }
37
- }));
37
+ }), {
38
+ insertFinalNewLine: false
39
+ });
38
40
  const file = findFile(res, "Test.cs");
39
41
  return file.contents;
40
42
  }
@@ -76,4 +78,5 @@ export function assertFileContents(res, expectedFiles) {
76
78
  const file = findFile(res, path);
77
79
  expect(file.contents).toBe(coretest.dedent(contents));
78
80
  }
79
- }
81
+ }
82
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["core","coretest","expect","csharp","TestNamespace","props","_$createComponent","Output","namePolicy","createCSharpNamePolicy","children","SourceFile","path","toSourceText","c","res","render","Namespace","name","insertFinalNewLine","file","findFile","contents","testRender","result","findFileWorker","Error","item","kind","includes","found","assertFileContents","expectedFiles","Object","entries","toBe","dedent"],"sources":["../../test/utils.tsx"],"sourcesContent":[null],"mappings":";AAAA,OAAO,KAAKA,IAAI,MAAM,gBAAgB;AACtC,OAAO,KAAKC,QAAQ,MAAM,wBAAwB;AAClD,SAASC,MAAM,QAAQ,QAAQ;AAC/B,OAAO,KAAKC,MAAM,MAAM,iBAAiB;AAEzC,OAAO,SAASC,aAAaA,CAACC,KAE7B,EAAiB;EAChB,OAAAC,iBAAA,CACGN,IAAI,CAACO,MAAM;IAAA,IAACC,UAAUA,CAAA;MAAA,OAAEL,MAAM,CAACM,sBAAsB,CAAC,CAAC;IAAA;IAAA,IAAAC,SAAA;MAAA,OAAAJ,iBAAA,CACrDH,MAAM,CAACQ,UAAU;QAACC,IAAI;QAAA,IAAAF,SAAA;UAAA,OAAYL,KAAK,CAACK,QAAQ;QAAA;MAAA;IAAA;EAAA;AAGvD;AACA,OAAO,SAASG,YAAYA,CAACC,CAAgB,EAAU;EACrD,MAAMC,GAAG,GAAGf,IAAI,CAACgB,MAAM,CAAAV,iBAAA,CACpBN,IAAI,CAACO,MAAM;IAAA,IAAC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Ef,IAAI,CAAC;QACxC,IAAIkB,KAAK,EAAE;UACT,OAAOA,KAAK;QACd;MACF;IACF;IACA,OAAO,IAAI;EACb;AACF;AAEA,OAAO,SAASC,kBAAkBA,CAChChB,GAAyB,EACzBiB,aAAqC,EAC/B;EACN,KAAK,MAAM,CAACpB,IAAI,EAAEU,QAAQ,CAAC,IAAIW,MAAM,CAACC,OAAO,CAACF,aAAa,CAAC,EAAE;IAC5D,MAAMZ,IAAI,GAAGC,QAAQ,CAACN,GAAG,EAAEH,IAAI,CAAC;IAChCV,MAAM,CAACkB,IAAI,CAACE,QAAQ,CAAC,CAACa,IAAI,CAAClC,QAAQ,CAACmC,MAAM,CAACd,QAAQ,CAAC,CAAC;EACvD;AACF","ignoreList":[]}
@@ -1 +1,2 @@
1
- import "@alloy-js/core/testing";
1
+ import "@alloy-js/core/testing";
2
+ //# sourceMappingURL=vitest.setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../test/vitest.setup.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,wBAAwB","ignoreList":[]}