@typespec/emitter-framework 0.9.0-dev.6 → 0.9.0-dev.7

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 (139) 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 +3 -3
  13. package/dist/src/csharp/components/class/declaration.d.ts.map +1 -1
  14. package/dist/src/csharp/components/class/declaration.js +2 -2
  15. package/dist/src/csharp/components/enum-declaration.d.ts +3 -3
  16. package/dist/src/csharp/components/enum-declaration.d.ts.map +1 -1
  17. package/dist/src/csharp/components/enum-declaration.js +2 -2
  18. package/dist/src/csharp/components/property/property.d.ts +2 -2
  19. package/dist/src/csharp/components/property/property.d.ts.map +1 -1
  20. package/dist/src/csharp/components/type-expression.d.ts +3 -3
  21. package/dist/src/csharp/components/type-expression.d.ts.map +1 -1
  22. package/dist/src/csharp/components/utils/doc-comments.d.ts +4 -4
  23. package/dist/src/csharp/components/utils/doc-comments.d.ts.map +1 -1
  24. package/dist/src/csharp/components/utils/doc-comments.js +2 -2
  25. package/dist/src/testing/index.d.ts +1 -1
  26. package/dist/src/testing/index.d.ts.map +1 -1
  27. package/dist/src/testing/scenario-test/harness.d.ts +2 -2
  28. package/dist/src/testing/scenario-test/harness.d.ts.map +1 -1
  29. package/dist/src/testing/scenario-test/test-host.d.ts +2 -2
  30. package/dist/src/testing/scenario-test/test-host.d.ts.map +1 -1
  31. package/dist/src/typescript/components/array-expression.d.ts +2 -3
  32. package/dist/src/typescript/components/array-expression.d.ts.map +1 -1
  33. package/dist/src/typescript/components/array-expression.js +2 -2
  34. package/dist/src/typescript/components/arrow-function.d.ts +1 -1
  35. package/dist/src/typescript/components/arrow-function.d.ts.map +1 -1
  36. package/dist/src/typescript/components/class-method.d.ts +1 -1
  37. package/dist/src/typescript/components/class-method.d.ts.map +1 -1
  38. package/dist/src/typescript/components/enum-declaration.d.ts +6 -6
  39. package/dist/src/typescript/components/enum-declaration.d.ts.map +1 -1
  40. package/dist/src/typescript/components/enum-declaration.js +2 -2
  41. package/dist/src/typescript/components/function-declaration.d.ts +1 -1
  42. package/dist/src/typescript/components/function-declaration.d.ts.map +1 -1
  43. package/dist/src/typescript/components/function-expression.d.ts +1 -1
  44. package/dist/src/typescript/components/function-expression.d.ts.map +1 -1
  45. package/dist/src/typescript/components/function-type.d.ts +1 -1
  46. package/dist/src/typescript/components/function-type.d.ts.map +1 -1
  47. package/dist/src/typescript/components/interface-declaration.d.ts +4 -4
  48. package/dist/src/typescript/components/interface-declaration.d.ts.map +1 -1
  49. package/dist/src/typescript/components/interface-declaration.js +3 -4
  50. package/dist/src/typescript/components/interface-member.d.ts +2 -2
  51. package/dist/src/typescript/components/interface-member.d.ts.map +1 -1
  52. package/dist/src/typescript/components/interface-method.d.ts +2 -2
  53. package/dist/src/typescript/components/interface-method.d.ts.map +1 -1
  54. package/dist/src/typescript/components/record-expression.d.ts +1 -1
  55. package/dist/src/typescript/components/record-expression.d.ts.map +1 -1
  56. package/dist/src/typescript/components/type-alias-declaration.d.ts +1 -1
  57. package/dist/src/typescript/components/type-alias-declaration.d.ts.map +1 -1
  58. package/dist/src/typescript/components/type-declaration.d.ts +1 -1
  59. package/dist/src/typescript/components/type-declaration.d.ts.map +1 -1
  60. package/dist/src/typescript/components/type-expression.d.ts +1 -1
  61. package/dist/src/typescript/components/type-expression.d.ts.map +1 -1
  62. package/dist/src/typescript/components/type-transform.d.ts +2 -2
  63. package/dist/src/typescript/components/type-transform.d.ts.map +1 -1
  64. package/dist/src/typescript/components/union-declaration.d.ts +2 -2
  65. package/dist/src/typescript/components/union-declaration.d.ts.map +1 -1
  66. package/dist/src/typescript/components/union-expression.d.ts +3 -4
  67. package/dist/src/typescript/components/union-expression.d.ts.map +1 -1
  68. package/dist/src/typescript/components/union-expression.js +3 -3
  69. package/dist/src/typescript/components/value-expression.d.ts +2 -2
  70. package/dist/src/typescript/components/value-expression.d.ts.map +1 -1
  71. package/dist/src/typescript/utils/operation.d.ts +2 -2
  72. package/dist/src/typescript/utils/operation.d.ts.map +1 -1
  73. package/dist/test/csharp/test-host.d.ts +1 -1
  74. package/dist/test/csharp/test-host.d.ts.map +1 -1
  75. package/dist/test/csharp/utils.d.ts +1 -1
  76. package/dist/test/csharp/utils.d.ts.map +1 -1
  77. package/dist/test/typescript/components/member-expression.test.js +5 -5
  78. package/dist/test/typescript/test-host.d.ts +1 -1
  79. package/dist/test/typescript/test-host.d.ts.map +1 -1
  80. package/dist/test/utils.d.ts +2 -2
  81. package/dist/test/utils.d.ts.map +1 -1
  82. package/package.json +1 -1
  83. package/src/core/components/output.tsx +9 -5
  84. package/src/core/context/name-policy-context.ts +2 -2
  85. package/src/core/context/tsp-context.ts +2 -2
  86. package/src/core/transport-name-policy.ts +1 -1
  87. package/src/core/write-output.ts +2 -2
  88. package/src/csharp/components/class/declaration.test.tsx +2 -2
  89. package/src/csharp/components/class/declaration.tsx +8 -8
  90. package/src/csharp/components/enum-declaration.tsx +5 -5
  91. package/src/csharp/components/property/property.test.tsx +2 -2
  92. package/src/csharp/components/property/property.tsx +2 -2
  93. package/src/csharp/components/type-expression.test.tsx +3 -3
  94. package/src/csharp/components/type-expression.tsx +3 -3
  95. package/src/csharp/components/utils/doc-comments.tsx +6 -6
  96. package/src/testing/index.ts +1 -1
  97. package/src/testing/scenario-test/harness.ts +2 -2
  98. package/src/testing/scenario-test/test-host.ts +4 -4
  99. package/src/typescript/components/array-expression.tsx +3 -3
  100. package/src/typescript/components/arrow-function.tsx +1 -1
  101. package/src/typescript/components/class-method.tsx +1 -1
  102. package/src/typescript/components/enum-declaration.tsx +6 -6
  103. package/src/typescript/components/function-declaration.tsx +1 -1
  104. package/src/typescript/components/function-expression.tsx +1 -1
  105. package/src/typescript/components/function-type.tsx +1 -1
  106. package/src/typescript/components/interface-declaration.tsx +11 -12
  107. package/src/typescript/components/interface-member.tsx +2 -2
  108. package/src/typescript/components/interface-method.tsx +2 -2
  109. package/src/typescript/components/record-expression.tsx +1 -1
  110. package/src/typescript/components/type-alias-declaration.tsx +1 -1
  111. package/src/typescript/components/type-declaration.tsx +1 -1
  112. package/src/typescript/components/type-expression.tsx +2 -2
  113. package/src/typescript/components/type-transform.tsx +3 -3
  114. package/src/typescript/components/union-declaration.tsx +2 -2
  115. package/src/typescript/components/union-expression.tsx +12 -7
  116. package/src/typescript/components/value-expression.tsx +2 -2
  117. package/src/typescript/utils/operation.ts +2 -2
  118. package/test/csharp/components/enum-declaration.test.tsx +2 -2
  119. package/test/csharp/test-host.ts +2 -2
  120. package/test/csharp/utils.ts +1 -1
  121. package/test/testing/snippet-extractor-csharp.test.ts +1 -1
  122. package/test/testing/snippet-extractor-java.test.ts +1 -1
  123. package/test/testing/snippet-extractor-python.test.ts +1 -1
  124. package/test/testing/snippet-extractor-typescript.test.ts +1 -1
  125. package/test/typescript/components/arrow-function.test.tsx +2 -2
  126. package/test/typescript/components/enum-declaration.test.tsx +1 -1
  127. package/test/typescript/components/function-declaration.test.tsx +1 -1
  128. package/test/typescript/components/function-expression.test.tsx +2 -2
  129. package/test/typescript/components/function-type.test.tsx +2 -2
  130. package/test/typescript/components/interface-declaration.test.tsx +1 -1
  131. package/test/typescript/components/interface-method.test.tsx +2 -2
  132. package/test/typescript/components/member-expression.test.tsx +10 -10
  133. package/test/typescript/components/type-alias-declaration.test.tsx +1 -1
  134. package/test/typescript/components/type-transform.test.tsx +2 -2
  135. package/test/typescript/components/union-declaration.test.tsx +2 -2
  136. package/test/typescript/components/value-expression.test.tsx +6 -6
  137. package/test/typescript/test-host.ts +1 -1
  138. package/test/utils.ts +2 -2
  139. package/tsconfig.json +1 -0
