@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
@@ -3,7 +3,6 @@ import { Children } from "@alloy-js/core/jsx-runtime";
3
3
  import { describe, expect, it } from "vitest";
4
4
  import { TestNamespace } from "../../../test/utils.jsx";
5
5
  import { Attribute } from "../attributes/attributes.jsx";
6
- import { SourceFile } from "../SourceFile.jsx";
7
6
  import { TypeParameterProps } from "../type-parameters/type-parameter.jsx";
8
7
  import { InterfaceDeclaration } from "./declaration.jsx";
9
8
  import { InterfaceMethod } from "./method.jsx";
@@ -28,7 +27,7 @@ describe("modifiers", () => {
28
27
  ).toRenderTo(`
29
28
  public interface TestInterface
30
29
  {
31
- ${accessModifier} void MethodOne();
30
+ ${accessModifier} void MethodOne();
32
31
  }
33
32
  `);
34
33
  },
@@ -44,7 +43,7 @@ describe("modifiers", () => {
44
43
  ).toRenderTo(`
45
44
  public interface TestInterface
46
45
  {
47
- ${methodModifier} void MethodOne();
46
+ ${methodModifier} void MethodOne();
48
47
  }
49
48
  `);
50
49
  });
@@ -58,7 +57,7 @@ describe("modifiers", () => {
58
57
  ).toRenderTo(`
59
58
  public interface TestInterface
60
59
  {
61
- public new Task MethodOne();
60
+ public new Task MethodOne();
62
61
  }
63
62
  `);
64
63
  });
@@ -72,7 +71,7 @@ it("applies PascalCase naming policy", () => {
72
71
  ).toRenderTo(`
73
72
  public interface TestInterface
74
73
  {
75
- void MethodOne();
74
+ void MethodOne();
76
75
  }
77
76
  `);
78
77
  });
@@ -102,7 +101,7 @@ it("defines params and return type", () => {
102
101
  expect(res).toRenderTo(`
103
102
  public interface TestInterface
104
103
  {
105
- public string MethodOne(int intParam, string stringParam);
104
+ public string MethodOne(int intParam, string stringParam);
106
105
  }
107
106
  `);
108
107
  });
@@ -128,7 +127,7 @@ it("defines optional param", () => {
128
127
  expect(res).toRenderTo(`
129
128
  public interface TestInterface
130
129
  {
131
- public string MethodOne(int? intParam);
130
+ public string MethodOne(int? intParam);
132
131
  }
133
132
  `);
134
133
  });
@@ -154,7 +153,7 @@ it("defines optional param with default", () => {
154
153
  expect(res).toRenderTo(`
155
154
  public interface TestInterface
156
155
  {
157
- public string MethodOne(int intParam = 12);
156
+ public string MethodOne(int intParam = 12);
158
157
  }
159
158
  `);
160
159
  });
@@ -169,8 +168,8 @@ it("specify doc comment", () => {
169
168
  ).toRenderTo(`
170
169
  interface Test
171
170
  {
172
- /// This is a test
173
- void Method();
171
+ /// This is a test
172
+ void Method();
174
173
  }
175
174
  `);
176
175
  });
@@ -183,8 +182,8 @@ it("specify attributes", () => {
183
182
  ).toRenderTo(`
184
183
  public interface TestInterface
185
184
  {
186
- [Test]
187
- void Test();
185
+ [Test]
186
+ void Test();
188
187
  }
189
188
  `);
190
189
  });
