@typespec/emitter-framework 0.9.0-dev.1 → 0.9.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 (192) hide show
  1. package/dist/src/core/components/output.d.ts +4 -4
  2. package/dist/src/core/components/output.d.ts.map +1 -1
  3. package/dist/src/core/components/output.js +3 -3
  4. package/dist/src/core/context/name-policy-context.d.ts +2 -2
  5. package/dist/src/core/context/name-policy-context.d.ts.map +1 -1
  6. package/dist/src/core/context/tsp-context.d.ts +2 -2
  7. package/dist/src/core/context/tsp-context.d.ts.map +1 -1
  8. package/dist/src/core/transport-name-policy.d.ts +1 -1
  9. package/dist/src/core/transport-name-policy.d.ts.map +1 -1
  10. package/dist/src/core/write-output.d.ts +2 -2
  11. package/dist/src/core/write-output.d.ts.map +1 -1
  12. package/dist/src/csharp/components/class/declaration.d.ts +13 -0
  13. package/dist/src/csharp/components/class/declaration.d.ts.map +1 -0
  14. package/dist/src/csharp/components/class/declaration.js +91 -0
  15. package/dist/src/csharp/components/class/declaration.test.d.ts +2 -0
  16. package/dist/src/csharp/components/class/declaration.test.d.ts.map +1 -0
  17. package/dist/src/csharp/components/class/declaration.test.js +377 -0
  18. package/dist/src/csharp/components/enum/declaration.d.ts +9 -0
  19. package/dist/src/csharp/components/enum/declaration.d.ts.map +1 -0
  20. package/dist/src/csharp/components/enum/declaration.js +55 -0
  21. package/dist/src/csharp/components/enum/declaration.test.d.ts +2 -0
  22. package/dist/src/csharp/components/enum/declaration.test.d.ts.map +1 -0
  23. package/dist/src/csharp/components/enum/declaration.test.js +309 -0
  24. package/dist/src/csharp/components/index.d.ts +5 -0
  25. package/dist/src/csharp/components/index.d.ts.map +1 -0
  26. package/dist/src/csharp/components/index.js +4 -0
  27. package/dist/src/csharp/components/property/property.d.ts +15 -0
  28. package/dist/src/csharp/components/property/property.d.ts.map +1 -0
  29. package/dist/src/csharp/components/property/property.js +85 -0
  30. package/dist/src/csharp/components/property/property.test.d.ts +2 -0
  31. package/dist/src/csharp/components/property/property.test.d.ts.map +1 -0
  32. package/dist/src/csharp/components/property/property.test.js +117 -0
  33. package/dist/src/csharp/components/type-expression.d.ts +11 -0
  34. package/dist/src/csharp/components/type-expression.d.ts.map +1 -0
  35. package/dist/src/csharp/components/type-expression.js +143 -0
  36. package/dist/src/csharp/components/type-expression.test.d.ts +2 -0
  37. package/dist/src/csharp/components/type-expression.test.d.ts.map +1 -0
  38. package/dist/src/csharp/components/type-expression.test.js +128 -0
  39. package/dist/src/csharp/components/utils/doc-comments.d.ts +14 -0
  40. package/dist/src/csharp/components/utils/doc-comments.d.ts.map +1 -0
  41. package/dist/src/csharp/components/utils/doc-comments.js +67 -0
  42. package/dist/src/csharp/components/utils/refkey.d.ts +23 -0
  43. package/dist/src/csharp/components/utils/refkey.d.ts.map +1 -0
  44. package/dist/src/csharp/components/utils/refkey.js +35 -0
  45. package/dist/src/csharp/index.d.ts +2 -0
  46. package/dist/src/csharp/index.d.ts.map +1 -0
  47. package/dist/src/csharp/index.js +1 -0
  48. package/dist/src/testing/index.d.ts +1 -1
  49. package/dist/src/testing/index.d.ts.map +1 -1
  50. package/dist/src/testing/scenario-test/code-block-expectation.d.ts +33 -0
  51. package/dist/src/testing/scenario-test/code-block-expectation.d.ts.map +1 -0
  52. package/dist/src/testing/scenario-test/code-block-expectation.js +69 -0
  53. package/dist/src/testing/scenario-test/code-block-expectation.test.d.ts +2 -0
  54. package/dist/src/testing/scenario-test/code-block-expectation.test.d.ts.map +1 -0
  55. package/dist/src/testing/scenario-test/code-block-expectation.test.js +80 -0
  56. package/dist/src/testing/scenario-test/harness.d.ts +3 -3
  57. package/dist/src/testing/scenario-test/harness.d.ts.map +1 -1
  58. package/dist/src/testing/scenario-test/harness.js +69 -158
  59. package/dist/src/testing/scenario-test/index.d.ts +0 -1
  60. package/dist/src/testing/scenario-test/index.d.ts.map +1 -1
  61. package/dist/src/testing/scenario-test/index.js +1 -2
  62. package/dist/src/testing/scenario-test/snippet-extractor.d.ts +1 -1
  63. package/dist/src/testing/scenario-test/snippet-extractor.js +1 -1
  64. package/dist/src/typescript/components/array-expression.d.ts +2 -3
  65. package/dist/src/typescript/components/array-expression.d.ts.map +1 -1
  66. package/dist/src/typescript/components/array-expression.js +2 -2
  67. package/dist/src/typescript/components/arrow-function.d.ts +2 -2
  68. package/dist/src/typescript/components/arrow-function.d.ts.map +1 -1
  69. package/dist/src/typescript/components/arrow-function.js +2 -1
  70. package/dist/src/typescript/components/class-method.d.ts +1 -1
  71. package/dist/src/typescript/components/class-method.d.ts.map +1 -1
  72. package/dist/src/typescript/components/enum-declaration.d.ts +6 -6
  73. package/dist/src/typescript/components/enum-declaration.d.ts.map +1 -1
  74. package/dist/src/typescript/components/enum-declaration.js +2 -2
  75. package/dist/src/typescript/components/function-declaration.d.ts +1 -1
  76. package/dist/src/typescript/components/function-declaration.d.ts.map +1 -1
  77. package/dist/src/typescript/components/function-expression.d.ts +2 -2
  78. package/dist/src/typescript/components/function-expression.d.ts.map +1 -1
  79. package/dist/src/typescript/components/function-expression.js +2 -1
  80. package/dist/src/typescript/components/function-type.d.ts +2 -2
  81. package/dist/src/typescript/components/function-type.d.ts.map +1 -1
  82. package/dist/src/typescript/components/function-type.js +2 -1
  83. package/dist/src/typescript/components/interface-declaration.d.ts +4 -4
  84. package/dist/src/typescript/components/interface-declaration.d.ts.map +1 -1
  85. package/dist/src/typescript/components/interface-declaration.js +3 -4
  86. package/dist/src/typescript/components/interface-member.d.ts +2 -2
  87. package/dist/src/typescript/components/interface-member.d.ts.map +1 -1
  88. package/dist/src/typescript/components/interface-method.d.ts +2 -2
  89. package/dist/src/typescript/components/interface-method.d.ts.map +1 -1
  90. package/dist/src/typescript/components/record-expression.d.ts +1 -1
  91. package/dist/src/typescript/components/record-expression.d.ts.map +1 -1
  92. package/dist/src/typescript/components/type-alias-declaration.d.ts +1 -1
  93. package/dist/src/typescript/components/type-alias-declaration.d.ts.map +1 -1
  94. package/dist/src/typescript/components/type-declaration.d.ts +1 -1
  95. package/dist/src/typescript/components/type-declaration.d.ts.map +1 -1
  96. package/dist/src/typescript/components/type-expression.d.ts +1 -1
  97. package/dist/src/typescript/components/type-expression.d.ts.map +1 -1
  98. package/dist/src/typescript/components/type-transform.d.ts +2 -2
  99. package/dist/src/typescript/components/type-transform.d.ts.map +1 -1
  100. package/dist/src/typescript/components/union-declaration.d.ts +2 -2
  101. package/dist/src/typescript/components/union-declaration.d.ts.map +1 -1
  102. package/dist/src/typescript/components/union-expression.d.ts +3 -4
  103. package/dist/src/typescript/components/union-expression.d.ts.map +1 -1
  104. package/dist/src/typescript/components/union-expression.js +3 -3
  105. package/dist/src/typescript/components/value-expression.d.ts +2 -2
  106. package/dist/src/typescript/components/value-expression.d.ts.map +1 -1
  107. package/dist/src/typescript/utils/operation.d.ts +2 -2
  108. package/dist/src/typescript/utils/operation.d.ts.map +1 -1
  109. package/dist/test/test-host.d.ts +2 -0
  110. package/dist/test/test-host.d.ts.map +1 -0
  111. package/dist/test/test-host.js +5 -0
  112. package/dist/test/testing/snippet-extractor-csharp.test.js +3 -3
  113. package/dist/test/testing/snippet-extractor-java.test.js +3 -3
  114. package/dist/test/testing/snippet-extractor-python.test.js +2 -2
  115. package/dist/test/testing/snippet-extractor-typescript.test.js +3 -3
  116. package/dist/test/typescript/components/member-expression.test.js +5 -5
  117. package/dist/test/typescript/test-host.d.ts +1 -1
  118. package/dist/test/typescript/test-host.d.ts.map +1 -1
  119. package/dist/test/utils.d.ts +2 -2
  120. package/dist/test/utils.d.ts.map +1 -1
  121. package/dist/test/vitest.setup.d.ts +2 -0
  122. package/dist/test/vitest.setup.d.ts.map +1 -0
  123. package/dist/test/vitest.setup.js +1 -0
  124. package/package.json +26 -8
  125. package/src/core/components/output.tsx +9 -5
  126. package/src/core/context/name-policy-context.ts +2 -2
  127. package/src/core/context/tsp-context.ts +2 -2
  128. package/src/core/transport-name-policy.ts +1 -1
  129. package/src/core/write-output.ts +2 -2
  130. package/src/csharp/components/class/declaration.test.tsx +339 -0
  131. package/src/csharp/components/class/declaration.tsx +86 -0
  132. package/src/csharp/components/enum/declaration.test.tsx +267 -0
  133. package/src/csharp/components/enum/declaration.tsx +56 -0
  134. package/src/csharp/components/index.ts +4 -0
  135. package/src/csharp/components/property/property.test.tsx +97 -0
  136. package/src/csharp/components/property/property.tsx +62 -0
  137. package/src/csharp/components/type-expression.test.tsx +133 -0
  138. package/src/csharp/components/type-expression.tsx +119 -0
  139. package/src/csharp/components/utils/doc-comments.tsx +58 -0
  140. package/src/csharp/components/utils/refkey.ts +36 -0
  141. package/src/csharp/index.ts +1 -0
  142. package/src/testing/index.ts +1 -1
  143. package/src/testing/scenario-test/code-block-expectation.test.ts +95 -0
  144. package/src/testing/scenario-test/code-block-expectation.ts +115 -0
  145. package/src/testing/scenario-test/harness.ts +92 -237
  146. package/src/testing/scenario-test/index.ts +0 -1
  147. package/src/testing/scenario-test/snippet-extractor.ts +1 -1
  148. package/src/typescript/components/array-expression.tsx +3 -3
  149. package/src/typescript/components/arrow-function.tsx +2 -2
  150. package/src/typescript/components/class-method.tsx +1 -1
  151. package/src/typescript/components/enum-declaration.tsx +6 -6
  152. package/src/typescript/components/function-declaration.tsx +1 -1
  153. package/src/typescript/components/function-expression.tsx +2 -2
  154. package/src/typescript/components/function-type.tsx +2 -2
  155. package/src/typescript/components/interface-declaration.tsx +11 -12
  156. package/src/typescript/components/interface-member.tsx +2 -2
  157. package/src/typescript/components/interface-method.tsx +2 -2
  158. package/src/typescript/components/record-expression.tsx +1 -1
  159. package/src/typescript/components/type-alias-declaration.tsx +1 -1
  160. package/src/typescript/components/type-declaration.tsx +1 -1
  161. package/src/typescript/components/type-expression.tsx +2 -2
  162. package/src/typescript/components/type-transform.tsx +3 -3
  163. package/src/typescript/components/union-declaration.tsx +2 -2
  164. package/src/typescript/components/union-expression.tsx +12 -7
  165. package/src/typescript/components/value-expression.tsx +2 -2
  166. package/src/typescript/utils/operation.ts +2 -2
  167. package/test/test-host.ts +4 -0
  168. package/test/testing/snippet-extractor-csharp.test.ts +4 -4
  169. package/test/testing/snippet-extractor-java.test.ts +4 -4
  170. package/test/testing/snippet-extractor-python.test.ts +3 -3
  171. package/test/testing/snippet-extractor-typescript.test.ts +4 -4
  172. package/test/typescript/components/arrow-function.test.tsx +2 -2
  173. package/test/typescript/components/enum-declaration.test.tsx +1 -1
  174. package/test/typescript/components/function-declaration.test.tsx +1 -1
  175. package/test/typescript/components/function-expression.test.tsx +2 -2
  176. package/test/typescript/components/function-type.test.tsx +2 -2
  177. package/test/typescript/components/interface-declaration.test.tsx +1 -1
  178. package/test/typescript/components/interface-method.test.tsx +2 -2
  179. package/test/typescript/components/member-expression.test.tsx +10 -10
  180. package/test/typescript/components/type-alias-declaration.test.tsx +1 -1
  181. package/test/typescript/components/type-transform.test.tsx +2 -2
  182. package/test/typescript/components/union-declaration.test.tsx +2 -2
  183. package/test/typescript/components/value-expression.test.tsx +6 -6
  184. package/test/typescript/test-host.ts +1 -1
  185. package/test/utils.ts +2 -2
  186. package/test/vitest.setup.ts +1 -0
  187. package/tsconfig.json +3 -1
  188. package/vitest.config.ts +2 -1
  189. package/dist/src/testing/scenario-test/test-host.d.ts +0 -8
  190. package/dist/src/testing/scenario-test/test-host.d.ts.map +0 -1
  191. package/dist/src/testing/scenario-test/test-host.js +0 -49
  192. package/src/testing/scenario-test/test-host.ts +0 -83