@@ -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,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EG;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;CAA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,aAAa,EAAE,aAAa,EAC5B,YAAY,EAAE,MAAM,GACnB,EAAE,CAAC,mBAAmB,CAaxB"}
@@ -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/csharp/test-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAS7C,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"}
1
+ {"version":3,"file":"test-host.d.ts","sourceRoot":"","sources":["../../../test/csharp/test-host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AASlD,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"}
@@ -1,3 +1,3 @@
1
- import { OutputDirectory } from "@alloy-js/core";
1
+ import type { OutputDirectory } from "@alloy-js/core";
2
2
  export declare function assertFileContents(res: OutputDirectory, contents: string): void;
3
3
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../test/csharp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,QAIxE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../test/csharp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGtD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,QAIxE"}
@@ -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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/emitter-framework",
3
- "version": "0.9.0-dev.6",
3
+ "version": "0.9.0-dev.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -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,
@@ -1,8 +1,8 @@
1
1
  import { Tester } from "#test/test-host.js";
2
- import { Children, render } from "@alloy-js/core";
2
+ import { type Children, render } from "@alloy-js/core";
3
3
  import { d } from "@alloy-js/core/testing";
4
4
  import { createCSharpNamePolicy, Namespace, SourceFile } from "@alloy-js/csharp";
5
- import { t, TesterInstance } from "@typespec/compiler/testing";
5
+ import { t, type TesterInstance } from "@typespec/compiler/testing";
6
6
  import { beforeEach, describe, it } from "vitest";
7
7
  import { assertFileContents } from "../../../../test/csharp/utils.js";
8
8
  import { Output } from "../../../core/index.js";
@@ -1,6 +1,6 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { type Children, For } from "@alloy-js/core";
2
2
  import * as cs from "@alloy-js/csharp";
3
- import { Interface, Model } from "@typespec/compiler";
3
+ import type { Interface, Model } from "@typespec/compiler";
4
4
  import { useTsp } from "../../../core/index.js";
5
5
  import { Property } from "../property/property.jsx";
6
6
  import { TypeExpression } from "../type-expression.jsx";
@@ -26,7 +26,7 @@ interface ClassMethodsProps {
26
26
  type: Interface;
27
27
  }
28
28
 
29
- export function ClassDeclaration(props: ClassDeclarationProps): ay.Children {
29
+ export function ClassDeclaration(props: ClassDeclarationProps): Children {
30
30
  const { $ } = useTsp();
31
31
 
32
32
  const namePolicy = cs.useCSharpNamePolicy();
@@ -51,19 +51,19 @@ export function ClassDeclaration(props: ClassDeclarationProps): ay.Children {
51
51
  );
52
52
  }
53
53
 
54
- function ClassProperties(props: ClassPropertiesProps): ay.Children {
54
+ function ClassProperties(props: ClassPropertiesProps): Children {
55
55
  return (
56
- <ay.For each={props.type.properties.entries()} hardline>
56
+ <For each={props.type.properties.entries()} hardline>
57
57
  {([name, property]) => <Property type={property} jsonAttributes={props.jsonAttributes} />}
58
- </ay.For>
58
+ </For>
59
59
  );
60
60
  }
61
61
 
62
- function ClassMethods(props: ClassMethodsProps): ay.Children {
62
+ function ClassMethods(props: ClassMethodsProps): Children {
63
63
  const { $ } = useTsp();
64
64
  const namePolicy = cs.useCSharpNamePolicy();
65
65
 
66
- const abstractMethods: ay.Children = [];
66
+ const abstractMethods: Children = [];
67
67
  for (const [name, method] of props.type.operations) {
68
68
  abstractMethods.push(
69
69
  <cs.ClassMethod
@@ -1,6 +1,6 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { type Children, For } from "@alloy-js/core";
2
2
  import * as cs from "@alloy-js/csharp";
3
- import { Enum, Union } from "@typespec/compiler";
3
+ import type { Enum, Union } from "@typespec/compiler";
4
4
  import { useTsp } from "../../core/index.js";
5
5
  import { reportDiagnostic } from "../../lib.js";
6
6
  import { getDocComments } from "./utils/doc-comments.jsx";
@@ -11,7 +11,7 @@ export interface EnumDeclarationProps extends Omit<cs.EnumDeclarationProps, "nam
11
11
  type: Union | Enum;
12
12
  }
13
13
 
14
- export function EnumDeclaration(props: EnumDeclarationProps): ay.Children {
14
+ export function EnumDeclaration(props: EnumDeclarationProps): Children {
15
15
  const { $ } = useTsp();
16
16
  let type: Enum;
17
17
  if ($.union.is(props.type)) {
@@ -33,7 +33,7 @@ export function EnumDeclaration(props: EnumDeclarationProps): ay.Children {
33
33
  return (
34
34
  <>
35
35
  <cs.EnumDeclaration name={name} refkey={refkeys} {...props}>
36
- <ay.For each={members} joiner={",\n"}>
36
+ <For each={members} joiner={",\n"}>
37
37
  {([key, value]) => {
38
38
  return (
39
39
  <>
@@ -49,7 +49,7 @@ export function EnumDeclaration(props: EnumDeclarationProps): ay.Children {
49
49
  </>
50
50
  );
51
51
  }}
52
- </ay.For>
52
+ </For>
53
53
  </cs.EnumDeclaration>
54
54
  </>
55
55
  );
@@ -1,7 +1,7 @@
1
1
  import { Tester } from "#test/test-host.js";
2
- import { Children } from "@alloy-js/core";
2
+ import { type Children } from "@alloy-js/core";
3
3
  import { ClassDeclaration, createCSharpNamePolicy, Namespace, SourceFile } from "@alloy-js/csharp";
4
- import { t, TesterInstance } from "@typespec/compiler/testing";
4
+ import { t, type TesterInstance } from "@typespec/compiler/testing";
5
5
  import { beforeEach, describe, expect, it } from "vitest";
6
6
  import { Output } from "../../../core/components/output.jsx";
7
7
  import { Property } from "./property.jsx";
@@ -1,7 +1,7 @@
1
- import { Children } from "@alloy-js/core";
1
+ import { type Children } from "@alloy-js/core";
2
2
  import * as cs from "@alloy-js/csharp";
3
3
  import { Attribute } from "@alloy-js/csharp";
4
- import { ModelProperty, resolveEncodedName, Type } from "@typespec/compiler";
4
+ import { type ModelProperty, resolveEncodedName, type Type } from "@typespec/compiler";
5
5
  import { useTsp } from "../../../core/index.js";
6
6
  import { TypeExpression } from "../type-expression.jsx";
7
7
  import { getDocComments } from "../utils/doc-comments.jsx";
@@ -1,8 +1,8 @@
1
- import { Children, render } from "@alloy-js/core";
1
+ import { type Children, render } from "@alloy-js/core";
2
2
  import { d } from "@alloy-js/core/testing";
3
3
  import { Namespace, SourceFile } from "@alloy-js/csharp";
4
- import { Model, ModelProperty } from "@typespec/compiler";
5
- import { BasicTestRunner } from "@typespec/compiler/testing";
4
+ import type { Model, ModelProperty } from "@typespec/compiler";
5
+ import type { BasicTestRunner } from "@typespec/compiler/testing";
6
6
  import { beforeEach, describe, it } from "vitest";
7
7
  import { createEmitterFrameworkTestRunner } from "../../../test/typescript/test-host.js";
8
8
  import { assertFileContents } from "../../../test/utils.js";
@@ -1,7 +1,7 @@
1
- import { Children, code } from "@alloy-js/core";
1
+ import { type Children, code } from "@alloy-js/core";
2
2
  import { Reference } from "@alloy-js/csharp";
3
- import { getTypeName, IntrinsicType, Scalar, Type } from "@typespec/compiler";
4
- import { Typekit } from "@typespec/compiler/typekit";
3
+ import { getTypeName, type IntrinsicType, type Scalar, type Type } from "@typespec/compiler";
4
+ import type { Typekit } from "@typespec/compiler/typekit";
5
5
  import { useTsp } from "../../core/index.js";
6
6
  import { reportTypescriptDiagnostic } from "../../typescript/lib.js";
7
7
  import { efRefkey } from "./utils/refkey.js";
@@ -1,7 +1,7 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { type Children, List } from "@alloy-js/core";
2
2
  import * as cs from "@alloy-js/csharp";
3
- import { getReturnsDoc, Type } from "@typespec/compiler";
4
- import { Typekit } from "@typespec/compiler/typekit";
3
+ import { getReturnsDoc, type Type } from "@typespec/compiler";
4
+ import type { Typekit } from "@typespec/compiler/typekit";
5
5
 
6
6
  /**
7
7
  * Helper to render a doc string for a given TypeSpec type.
@@ -12,13 +12,13 @@ import { Typekit } from "@typespec/compiler/typekit";
12
12
  * @param type The TypeSpec type to generate documentation for
13
13
  * @returns A DocSummary component containing the rendered doc string, or undefined if no doc is available.
14
14
  */
15
- export function getDocComments($: Typekit, type: Type): ay.Children {
15
+ export function getDocComments($: Typekit, type: Type): Children {
16
16
  const typeDoc = $.type.getDoc(type);
17
17
  if (!typeDoc) {
18
18
  return undefined;
19
19
  }
20
20
 
21
- const docElements: ay.Children[] = [];
21
+ const docElements: Children[] = [];
22
22
 
23
23
  // Add main type documentation
24
24
  docElements.push(
@@ -54,5 +54,5 @@ export function getDocComments($: Typekit, type: Type): ay.Children {
54
54
  }
55
55
  }
56
56
 
57
- return <ay.List doubleHardline>{docElements}</ay.List>;
57
+ return <List doubleHardline>{docElements}</List>;
58
58
  }
@@ -1,5 +1,5 @@
1
1
  import { resolvePath } from "@typespec/compiler";
2
- import { createTestLibrary, TypeSpecTestLibrary } from "@typespec/compiler/testing";
2
+ import { createTestLibrary, type TypeSpecTestLibrary } from "@typespec/compiler/testing";
3
3
  import { fileURLToPath } from "url";
4
4
 
5
5
  export const EmitterFrameworkTestLibrary: TypeSpecTestLibrary = createTestLibrary({
@@ -1,11 +1,11 @@
1
1
  import { normalizePath } from "@typespec/compiler";
2
- import { TypeSpecTestLibrary } from "@typespec/compiler/testing";
2
+ import type { TypeSpecTestLibrary } from "@typespec/compiler/testing";
3
3
  import { readdirSync, readFileSync, statSync, writeFileSync } from "fs";
4
4
  import minimist from "minimist";
5
5
  import path from "path";
6
6
  import { format } from "prettier";
7
7
  import { afterAll, describe, expect, it } from "vitest";
8
- import { LanguageConfiguration, SnippetExtractor } from "./snippet-extractor.js";
8
+ import type { LanguageConfiguration, SnippetExtractor } from "./snippet-extractor.js";
9
9
  import { emitWithDiagnostics } from "./test-host.js";
10
10
 
11
11
  const rawArgs = process.env.TEST_ARGS ? process.env.TEST_ARGS.split(" ") : [];
@@ -1,10 +1,10 @@
1
- import { CompilerOptions, Diagnostic } from "@typespec/compiler";
1
+ import type { CompilerOptions, Diagnostic } from "@typespec/compiler";
2
2
  import {
3
- BasicTestRunner,
3
+ type BasicTestRunner,
4
4
  createTestHost,
5
5
  createTestWrapper,
6
- TestHostConfig,
7
- TypeSpecTestLibrary,
6
+ type TestHostConfig,
7
+ type TypeSpecTestLibrary,
8
8
  } from "@typespec/compiler/testing";
9
9
  import { HttpTestLibrary } from "@typespec/http/testing";
10
10
  import { RestTestLibrary } from "@typespec/rest/testing";
@@ -1,5 +1,5 @@
1
- import * as ay from "@alloy-js/core";
2
- import { Type } from "@typespec/compiler";
1
+ import { code } from "@alloy-js/core";
2
+ import type { Type } from "@typespec/compiler";
3
3
  import { TypeExpression } from "./type-expression.js";
4
4
 
5
5
  export interface ArrayExpressionProps {
@@ -7,5 +7,5 @@ export interface ArrayExpressionProps {
7
7
  }
8
8
 
9
9
  export function ArrayExpression({ elementType }: ArrayExpressionProps) {
10
- return ay.code`Array<${(<TypeExpression type={elementType} />)}>`;
10
+ return code`Array<${(<TypeExpression type={elementType} />)}>`;
11
11
  }
@@ -1,6 +1,6 @@
1
1
  import { splitProps } from "@alloy-js/core";
2
2
  import * as ts from "@alloy-js/typescript";
3
- import { Operation } from "@typespec/compiler";
3
+ import type { Operation } from "@typespec/compiler";
4
4
  import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
5
5
  import { TypeExpression } from "./type-expression.jsx";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import * as ts from "@alloy-js/typescript";
2
- import { Operation } from "@typespec/compiler";
2
+ import type { Operation } from "@typespec/compiler";
3
3
  import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
4
4
  import { TypeExpression } from "./type-expression.jsx";
5
5
 
@@ -1,6 +1,6 @@
1
- import * as ay from "@alloy-js/core";
1
+ import { type Children, For, type Refkey } from "@alloy-js/core";
2
2
  import * as ts from "@alloy-js/typescript";
3
- import { Enum, EnumMember as TspEnumMember, Union } from "@typespec/compiler";
3
+ import type { Enum, EnumMember as TspEnumMember, Union } from "@typespec/compiler";
4
4
  import { useTsp } from "../../core/context/tsp-context.js";
5
5
  import { reportDiagnostic } from "../../lib.js";
6
6
  import { declarationRefkeys, efRefkey } from "../utils/refkey.js";
@@ -38,7 +38,7 @@ export function EnumDeclaration(props: EnumDeclarationProps) {
38
38
  default={props.default}
39
39
  export={props.export}
40
40
  >
41
- <ay.For each={members} joiner={",\n"}>
41
+ <For each={members} joiner={",\n"}>
42
42
  {([key, value]) => {
43
43
  const memberDoc = $.type.getDoc(value);
44
44
  return (
@@ -51,15 +51,15 @@ export function EnumDeclaration(props: EnumDeclarationProps) {
51
51
  />
52
52
  );
53
53
  }}
54
- </ay.For>
54
+ </For>
55
55
  </ts.EnumDeclaration>
56
56
  );
57
57
  }
58
58
 
59
59
  export interface EnumMemberProps {
60
60
  type: TspEnumMember;
61
- doc?: ay.Children;
62
- refkey?: ay.Refkey;
61
+ doc?: Children;
62
+ refkey?: Refkey;
63
63
  }
64
64
 
65
65
  export function EnumMember(props: EnumMemberProps) {
@@ -1,5 +1,5 @@
1
1
  import * as ts from "@alloy-js/typescript";
2
- import { Model, Operation } from "@typespec/compiler";
2
+ import type { Model, Operation } from "@typespec/compiler";
3
3
  import { useTsp } from "../../core/index.js";
4
4
  import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
5
5
  import { declarationRefkeys } from "../utils/refkey.js";
@@ -1,6 +1,6 @@
1
1
  import { splitProps } from "@alloy-js/core";
2
2
  import * as ts from "@alloy-js/typescript";
3
- import { Operation } from "@typespec/compiler";
3
+ import type { Operation } from "@typespec/compiler";
4
4
  import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
5
5
  import { TypeExpression } from "./type-expression.jsx";
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { splitProps } from "@alloy-js/core";
2
2
  import * as ts from "@alloy-js/typescript";
3
- import { Operation } from "@typespec/compiler";
3
+ import type { Operation } from "@typespec/compiler";
4
4
  import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
5
5
  import { TypeExpression } from "./type-expression.jsx";
6
6