@@ -204,30 +203,25 @@ describe("with type parameters", () => {
204
203
 
205
204
  expect(
206
205
  <TestNamespace>
207
- <SourceFile path="TestFile.cs">
208
- <InterfaceDeclaration public name="TestInterface">
209
- <InterfaceMethod
210
- name="Test"
211
- public
212
- typeParameters={typeParameters}
213
- parameters={[
214
- {
215
- name: "paramA",
216
- type: typeParameters[0].refkey,
217
- },
218
- ]}
219
- returns={typeParameters[0].refkey}
220
- />
221
- </InterfaceDeclaration>
222
- </SourceFile>
206
+ <InterfaceDeclaration public name="TestInterface">
207
+ <InterfaceMethod
208
+ name="Test"
209
+ public
210
+ typeParameters={typeParameters}
211
+ parameters={[
212
+ {
213
+ name: "paramA",
214
+ type: typeParameters[0].refkey,
215
+ },
216
+ ]}
217
+ returns={typeParameters[0].refkey}
218
+ />
219
+ </InterfaceDeclaration>
223
220
  </TestNamespace>,
224
221
  ).toRenderTo(`
225
- namespace TestCode
222
+ public interface TestInterface
226
223
  {
227
- public interface TestInterface
228
- {
229
- public T Test<T, U>(T paramA);
230
- }
224
+ public T Test<T, U>(T paramA);
231
225
  }
232
226
  `);
233
227
  });
@@ -253,12 +247,12 @@ describe("with type parameters", () => {
253
247
  ).toRenderTo(`
254
248
  public interface TestInterface
255
249
  {
256
- public void Test<T, U>()
257
- where T : IFoo
258
- where U : IBar
259
- {
260
- // Body
261
- }
250
+ public void Test<T, U>()
251
+ where T : IFoo
252
+ where U : IBar
253
+ {
254
+ // Body
255
+ }
262
256
  }
263
257
  `);
264
258
  });
@@ -274,19 +268,19 @@ describe("formatting", () => {
274
268
  parameters={[
275
269
  {
276
270
  name: "message",
277
- type: "Some.Quite.Long.Type.That.Will.Split",
271
+ type: "Some.Quite.Long.Type.That.Will.Split.At.One.Hundred.Chars.Line.Width",
278
272
  },
279
273
  ]}
280
274
  typeParameters={["T"]}
281
- returns="Some.Quite.Long.Type.That.Will.Split"
275
+ returns="Some.Quite.Long.Type.That.Will.Split.At.One.Hundred.Chars.Line.Width"
282
276
  />
283
277
  </Wrapper>,
284
278
  ).toRenderTo(`
285
279
  public interface TestInterface
286
280
  {
287
- public Some.Quite.Long.Type.That.Will.Split Handle<T>(
288
- Some.Quite.Long.Type.That.Will.Split message
289
- );
281
+ public Some.Quite.Long.Type.That.Will.Split.At.One.Hundred.Chars.Line.Width Handle<T>(
282
+ Some.Quite.Long.Type.That.Will.Split.At.One.Hundred.Chars.Line.Width message
283
+ );
290
284
  }
291
285
  `);
292
286
  });
@@ -2,7 +2,7 @@ import {
2
2
  Block,
3
3
  Children,
4
4
  MemberDeclaration,
5
- refkey,
5
+ MemberName,
6
6
  Refkey,
7
7
  Scope,
8
8
  } from "@alloy-js/core";
@@ -12,9 +12,8 @@ import {
12
12
  getAccessModifier,
13
13
  makeModifiers,
14
14
  } from "../../modifiers.js";
15
- import { useCSharpNamePolicy } from "../../name-policy.js";
16
- import { CSharpOutputSymbol } from "../../symbols/csharp-output-symbol.js";
17
- import { CSharpMemberScope, useCSharpScope } from "../../symbols/scopes.js";
15
+ import { createMethodScope } from "../../scopes/factories.js";
16
+ import { createMethodSymbol } from "../../symbols/factories.js";
18
17
  import { AttributeList, AttributesProp } from "../attributes/attributes.jsx";
19
18
  import { DocWhen } from "../doc/comment.jsx";
20
19
  import { ParameterProps, Parameters } from "../parameters/parameters.jsx";
@@ -76,23 +75,11 @@ export interface InterfaceMethodProps
76
75
 
77
76
  // a C# interface method