@@ -1 +1 @@
1
- {"version":3,"file":"record-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/record-expression.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,IAAI,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,EAAE,qBAAqB,qCAItE"}
1
+ {"version":3,"file":"record-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/record-expression.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,IAAI,CAAC;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,EAAE,qBAAqB,qCAItE"}
@@ -1,5 +1,5 @@
1
1
  import * as ts from "@alloy-js/typescript";
2
- import { Type } from "@typespec/compiler";
2
+ import type { Type } from "@typespec/compiler";
3
3
  export interface TypedAliasDeclarationProps extends Omit<ts.TypeDeclarationProps, "name"> {
4
4
  type: Type;
5
5
  name?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"type-alias-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-alias-declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAM1C,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACvF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qCAwBpE"}
1
+ {"version":3,"file":"type-alias-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-alias-declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAM/C,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACvF,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAE7F;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qCAwBpE"}
@@ -1,5 +1,5 @@
1
1
  import * as ts from "@alloy-js/typescript";
2
- import { Type } from "@typespec/compiler";
2
+ import type { Type } from "@typespec/compiler";
3
3
  export interface TypeDeclarationProps extends Omit<ts.TypeDeclarationProps, "name"> {
4
4
  name?: string;
5
5
  type?: Type;
@@ -1 +1 @@
1
- {"version":3,"file":"type-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAQ1C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAE1E,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qCA0B1D"}
1
+ {"version":3,"file":"type-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG;KAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAE1E,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qCA0B1D"}
@@ -1,4 +1,4 @@
1
- import { Type } from "@typespec/compiler";
1
+ import type { Type } from "@typespec/compiler";
2
2
  import "@typespec/http/experimental/typekit";
3
3
  export interface TypeExpressionProps {
4
4
  type: Type;
@@ -1 +1 @@
1
- {"version":3,"file":"type-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-expression.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgC,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,qCAAqC,CAAC;AAU7C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;IAEX;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qCA0DxD"}
1
+ {"version":3,"file":"type-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-expression.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAgC,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE7E,OAAO,qCAAqC,CAAC;AAU7C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;IAEX;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qCA0DxD"}
@@ -1,5 +1,5 @@
1
- import { Children, Refkey } from "@alloy-js/core";
2
- import { Model, Type, Union } from "@typespec/compiler";
1
+ import { type Children, type Refkey } from "@alloy-js/core";
2
+ import type { Model, Type, Union } from "@typespec/compiler";
3
3
  export interface TypeTransformProps {
4
4
  name?: string;
5
5
  type: Type;
@@ -1 +1 @@
1
- {"version":3,"file":"type-transform.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-transform.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAEL,KAAK,EAIL,IAAI,EACJ,KAAK,EACN,MAAM,oBAAoB,CAAC;AAc5B,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;CACrC;AA+DD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,YAqEjE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,UAEvF;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,YAwE5E;AAyDD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,QAAQ,CAuEzE"}
1
+ {"version":3,"file":"type-transform.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-transform.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAsB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAEhF,OAAO,KAAK,EAEV,KAAK,EAIL,IAAI,EACJ,KAAK,EACN,MAAM,oBAAoB,CAAC;AAc5B,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;CACrC;AA+DD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,kBAAkB,YAqEjE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,GAAG,WAAW,UAEvF;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,YAwE5E;AAyDD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,aAAa,GAAG,WAAW,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,QAAQ,CAuEzE"}
@@ -1,6 +1,6 @@
1
- import { Children } from "@alloy-js/core";
1
+ import { type Children } from "@alloy-js/core";
2
2
  import * as ts from "@alloy-js/typescript";
3
- import { Enum, Union } from "@typespec/compiler";
3
+ import type { Enum, Union } from "@typespec/compiler";
4
4
  export interface TypedUnionDeclarationProps extends Omit<ts.TypeDeclarationProps, "name"> {
5
5
  type: Union | Enum;
6
6
  doc?: Children;
@@ -1 +1 @@
1
- {"version":3,"file":"union-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/union-declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAMjD,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACvF,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAEzF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YAuB5D"}
1
+ {"version":3,"file":"union-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/union-declaration.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAMtD,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACvF,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,qBAAqB,GAAG,0BAA0B,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAEzF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,YAuB5D"}
@@ -1,9 +1,8 @@
1
- import * as ay from "@alloy-js/core";
2
- import { Children } from "@alloy-js/core";
3
- import { Enum, Union } from "@typespec/compiler";
1
+ import { type Children } from "@alloy-js/core";
2
+ import { type Enum, type Union } from "@typespec/compiler";
4
3
  export interface UnionExpressionProps {
5
4
  type: Union | Enum;
6
5
  children?: Children;
7
6
  }
8
- export declare function UnionExpression({ type, children }: UnionExpressionProps): ay.Children;
7
+ export declare function UnionExpression({ type, children }: UnionExpressionProps): Children;
9
8
  //# sourceMappingURL=union-expression.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"union-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/union-expression.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAkB,IAAI,EAAc,KAAK,EAAgB,MAAM,oBAAoB,CAAC;AAK3F,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,oBAAoB,eA+CvE"}
1
+ {"version":3,"file":"union-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/union-expression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAa,MAAM,gBAAgB,CAAC;AAE1D,OAAO,EAEL,KAAK,IAAI,EAET,KAAK,KAAK,EAEX,MAAM,oBAAoB,CAAC;AAK5B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,oBAAoB,YA+CvE"}
@@ -1,5 +1,5 @@
1
1
  import { createComponent as _$createComponent, memo as _$memo } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { For, List } from "@alloy-js/core";
3
3
  import * as ts from "@alloy-js/typescript";
4
4
  import { compilerAssert } from "@typespec/compiler";
5
5
  import { useTsp } from "../../core/context/tsp-context.js";
@@ -13,7 +13,7 @@ export function UnionExpression({
13
13
  $
14
14
  } = useTsp();
15
15
  const items = $.union.is(type) ? type.variants : type.members;
16
- const variants = _$createComponent(ay.For, {
16
+ const variants = _$createComponent(For, {
17
17
  joiner: " | ",
18
18
  each: items,
19
19
  children: (_, type) => {
@@ -106,7 +106,7 @@ function NoneEnvelope(props) {
106
106
  type: model
107
107
  });
108
108
  }
109
- return _$createComponent(ay.List, {
109
+ return _$createComponent(List, {
110
110
  joiner: " & ",
111
111
  get children() {
112
112
  return [_$createComponent(ts.ObjectExpression, {
@@ -1,5 +1,5 @@
1
- import { Children } from "@alloy-js/core";
2
- import { Value } from "@typespec/compiler";
1
+ import { type Children } from "@alloy-js/core";
2
+ import { type Value } from "@typespec/compiler";
3
3
  /**
4
4
  * Properties for the {@link ValueExpression} component.
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"value-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/value-expression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAkB,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,UAAU,oBAAoB;IAC5B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,QAAQ,CAoC/E"}
1
+ {"version":3,"file":"value-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/value-expression.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhE;;GAEG;AACH,UAAU,oBAAoB;IAC5B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,QAAQ,CAoC/E"}
@@ -1,6 +1,6 @@
1
- import { Refkey } from "@alloy-js/core";
1
+ import { type Refkey } from "@alloy-js/core";
2
2
  import * as ts from "@alloy-js/typescript";
3
- import { Model, ModelProperty, Operation, Type } from "@typespec/compiler";
3
+ import type { Model, ModelProperty, Operation, Type } from "@typespec/compiler";
4
4
  export declare function getReturnType(type: Operation, options?: {
5
5
  skipErrorFiltering: boolean;
6
6
  }): Type;
@@ -1 +1 @@
1
- {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../src/typescript/utils/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAK3E,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,EACf,OAAO,GAAE;IAAE,kBAAkB,EAAE,OAAO,CAAA;CAAkC,GACvE,IAAI,CASN;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,EAAE,CAAC,mBAAmB,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACzD,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,KAAK,EACX,OAAO,GAAE,gCAAqC,GAC7C,EAAE,CAAC,mBAAmB,EAAE,GAAG,SAAS,CAqBtC;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,MAAM,GACnB,EAAE,CAAC,mBAAmB,CAaxB"}
1
+ {"version":3,"file":"operation.d.ts","sourceRoot":"","sources":["../../../../src/typescript/utils/operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAKhF,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,EACf,OAAO,GAAE;IAAE,kBAAkB,EAAE,OAAO,CAAA;CAAkC,GACvE,IAAI,CASN;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,EAAE,CAAC,mBAAmB,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACzD,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,KAAK,EACX,OAAO,GAAE,gCAAqC,GAC7C,EAAE,CAAC,mBAAmB,EAAE,GAAG,SAAS,CAqBtC;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,MAAM,GACnB,EAAE,CAAC,mBAAmB,CAaxB"}
@@ -0,0 +1,2 @@
1
+ export declare const Tester: import("@typespec/compiler/testing").Tester;
2
+ //# sourceMappingURL=test-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-host.d.ts","sourceRoot":"","sources":["../../test/test-host.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,6CAA0E,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { resolvePath } from "@typespec/compiler";
2
+ import { createTester } from "@typespec/compiler/testing";
3
+ export const Tester = createTester(resolvePath(import.meta.dirname, ".."), {
4
+ libraries: []
5
+ });
@@ -1,10 +1,10 @@
1
1
  import { d } from "@alloy-js/core/testing";
2
2
  import { beforeEach, describe, expect, it } from "vitest";
3
- import { createCSharpExtractorConfig, createSnipperExtractor } from "../../src/testing/index.js";
3
+ import { createCSharpExtractorConfig, createSnippetExtractor } from "../../src/testing/index.js";
4
4
  describe("C# Snippet Extractor", () => {
5
5
  let extractor;
6
6
  beforeEach(async () => {
7
- extractor = createSnipperExtractor(await createCSharpExtractorConfig());
7
+ extractor = createSnippetExtractor(await createCSharpExtractorConfig());
8
8
  });
9
9
  it("should extract a class", () => {
10
10
  const content = d`
@@ -53,7 +53,7 @@ describe("C# Snippet Extractor", () => {
53
53
  describe("C# Snippet Extractor - Enums", () => {
54
54
  let extractor;
55
55
  beforeEach(async () => {
56
- extractor = createSnipperExtractor(await createCSharpExtractorConfig());
56
+ extractor = createSnippetExtractor(await createCSharpExtractorConfig());
57
57
  });
58
58
  it("should extract a basic enum", async () => {
59
59
  const content = d`
@@ -1,10 +1,10 @@
1
1
  import { d } from "@alloy-js/core/testing";
2
2
  import { beforeEach, describe, expect, it } from "vitest";
3
- import { createJavaExtractorConfig, createSnipperExtractor } from "../../src/testing/index.js";
3
+ import { createJavaExtractorConfig, createSnippetExtractor } from "../../src/testing/index.js";
4
4
  describe("Java Snippet Extractor", () => {
5
5
  let extractor;
6
6
  beforeEach(async () => {
7
- extractor = createSnipperExtractor(await createJavaExtractorConfig());
7
+ extractor = createSnippetExtractor(await createJavaExtractorConfig());
8
8
  });
9
9
  it("should extract a class", () => {
10
10
  const content = d`
@@ -53,7 +53,7 @@ describe("Java Snippet Extractor", () => {
53
53
  describe("Java Snippet Extractor - Enums", () => {
54
54
  let extractor;
55
55
  beforeEach(async () => {
56
- extractor = createSnipperExtractor(await createJavaExtractorConfig());
56
+ extractor = createSnippetExtractor(await createJavaExtractorConfig());
57
57
  });
58
58
  it("should extract a basic enum", async () => {
59
59
  const content = d`
@@ -1,10 +1,10 @@
1
1
  import { d } from "@alloy-js/core/testing";
2
2
  import { beforeEach, describe, expect, it } from "vitest";
3
- import { createPythonExtractorConfig, createSnipperExtractor } from "../../src/testing/index.js";
3
+ import { createPythonExtractorConfig, createSnippetExtractor } from "../../src/testing/index.js";
4
4
  describe("Python Snippet Extractor", () => {
5
5
  let extractor;
6
6
  beforeEach(async () => {
7
- extractor = createSnipperExtractor(await createPythonExtractorConfig());
7
+ extractor = createSnippetExtractor(await createPythonExtractorConfig());
8
8
  });
9
9
  it("should extract a class", () => {
10
10
  const content = d`
@@ -1,10 +1,10 @@
1
1
  import { d } from "@alloy-js/core/testing";
2
2
  import { beforeEach, describe, expect, it } from "vitest";
3
- import { createSnipperExtractor, createTypeScriptExtractorConfig } from "../../src/testing/index.js";
3
+ import { createSnippetExtractor, createTypeScriptExtractorConfig } from "../../src/testing/index.js";
4
4
  describe("TypeScript Snippet Extractor", () => {
5
5
  let extractor;
6
6
  beforeEach(async () => {
7
- extractor = createSnipperExtractor(await createTypeScriptExtractorConfig());
7
+ extractor = createSnippetExtractor(await createTypeScriptExtractorConfig());
8
8
  });
9
9
  it("should extract a class", async () => {
10
10
  const content = d`
@@ -122,7 +122,7 @@ describe("TypeScript Snippet Extractor", () => {
122
122
  describe("TypeScript Snippet Extractor - Enums", () => {
123
123
  let extractor;
124
124
  beforeEach(async () => {
125
- extractor = createSnipperExtractor(await createTypeScriptExtractorConfig());
125
+ extractor = createSnippetExtractor(await createTypeScriptExtractorConfig());
126
126
  });
127
127
  it("should extract a basic enum", async () => {
128
128
  const content = d`
@@ -1,5 +1,5 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
- import * as ay from "@alloy-js/core";
2
+ import { List } from "@alloy-js/core";
3
3
  import { d } from "@alloy-js/core/testing";
4
4
  import { describe, expect, it } from "vitest";
5
5
  import { TspContext } from "../../../src/core/index.js";
@@ -26,7 +26,7 @@ describe("Typescript Enum Member Expression", () => {
26
26
  program
27
27
  },
28
28
  get children() {
29
- return _$createComponent(ay.List, {
29
+ return _$createComponent(List, {
30
30
  hardline: true,
31
31
  get children() {
32
32
  return [_$createComponent(EnumDeclaration, {
@@ -71,7 +71,7 @@ describe("Typescript Enum Member Expression", () => {
71
71
  program
72
72
  },
73
73
  get children() {
74
- return _$createComponent(ay.List, {
74
+ return _$createComponent(List, {
75
75
  hardline: true,
76
76
  get children() {
77
77
  return [_$createComponent(EnumDeclaration, {
@@ -118,7 +118,7 @@ describe("Typescript Union Member Expression", () => {
118
118
  program
119
119
  },
120
120
  get children() {
121
- return _$createComponent(ay.List, {
121
+ return _$createComponent(List, {
122
122
  hardline: true,
123
123
  get children() {
124
124
  return [_$createComponent(UnionDeclaration, {
@@ -159,7 +159,7 @@ describe("Typescript Union Member Expression", () => {
159
159
  program
160
160
  },
161
161
  get children() {
162
- return _$createComponent(ay.List, {
162
+ return _$createComponent(List, {
163
163
  hardline: true,
164
164
  get children() {
165
165
  return [_$createComponent(UnionDeclaration, {
@@ -1,4 +1,4 @@
1
- import { Program } from "@typespec/compiler";
1
+ import type { Program } from "@typespec/compiler";
2
2
  export declare function createTypespecCliTestHost(options?: {
3
3
  libraries: "Http"[];
4
4
  }): Promise<import("@typespec/compiler/testing").TestHost>;
@@ -1 +1 @@
1
- {"version":3,"file":"test-host.d.ts","sourceRoot":"","sources":["../../../test/typescript/test-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAQ7C,wBAAsB,yBAAyB,CAC7C,OAAO,GAAE;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAsB,0DASrD;AAED,wBAAsB,gCAAgC,CAAC,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,iEAK7F;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAsB,GACnD,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtD"}
1
+ {"version":3,"file":"test-host.d.ts","sourceRoot":"","sources":["../../../test/typescript/test-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAQlD,wBAAsB,yBAAyB,CAC7C,OAAO,GAAE;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAsB,0DASrD;AAED,wBAAsB,gCAAgC,CAAC,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,iEAK7F;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAsB,GACnD,OAAO,CAAC,OAAO,CAAC,CAUlB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtD"}
@@ -1,5 +1,5 @@
1
- import { Children, OutputDirectory } from "@alloy-js/core";
2
- import { Program } from "@typespec/compiler";
1
+ import { type Children, type OutputDirectory } from "@alloy-js/core";
2
+ import type { Program } from "@typespec/compiler";
3
3
  export declare function getEmitOutput(tspCode: string, cb: (program: Program) => Children): Promise<string | (OutputDirectory | import("@alloy-js/core").OutputFile)[]>;
4
4
  export declare function assertFileContents(res: OutputDirectory, contents: string): void;
5
5
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../test/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAU,MAAM,gBAAgB,CAAC;AAGnE,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI7C,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,QAAQ,+EAOtF;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,QAIxE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../test/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,eAAe,EAAU,MAAM,gBAAgB,CAAC;AAG7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,QAAQ,+EAOtF;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,QAIxE"}
@@ -0,0 +1,2 @@
1
+ import "@alloy-js/core/testing";
2
+ //# sourceMappingURL=vitest.setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.setup.d.ts","sourceRoot":"","sources":["../../test/vitest.setup.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ import "@alloy-js/core/testing";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/emitter-framework",
3
- "version": "0.9.0-dev.1",
3
+ "version": "0.9.0-dev.10",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -11,6 +11,9 @@
11
11
  ".": {
12
12
  "import": "./dist/src/core/index.js"
13
13
  },
14
+ "./csharp": {
15
+ "import": "./dist/src/csharp/index.js"
16
+ },
14
17
  "./typescript": {
15
18
  "import": "./dist/src/typescript/index.js"
16
19
  },
@@ -18,28 +21,43 @@
18
21
  "import": "./dist/src/testing/index.js"
19
22
  }
20
23
  },
24
+ "imports": {
25
+ "#test/*": "./test/*",
26
+ "#core/*": {
27
+ "development": "./src/core/*",
28
+ "default": "./dist/src/core/*"
29
+ },
30
+ "#csharp/*": {
31
+ "development": "./src/csharp/*",
32
+ "default": "./dist/src/csharp/*"
33
+ },
34
+ "#typescript/*": {
35
+ "development": "./src/typescript/*",
36
+ "default": "./dist/src/typescript/*"
37
+ }
38
+ },
21
39
  "keywords": [],
22
40
  "author": "",
23
41
  "license": "MIT",
24
42
  "description": "",
25
43
  "peerDependencies": {
26
- "@alloy-js/core": "^0.17.0",
27
- "@alloy-js/typescript": "^0.17.0",
44
+ "@alloy-js/core": "^0.18.2",
45
+ "@alloy-js/typescript": "^0.18.0",
46
+ "@alloy-js/csharp": "^0.18.0",
28
47
  "@typespec/compiler": "^1.1.0",
29
48
  "@typespec/http": "^1.1.0",
30
49
  "@typespec/rest": "^0.71.0 || >=0.72.0-dev <0.72.0"
31
50
  },
32
51
  "devDependencies": {
33
- "@alloy-js/cli": "^0.17.0",
52
+ "@alloy-js/cli": "^0.18.0",
34
53
  "@alloy-js/rollup-plugin": "^0.1.0",
35
- "@alloy-js/core": "^0.17.0",
36
- "@alloy-js/typescript": "^0.17.0",
37
- "@types/minimist": "^1.2.5",
54
+ "@alloy-js/core": "^0.18.2",
55
+ "@alloy-js/typescript": "^0.18.0",
38
56
  "@typespec/compiler": "^1.1.0",
39
57
  "@typespec/http": "^1.1.0",
40
58
  "@typespec/rest": "^0.71.0 || >=0.72.0-dev <0.72.0",
41
59
  "concurrently": "^9.1.2",
42
- "minimist": "^1.2.8",
60
+ "pathe": "^2.0.3",
43
61
  "prettier": "~3.5.3",
44
62
  "web-tree-sitter": "^0.25.4",
45
63
  "tree-sitter-c-sharp": "^0.23.0",
@@ -1,8 +1,12 @@
1
- import * as ay from "@alloy-js/core";
2
- import { Program } from "@typespec/compiler";
1
+ import {
2
+ Output as CoreOutput,
3
+ splitProps,
4
+ type OutputProps as CoreOutputProps,
5
+ } from "@alloy-js/core";
6
+ import type { Program } from "@typespec/compiler";
3
7
  import { TspContext } from "../context/tsp-context.js";
4
8
 
5
- export interface OutputProps extends ay.OutputProps {
9
+ export interface OutputProps extends CoreOutputProps {
6
10
  /**
7
11
  * TypeSpec program.
8
12
  */
@@ -10,10 +14,10 @@ export interface OutputProps extends ay.OutputProps {
10
14
  }
11
15
 
12
16
  export function Output(props: OutputProps) {
13
- const [{ program }, rest] = ay.splitProps(props, ["program"]);
17
+ const [{ program }, rest] = splitProps(props, ["program"]);
14
18
  return (
15
19
  <TspContext.Provider value={{ program }}>
16
- <ay.Output {...rest} />
20
+ <CoreOutput {...rest} />
17
21
  </TspContext.Provider>
18
22
  );
19
23
  }
@@ -1,5 +1,5 @@
1
- import { ComponentContext, createNamedContext, useContext } from "@alloy-js/core";
2
- import { TransformNamePolicy } from "../transport-name-policy.js";
1
+ import { type ComponentContext, createNamedContext, useContext } from "@alloy-js/core";
2
+ import type { TransformNamePolicy } from "../transport-name-policy.js";
3
3
 
4
4
  export const TransformNamePolicyContext: ComponentContext<TransformNamePolicy> =
5
5
  createNamedContext<TransformNamePolicy>("TransfromNamePolicy", {
@@ -1,5 +1,5 @@
1
- import { ComponentContext, createNamedContext, useContext } from "@alloy-js/core";
2
- import { Program } from "@typespec/compiler";
1
+ import { type ComponentContext, createNamedContext, useContext } from "@alloy-js/core";
2
+ import type { Program } from "@typespec/compiler";
3
3
  import { $, type Typekit } from "@typespec/compiler/typekit";
4
4
 
5
5
  export type TspContext = {
@@ -1,4 +1,4 @@
1
- import { Type } from "@typespec/compiler";
1
+ import type { Type } from "@typespec/compiler";
2
2
 
3
3
  /**
4
4
  * A type that extends `Type` and includes a `name` property that can either be a `string` or `symbol`.
@@ -1,5 +1,5 @@
1
- import { Children, OutputDirectory, render } from "@alloy-js/core";
2
- import { emitFile, joinPaths, Program } from "@typespec/compiler";
1
+ import { type Children, type OutputDirectory, render } from "@alloy-js/core";
2
+ import { emitFile, joinPaths, type Program } from "@typespec/compiler";
3
3
 
4
4
  export async function writeOutput(
5
5
  program: Program,