78
77
  export function InterfaceMethod(props: InterfaceMethodProps) {
79
- const name = useCSharpNamePolicy().getName(props.name, "class-method");
80
- const scope = useCSharpScope();
81
- if (scope.kind !== "member" || scope.name !== "interface-decl") {
82
- throw new Error(
83
- "can't define an interface method outside of an interface scope",
84
- );
85
- }
86
-
87
- const methodSymbol = new CSharpOutputSymbol(name, {
88
- scope,
89
- refkeys: props.refkey ?? refkey(props.name),
78
+ const methodSymbol = createMethodSymbol(props.name, {
79
+ refkeys: props.refkey,
90
80
  });
91
81
 
92
- // scope for method declaration
93
- const methodScope = new CSharpMemberScope("method-decl", {
94
- owner: methodSymbol,
95
- });
82
+ const methodScope = createMethodScope();
96
83
 
97
84
  const modifiers = computeModifiersPrefix([
98
85
  getAccessModifier(props),
@@ -105,7 +92,7 @@ export function InterfaceMethod(props: InterfaceMethodProps) {
105
92
  <DocWhen doc={props.doc} />
106
93
  <AttributeList attributes={props.attributes} endline />
107
94
  {modifiers}
108
- {props.returns ?? "void"} {name}
95
+ {props.returns ?? "void"} <MemberName />
109
96
  {props.typeParameters && (
110
97
  <TypeParameters parameters={props.typeParameters} />
111
98
  )}
@@ -30,7 +30,7 @@ describe("modifiers", () => {
30
30
  ).toRenderTo(`
31
31
  public interface TestInterface
32
32
  {
33
- ${accessModifier} string TestProp { get; }
33
+ ${accessModifier} string TestProp { get; }
34
34
  }
35
35
  `);
36
36
  },
@@ -51,7 +51,7 @@ describe("modifiers", () => {
51
51
  ).toRenderTo(`
52
52
  public interface TestInterface
53
53
  {
54
- ${methodModifier} string TestProp { get; }
54
+ ${methodModifier} string TestProp { get; }
55
55
  }
56
56
  `);
57
57
  });
@@ -65,7 +65,7 @@ describe("modifiers", () => {
65
65
  ).toRenderTo(`
66
66
  public interface TestInterface
67
67
  {
68
- public new string TestProp { get; }
68
+ public new string TestProp { get; }
69
69
  }
70
70
  `);
71
71
  });
@@ -79,7 +79,7 @@ it("applies PascalCase naming policy", () => {
79
79
  ).toRenderTo(`
80
80
  public interface TestInterface
81
81
  {
82
- string TestProp { get; }
82
+ string TestProp { get; }
83
83
  }
84
84
  `);
85
85
  });
@@ -92,7 +92,7 @@ it("has getter only", () => {
92
92
  ).toRenderTo(`
93
93
  public interface TestInterface
94
94
  {
95
- string TestProp { get; }
95
+ string TestProp { get; }
96
96
  }
97
97
  `);
98
98
  });
@@ -105,7 +105,7 @@ it("has setter only", () => {
105
105
  ).toRenderTo(`
106
106
  public interface TestInterface
107
107
  {
108
- string TestProp { set; }
108
+ string TestProp { set; }
109
109
  }
110
110
  `);
111
111
  });
@@ -117,7 +117,7 @@ it("has getter and setter", () => {
117
117
  ).toRenderTo(`
118
118
  public interface TestInterface
119
119
  {
120
- string TestProp { get; set; }
120
+ string TestProp { get; set; }
121
121
  }
122
122
  `);
123
123
  });
@@ -138,8 +138,8 @@ it("specify doc comment", () => {
138
138
  ).toRenderTo(`
139
139
  interface Test
140
140
  {
141
- /// This is a test
142
- string Method { get; set; }
141
+ /// This is a test
142
+ string Method { get; set; }
143
143
  }
144
144
  `);
145
145
  });
@@ -158,8 +158,8 @@ it("specify attributes", () => {
158
158
  ).toRenderTo(`
159
159
  public interface TestInterface
160
160
  {
161
- [Test]
162
- int Test { get; set; }
161
+ [Test]
162
+ int Test { get; set; }
163
163
  }
164
164
  `);
165
165
  });
@@ -3,9 +3,8 @@ import {
3
3
  Children,
4
4
  List,
5
5
  MemberDeclaration,
6
- refkey,
6
+ MemberName,
7
7
  Refkey,
8
- Scope,
9
8
  } from "@alloy-js/core";
10
9
  import {
11
10
  AccessModifiers,
@@ -13,9 +12,7 @@ import {
13
12
  getAccessModifier,
14
13
  makeModifiers,
15
14
  } from "../../modifiers.js";
16
- import { useCSharpNamePolicy } from "../../name-policy.js";
17
- import { CSharpOutputSymbol } from "../../symbols/csharp-output-symbol.js";
18
- import { CSharpMemberScope, useCSharpScope } from "../../symbols/scopes.js";
15
+ import { createPropertySymbol } from "../../symbols/factories.js";
19
16
  import { AttributeList, AttributesProp } from "../attributes/attributes.jsx";
20
17
  import { DocWhen } from "../doc/comment.jsx";
21
18
 
@@ -84,22 +81,8 @@ export interface InterfacePropertyProps
84
81
  * ```
85
82
  */
86
83
  export function InterfaceProperty(props: InterfacePropertyProps) {
87
- const name = useCSharpNamePolicy().getName(props.name, "class-property");
88
- const scope = useCSharpScope();
89
- if (scope.kind !== "member" || scope.name !== "interface-decl") {
90
- throw new Error(
91
- "can't define an interface method outside of an interface scope",
92
- );
93
- }
94
-
95
- const propertySymbol = new CSharpOutputSymbol(name, {
96
- scope,
97
- refkeys: props.refkey ?? refkey(props.name),
98
- });
99
-
100
- // scope for property declaration
101
- const propertyScope = new CSharpMemberScope("property-decl", {
102
- owner: propertySymbol,
84
+ const propertySymbol = createPropertySymbol(props.name, {
85
+ refkeys: props.refkey,
103
86
  });
104
87
 
105
88
  const modifiers = computeModifiersPrefix([
@@ -109,19 +92,17 @@ export function InterfaceProperty(props: InterfacePropertyProps) {
109
92
  // note that scope wraps the method decl so that the params get the correct scope
110
93
  return (
111
94
  <MemberDeclaration symbol={propertySymbol}>
112
- <Scope value={propertyScope}>
113
- <DocWhen doc={props.doc} />
114
- <AttributeList attributes={props.attributes} endline />
115
- {modifiers}
116
- {props.type}
117
- {props.nullable && "?"} {name}{" "}
118
- <Block newline inline>
119
- <List joiner=" ">
120
- {props.get && "get;"}
121
- {props.set && "set;"}
122
- </List>
123
- </Block>
124
- </Scope>
95
+ <DocWhen doc={props.doc} />
96
+ <AttributeList attributes={props.attributes} endline />
97
+ {modifiers}
98
+ {props.type}
99
+ {props.nullable && "?"} <MemberName />{" "}
100
+ <Block newline inline>
101
+ <List joiner=" ">
102
+ {props.get && "get;"}
103
+ {props.set && "set;"}
104
+ </List>
105
+ </Block>
125
106
  </MemberDeclaration>
126
107
  );
127
108
  }
@@ -0,0 +1,101 @@
1
+ import { ClassDeclaration } from "#components/class/declaration.jsx";
2
+ import { Method } from "#components/method/method.jsx";
3
+ import { TestNamespace } from "#test/utils.jsx";
4
+ import { namekey } from "@alloy-js/core";
5
+ import { describe, expect, it } from "vitest";
6
+ import { InvocationExpression } from "./invocation-expression.jsx";
7
+
8
+ it("makes a call with no arguments", () => {
9
+ const template = <InvocationExpression target="Foo" />;
10
+ expect(template).toRenderTo(`Foo()`);
11
+ });
12
+
13
+ it("makes a call with arguments", () => {
14
+ const template = (
15
+ <InvocationExpression target="Foo" args={["42", `"string"`]} />
16
+ );
17
+ expect(template).toRenderTo(`Foo(42, "string")`);
18
+ });
19
+
20
+ it("makes a call with type parameters", () => {
21
+ const template = (
22
+ <InvocationExpression target="Foo" typeArgs={["Bar", "Baz"]} />
23
+ );
24
+ expect(template).toRenderTo(`Foo<Bar, Baz>()`);
25
+ });
26
+
27
+ it("makes a call to a method", () => {
28
+ const cls = namekey("TestClass");
29
+ const method = namekey("Method");
30
+ const template = (
31
+ <TestNamespace>
32
+ <ClassDeclaration name={cls}>
33
+ <Method name={method}>return 1;</Method>
34
+ </ClassDeclaration>
35
+ <hbr />
36
+ <InvocationExpression target={method} />;
37
+ </TestNamespace>
38
+ );
39
+ expect(template).toRenderTo(`
40
+ class TestClass
41
+ {
42
+ void Method()
43
+ {
44
+ return 1;
45
+ }
46
+ }
47
+ TestClass.Method();
48
+ `);
49
+ });
50
+
51
+ describe("formatting", () => {
52
+ it("doesn't break one long argument", () => {
53
+ const template = (
54
+ <InvocationExpression target="Foo" args={["oneLongArgument"]} />
55
+ );
56
+ expect(template).toRenderTo(`Foo(oneLongArgument)`, { printWidth: 10 });
57
+ });
58
+
59
+ it("breaks multiple arguments", () => {
60
+ const template = (
61
+ <InvocationExpression
62
+ target="Foo"
63
+ args={["oneLongArgument", "anotherLongArgument"]}
64
+ />
65
+ );
66
+ expect(template).toRenderTo(
67
+ `
68
+ Foo(
69
+ oneLongArgument,
70
+ anotherLongArgument
71
+ )
72
+ `,
73
+ { printWidth: 10 },
74
+ );
75
+ });
76
+
77
+ it("doesn't break one long type argument", () => {
78
+ const template = (
79
+ <InvocationExpression target="Foo" typeArgs={["oneLongArgument"]} />
80
+ );
81
+ expect(template).toRenderTo(`Foo<oneLongArgument>()`, { printWidth: 10 });
82
+ });
83
+
84
+ it("breaks multiple type arguments", () => {
85
+ const template = (
86
+ <InvocationExpression
87
+ target="Foo"
88
+ typeArgs={["oneLongArgument", "anotherLongArgument"]}
89
+ />
90
+ );
91
+ expect(template).toRenderTo(
92
+ `
93
+ Foo<
94
+ oneLongArgument,
95
+ anotherLongArgument
96
+ >()
97
+ `,
98
+ { printWidth: 10 },
99
+ );
100
+ });
101
+ });
@@ -0,0 +1,60 @@
1
+ import { Children, For, Indent, Show, Wrap } from "@alloy-js/core";
2
+
3
+ export interface InvocationExpressionProps {
4
+ target: Children;
5
+ /**
6
+ * Arguments to pass to the invocation.
7
+ */
8
+ args?: Children[];
9
+ /**
10
+ * Generic type arguments for the invocation.
11
+ */
12
+ typeArgs?: Children[];
13
+ }
14
+
15
+ /**
16
+ * A call to a function or method.
17
+ *
18
+ * @example
19
+ *
20
+ * ```jsx
21
+ * <InvocationExpression target="Foo" typeArgs={["T"]} args={["x"]} />
22
+ * ```
23
+ *
24
+ * Renders to:
25
+ *
26
+ * ```csharp
27
+ * Foo<T>("x");
28
+ * ```
29
+ */
30
+ export function InvocationExpression(props: InvocationExpressionProps) {
31
+ return (
32
+ <group>
33
+ {props.target}
34
+ <Show when={!!props.typeArgs && props.typeArgs.length > 0}>
35
+ {"<"}
36
+ <Wrap
37
+ when={props.typeArgs!.length > 1}
38
+ with={Indent}
39
+ props={{ softline: true, trailingBreak: true }}
40
+ >
41
+ <For each={props.typeArgs ?? []} comma line>
42
+ {(typeArg) => typeArg}
43
+ </For>
44
+ </Wrap>
45
+ {">"}
46
+ </Show>
47
+ (
48
+ <Wrap
49
+ when={!!props.args && props.args.length > 1}
50
+ with={Indent}
51
+ props={{ softline: true, trailingBreak: true }}
52
+ >
53
+ <For each={props.args ?? []} comma line>
54
+ {(arg) => arg}
55
+ </For>
56
+ </Wrap>
57
+ )
58
+ </group>
59
+ );
60
+ }
@@ -0,0 +1,29 @@
1
+ import { Scope, ScopePropsWithInfo, ScopePropsWithValue } from "@alloy-js/core";
2
+ import { useCSharpScope } from "../scopes/contexts.js";
3
+ import { CSharpLexicalScope } from "../scopes/lexical.js";
4
+
5
+ export interface LexicalScopePropsWithScopeValue extends ScopePropsWithValue {}
6
+ export interface LeixcalScopePropsWithScopeInfo extends ScopePropsWithInfo {}
7
+
8
+ export type LexicalScopeProps =
9
+ | LexicalScopePropsWithScopeValue
10
+ | LeixcalScopePropsWithScopeInfo;
11
+
12
+ export function LexicalScope(props: LexicalScopeProps) {
13
+ let scope;
14
+ if ("value" in props) {
15
+ if (!(props.value instanceof CSharpLexicalScope)) {
16
+ throw new Error(
17
+ "LexicalScope value must be a CSharpLexicalScope instance",
18
+ );
19
+ }
20
+ scope = props.value;
21
+ } else {
22
+ const parentScope = useCSharpScope();
23
+ scope = new CSharpLexicalScope(props.name ?? "lexical scope", parentScope, {
24
+ ...props,
25
+ });
26
+ }
27
+
28
+ return <Scope value={scope}>{props.children}</Scope>;
29
+ }
@@ -23,7 +23,7 @@ describe("modifiers", () => {
23
23
  ).toRenderTo(`
24
24
  public class TestClass
25
25
  {
26
- ${accessModifier} void MethodOne() {}
26
+ ${accessModifier} void MethodOne() {}
27
27
  }
28
28
  `);
29
29
  },
@@ -41,7 +41,7 @@ describe("modifiers", () => {
41
41
  ).toRenderTo(`
42
42
  public class TestClass
43
43
  {
44
- ${methodModifier} void MethodOne() {}
44
+ ${methodModifier} void MethodOne() {}
45
45
  }
46
46
  `);
47
47
  },
@@ -55,7 +55,7 @@ describe("modifiers", () => {
55
55
  ).toRenderTo(`
56
56
  public class TestClass
57
57
  {
58
- abstract void MethodOne();
58
+ abstract void MethodOne();
59
59
  }
60
60
  `);
61
61
  });
@@ -69,7 +69,7 @@ describe("modifiers", () => {
69
69
  ).toRenderTo(`
70
70
  public class TestClass
71
71
  {
72
- async Task MethodOne() {}
72
+ async Task MethodOne() {}
73
73
  }
74
74
  `);
75
75
  });
@@ -82,7 +82,7 @@ describe("modifiers", () => {
82
82
  ).toRenderTo(`
83
83
  public class TestClass
84
84
  {
85
- public abstract async Task MethodOne();
85
+ public abstract async Task MethodOne();
86
86
  }
87
87
  `);
88
88
  });
@@ -96,7 +96,7 @@ it("applies PascalCase naming policy", () => {
96
96
  ).toRenderTo(`
97
97
  public class TestClass
98
98
  {
99
- void MethodOne() {}
99
+ void MethodOne() {}
100
100
  }
101
101
  `);
102
102
  });
@@ -120,7 +120,7 @@ it("defines params and return type", () => {
120
120
  expect(res).toRenderTo(`
121
121
  public class TestClass
122
122
  {
123
- public string MethodOne(int intParam, string stringParam) {}
123
+ public string MethodOne(int intParam, string stringParam) {}
124
124
  }
125
125
  `);
126
126
  });
@@ -135,8 +135,8 @@ it("specify doc comment", () => {
135
135
  ).toRenderTo(`
136
136
  class Test
137
137
  {
138
- /// This is a test
139
- void Method() {}
138
+ /// This is a test
139
+ void Method() {}
140
140
  }
141
141
  `);
142
142
  });
@@ -153,8 +153,8 @@ it("use expression body form", () => {
153
153
  ).toRenderTo(`
154
154
  class Test
155
155
  {
156
- /// This is a test
157
- void Method() => this.MyProperty.Value;
156
+ /// This is a test
157
+ void Method() => this.MyProperty.Value;
158
158
  }
159
159
  `);
160
160
  });