@typespec/emitter-framework 0.6.0-dev.2 → 0.6.0-dev.5

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 (67) hide show
  1. package/dist/src/typescript/components/arrow-function.d.ts +17 -0
  2. package/dist/src/typescript/components/arrow-function.d.ts.map +1 -0
  3. package/dist/src/typescript/components/arrow-function.js +31 -0
  4. package/dist/src/typescript/components/arrow-function.js.map +1 -0
  5. package/dist/src/typescript/components/function-declaration.d.ts +5 -0
  6. package/dist/src/typescript/components/function-declaration.d.ts.map +1 -1
  7. package/dist/src/typescript/components/function-declaration.js +5 -1
  8. package/dist/src/typescript/components/function-declaration.js.map +1 -1
  9. package/dist/src/typescript/components/function-expression.d.ts +17 -0
  10. package/dist/src/typescript/components/function-expression.d.ts.map +1 -0
  11. package/dist/src/typescript/components/function-expression.js +31 -0
  12. package/dist/src/typescript/components/function-expression.js.map +1 -0
  13. package/dist/src/typescript/components/function-type.d.ts +17 -0
  14. package/dist/src/typescript/components/function-type.d.ts.map +1 -0
  15. package/dist/src/typescript/components/function-type.js +31 -0
  16. package/dist/src/typescript/components/function-type.js.map +1 -0
  17. package/dist/src/typescript/components/index.d.ts +6 -0
  18. package/dist/src/typescript/components/index.d.ts.map +1 -1
  19. package/dist/src/typescript/components/index.js +6 -0
  20. package/dist/src/typescript/components/index.js.map +1 -1
  21. package/dist/src/typescript/components/interface-member.d.ts +1 -2
  22. package/dist/src/typescript/components/interface-member.d.ts.map +1 -1
  23. package/dist/src/typescript/components/interface-member.js +3 -19
  24. package/dist/src/typescript/components/interface-member.js.map +1 -1
  25. package/dist/src/typescript/components/interface-method.d.ts +15 -0
  26. package/dist/src/typescript/components/interface-method.d.ts.map +1 -0
  27. package/dist/src/typescript/components/interface-method.js +34 -0
  28. package/dist/src/typescript/components/interface-method.js.map +1 -0
  29. package/dist/src/typescript/components/type-alias-declaration.d.ts +6 -2
  30. package/dist/src/typescript/components/type-alias-declaration.d.ts.map +1 -1
  31. package/dist/src/typescript/components/type-alias-declaration.js +7 -2
  32. package/dist/src/typescript/components/type-alias-declaration.js.map +1 -1
  33. package/dist/src/typescript/components/type-declaration.d.ts.map +1 -1
  34. package/dist/src/typescript/components/type-declaration.js +4 -0
  35. package/dist/src/typescript/components/type-declaration.js.map +1 -1
  36. package/dist/src/typescript/components/type-expression.d.ts +6 -0
  37. package/dist/src/typescript/components/type-expression.d.ts.map +1 -1
  38. package/dist/src/typescript/components/type-expression.js +6 -1
  39. package/dist/src/typescript/components/type-expression.js.map +1 -1
  40. package/dist/test/typescript/components/arrow-function.test.d.ts +2 -0
  41. package/dist/test/typescript/components/arrow-function.test.d.ts.map +1 -0
  42. package/dist/test/typescript/components/function-expression.test.d.ts +2 -0
  43. package/dist/test/typescript/components/function-expression.test.d.ts.map +1 -0
  44. package/dist/test/typescript/components/function-type.test.d.ts +2 -0
  45. package/dist/test/typescript/components/function-type.test.d.ts.map +1 -0
  46. package/dist/test/typescript/components/interface-method.test.d.ts +2 -0
  47. package/dist/test/typescript/components/interface-method.test.d.ts.map +1 -0
  48. package/dist/test/utils.d.ts +3 -2
  49. package/dist/test/utils.d.ts.map +1 -1
  50. package/package.json +5 -5
  51. package/src/typescript/components/arrow-function.tsx +39 -0
  52. package/src/typescript/components/function-declaration.tsx +5 -2
  53. package/src/typescript/components/function-expression.tsx +41 -0
  54. package/src/typescript/components/function-type.tsx +38 -0
  55. package/src/typescript/components/index.ts +6 -0
  56. package/src/typescript/components/interface-member.tsx +2 -19
  57. package/src/typescript/components/interface-method.tsx +48 -0
  58. package/src/typescript/components/type-alias-declaration.tsx +10 -4
  59. package/src/typescript/components/type-declaration.tsx +2 -0
  60. package/src/typescript/components/type-expression.tsx +11 -2
  61. package/test/typescript/components/arrow-function.test.tsx +85 -0
  62. package/test/typescript/components/function-expression.test.tsx +85 -0
  63. package/test/typescript/components/function-type.test.tsx +80 -0
  64. package/test/typescript/components/interface-declaration.test.tsx +6 -6
  65. package/test/typescript/components/interface-method.test.tsx +234 -0
  66. package/test/typescript/components/type-alias-declaration.test.tsx +20 -2
  67. package/test/utils.ts +8 -1
@@ -0,0 +1,17 @@
1
+ import * as ts from "@alloy-js/typescript";
2
+ import { Operation } from "@typespec/compiler";
3
+ export interface ArrowFunctionProps extends ts.ArrowFunctionProps {
4
+ type?: Operation;
5
+ /**
6
+ * Where the parameters from passed to the `parameters` prop should be placed
7
+ * relative the ones created from the T`ypeSpec operation.
8
+ */
9
+ parametersMode?: "prepend" | "append" | "replace";
10
+ }
11
+ /**
12
+ * A TypeScript arrow function. Pass the `type` prop to create the arrow
13
+ * function by converting from a TypeSpec Operation. Any other props provided
14
+ * will take precedence.
15
+ */
16
+ export declare function ArrowFunction(props: Readonly<ArrowFunctionProps>): import("@alloy-js/core/jsx-runtime").Children;
17
+ //# sourceMappingURL=arrow-function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-function.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/arrow-function.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,MAAM,WAAW,kBAAmB,SAAQ,EAAE,CAAC,kBAAkB;IAC/D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACnD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,CAAC,kBAAkB,CAAC,iDAkBhE"}
@@ -0,0 +1,31 @@
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
3
+ import { splitProps } from "@alloy-js/core/jsx-runtime";
4
+ import * as ts from "@alloy-js/typescript";
5
+ import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
6
+ import { TypeExpression } from "./type-expression.js";
7
+ /**
8
+ * A TypeScript arrow function. Pass the `type` prop to create the arrow
9
+ * function by converting from a TypeSpec Operation. Any other props provided
10
+ * will take precedence.
11
+ */
12
+ export function ArrowFunction(props) {
13
+ const [efProps, updateProps, forwardProps] = splitProps(props, ["type"], ["returnType", "parameters"]);
14
+ if (!efProps.type) {
15
+ return _$createComponent(ts.ArrowFunction, _$mergeProps(forwardProps, updateProps));
16
+ }
17
+ const returnType = props.returnType ?? _$createComponent(TypeExpression, {
18
+ get type() {
19
+ return getReturnType(efProps.type);
20
+ }
21
+ });
22
+ const allParameters = buildParameterDescriptors(efProps.type.parameters, {
23
+ params: props.parameters,
24
+ mode: props.parametersMode
25
+ });
26
+ return _$createComponent(ts.ArrowFunction, _$mergeProps(forwardProps, {
27
+ returnType: returnType,
28
+ parameters: allParameters
29
+ }));
30
+ }
31
+ //# sourceMappingURL=arrow-function.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-function.js","names":["splitProps","ts","buildParameterDescriptors","getReturnType","TypeExpression","ArrowFunction","props","efProps","updateProps","forwardProps","type","_$createComponent","_$mergeProps","returnType","allParameters","parameters","params","mode","parametersMode"],"sources":["../../../../src/typescript/components/arrow-function.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,UAAU,QAAQ,4BAA4B;AACvD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,yBAAyB,EAAEC,aAAa,QAAQ,uBAAuB;AAChF,SAASC,cAAc;AAWvB;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAACC,KAAmC,EAAE;EACjE,MAAM,CAACC,OAAO,EAAEC,WAAW,EAAEC,YAAY,CAAC,GAAGT,UAAU,CACrDM,KAAK,EACL,CAAC,MAAM,CAAC,EACR,CAAC,YAAY,EAAE,YAAY,CAC7B,CAAC;EAED,IAAI,CAACC,OAAO,CAACG,IAAI,EAAE;IACjB,OAAAC,iBAAA,CAAQV,EAAE,CAACI,aAAa,EAAAO,YAAA,CAAKH,YAAY,EAAMD,WAAW;EAC5D;EAEA,MAAMK,UAAU,GAAGP,KAAK,CAACO,UAAU,IAAAF,iBAAA,CAAKP,cAAc;IAAA,IAACM,IAAIA,CAAA;MAAA,OAAEP,aAAa,CAACI,OAAO,CAACG,IAAI,CAAC;IAAA;EAAA,EAAI;EAC5F,MAAMI,aAAa,GAAGZ,yBAAyB,CAACK,OAAO,CAACG,IAAI,CAACK,UAAU,EAAE;IACvEC,MAAM,EAAEV,KAAK,CAACS,UAAU;IACxBE,IAAI,EAAEX,KAAK,CAACY;EACd,CAAC,CAAC;EAEF,OAAAP,iBAAA,CAAQV,EAAE,CAACI,aAAa,EAAAO,YAAA,CAAKH,YAAY;IAAEI,UAAU,EAAEA,UAAU;IAAEE,UAAU,EAAED;EAAa;AAC9F","ignoreList":[]}
@@ -6,6 +6,11 @@ export interface FunctionDeclarationPropsWithType extends Omit<ts.FunctionDeclar
6
6
  parametersMode?: "prepend" | "append" | "replace";
7
7
  }
8
8
  export type FunctionDeclarationProps = FunctionDeclarationPropsWithType | ts.FunctionDeclarationProps;
9
+ /**
10
+ * A TypeScript function declaration. Pass the `type` prop to create the
11
+ * function declaration by converting from a TypeSpec Operation. Any other props
12
+ * provided will take precedence.
13
+ */
9
14
  export declare function FunctionDeclaration(props: FunctionDeclarationProps): import("@alloy-js/core").Children;
10
15
  export declare namespace FunctionDeclaration {
11
16
  var Parameters: (props: FunctionParametersProps) => import("@alloy-js/core").Children;
@@ -1 +1 @@
1
- {"version":3,"file":"function-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/function-declaration.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAItD,MAAM,WAAW,gCACf,SAAQ,IAAI,CAAC,EAAE,CAAC,wBAAwB,EAAE,MAAM,CAAC;IACjD,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACnD;AAED,MAAM,MAAM,wBAAwB,GAChC,gCAAgC,GAChC,EAAE,CAAC,wBAAwB,CAAC;AAEhC,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,qCAoClE;yBApCe,mBAAmB;4BA6CyB,uBAAuB;;AAPnF,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,EAAE,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC7F,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,uBAAuB,GAAG,4BAA4B,GAAG,EAAE,CAAC,uBAAuB,CAAC"}
1
+ {"version":3,"file":"function-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/function-declaration.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAItD,MAAM,WAAW,gCACf,SAAQ,IAAI,CAAC,EAAE,CAAC,wBAAwB,EAAE,MAAM,CAAC;IACjD,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACnD;AAED,MAAM,MAAM,wBAAwB,GAChC,gCAAgC,GAChC,EAAE,CAAC,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,qCAkClE;yBAlCe,mBAAmB;4BA2CyB,uBAAuB;;AAPnF,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,EAAE,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAC7F,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,uBAAuB,GAAG,4BAA4B,GAAG,EAAE,CAAC,uBAAuB,CAAC"}
@@ -4,9 +4,13 @@ import { refkey as getRefkey } from "@alloy-js/core";
4
4
  import * as ts from "@alloy-js/typescript";
5
5
  import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
6
6
  import { TypeExpression } from "./type-expression.js";
7
+ /**
8
+ * A TypeScript function declaration. Pass the `type` prop to create the
9
+ * function declaration by converting from a TypeSpec Operation. Any other props
10
+ * provided will take precedence.
11
+ */
7
12
  export function FunctionDeclaration(props) {
8
13
  if (!isTypedFunctionDeclarationProps(props)) {
9
- if (!props.name) {}
10
14
  return _$createComponent(ts.FunctionDeclaration, props);
11
15
  }
12
16
  const refkey = props.refkey ?? getRefkey(props.type);
@@ -1 +1 @@
1
- {"version":3,"file":"function-declaration.js","names":["refkey","getRefkey","ts","buildParameterDescriptors","getReturnType","TypeExpression","FunctionDeclaration","props","isTypedFunctionDeclarationProps","name","_$createComponent","type","useTSNamePolicy","getName","reservedFunctionKeywords","has","returnType","allParameters","parameters","params","mode","parametersMode","async","default","export","kind","children","Parameters","_$memo","isTypedFunctionParametersProps","parameterDescriptors","Set"],"sources":["../../../../src/typescript/components/function-declaration.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,MAAM,IAAIC,SAAS,QAAQ,gBAAgB;AACpD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,yBAAyB,EAAEC,aAAa,QAAQ,uBAAuB;AAChF,SAASC,cAAc,QAAQ,sBAAsB;AAarD,OAAO,SAASC,mBAAmBA,CAACC,KAA+B,EAAE;EACnE,IAAI,CAACC,+BAA+B,CAACD,KAAK,CAAC,EAAE;IAC3C,IAAI,CAACA,KAAK,CAACE,IAAI,EAAE,CACjB;IACA,OAAAC,iBAAA,CAAQR,EAAE,CAACI,mBAAmB,EAAKC,KAAK;EAC1C;EAEA,MAAMP,MAAM,GAAGO,K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ACqB,UAAU,GAAG,SAASA,UAAUA,CAACpB,KAA8B,EAAE;EACnF,IAAI,CAACsB,8BAA8B,CAACtB,KAAK,CAAC,EAAE;IAC1C,OAAAG,iBAAA,CAAQR,EAAE,CAACI,mBAAmB,CAACqB,UAAU,EAAKpB,KAAK;EACrD;EAEA,MAAMuB,oBAAoB,GAAG3B,yBAAyB,CAACI,KAAK,CAACI,IAAI,CAAC;EAClE,OAAAD,iBAAA,CACGR,EAAE,CAACI,mBAAmB,CAACqB,UAAU;IAACT,UAAU,EAAEY,oBAAoB;IAAA,IAAAJ,SAAA;MAAA,OAChEnB,KAAK,CAACmB,QAAQ;IAAA;EAAA;AAGrB,CAAC;AAED,SAASlB,+BAA+BA,CACtCD,KAA+B,EACY;EAC3C,OAAO,MAAM,IAAIA,KAAK;AACxB;AAEA,SAASsB,8BAA8BA,CACrCtB,KAA8B,EACS;EACvC,OAAO,MAAM,IAAIA,KAAK;AACxB;AAEA,MAAMO,wBAAwB,GAAG,IAAIiB,GAAG,CAAC,CACvC,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,CACR,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"function-declaration.js","names":["refkey","getRefkey","ts","buildParameterDescriptors","getReturnType","TypeExpression","FunctionDeclaration","props","isTypedFunctionDeclarationProps","_$createComponent","type","name","useTSNamePolicy","getName","reservedFunctionKeywords","has","returnType","allParameters","parameters","params","mode","parametersMode","async","default","export","kind","children","Parameters","_$memo","isTypedFunctionParametersProps","parameterDescriptors","Set"],"sources":["../../../../src/typescript/components/function-declaration.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,MAAM,IAAIC,SAAS,QAAQ,gBAAgB;AACpD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,yBAAyB,EAAEC,aAAa,QAAQ,uBAAuB;AAChF,SAASC,cAAc,QAAQ,sBAAsB;AAarD;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAACC,KAA+B,EAAE;EACnE,IAAI,CAACC,+BAA+B,CAACD,KAAK,CAAC,EAAE;IAC3C,OAAAE,iBAAA,CAAQP,EAAE,CAACI,mBAAmB,EAAKC,KAAK;EAC1C;EAEA,MAAMP,MAAM,GAAGO,KAAK,CAACP,MAAM,IAAIC,SAAS,CAACM,KAAK,CAACG,IAAI,CAAC;EAEpD,IAAIC,IAAI,GAAGJ,KAAK,CAACI,IAAI,GAAGJ,KAAK,CAACI,IAAI,GAAGT,EAAE,CAACU,eAAe,CAAC,CAAC,CAACC,OAAO,CAACN,KAAK,CAACG,IAAI,CAACC,IAAI,EAAE,UAAU,CAAC;;EAE9F;EACA;EACA,IAAIG,wBAAwB,CAACC,GAAG,CAACJ,IAAI,CAAC,EAAE;IACtCA,IAAI,GAAG,GAAGA,IAAI,GAAG;EACnB;EAEA,MAAMK,UAAU,GAAGT,KAAK,CAACS,UAAU,IAAAP,iBAAA,CAAKJ,cAAc;IAAA,IAACK,IAAIA,CAAA;MAAA,OAAEN,aAAa,CAACG,KAAK,CAACG,IAAI,CAAC;IAAA;EAAA,EAAI;EAC1F,MAAMO,aAAa,GAAGd,yBAAyB,CAACI,KAAK,CAACG,IAAI,CAACQ,UAAU,EAAE;IACrEC,MAAM,EAAEZ,KAAK,CAACW,UAAU;IAC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CACvC,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,OAAO,CACR,CAAC","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ import * as ts from "@alloy-js/typescript";
2
+ import { Operation } from "@typespec/compiler";
3
+ export interface FunctionExpressionProps extends ts.FunctionExpressionProps {
4
+ type?: Operation;
5
+ /**
6
+ * Where the parameters from passed to the `parameters` prop should be placed
7
+ * relative the ones created from the TypeSpec operation.
8
+ */
9
+ parametersMode?: "prepend" | "append" | "replace";
10
+ }
11
+ /**
12
+ * A TypeScript function expression. Pass the `type` prop to create the
13
+ * function expression by converting from a TypeSpec Operation. Any other props
14
+ * provided will take precedence.
15
+ */
16
+ export declare function FunctionExpression(props: Readonly<FunctionExpressionProps>): import("@alloy-js/core/jsx-runtime").Children;
17
+ //# sourceMappingURL=function-expression.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-expression.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/function-expression.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,MAAM,WAAW,uBAAwB,SAAQ,EAAE,CAAC,uBAAuB;IACzE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACnD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,CAAC,uBAAuB,CAAC,iDAoB1E"}
@@ -0,0 +1,31 @@
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
3
+ import { splitProps } from "@alloy-js/core/jsx-runtime";
4
+ import * as ts from "@alloy-js/typescript";
5
+ import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
6
+ import { TypeExpression } from "./type-expression.js";
7
+ /**
8
+ * A TypeScript function expression. Pass the `type` prop to create the
9
+ * function expression by converting from a TypeSpec Operation. Any other props
10
+ * provided will take precedence.
11
+ */
12
+ export function FunctionExpression(props) {
13
+ const [efProps, updateProps, forwardProps] = splitProps(props, ["type"], ["returnType", "parameters"]);
14
+ if (!efProps.type) {
15
+ return _$createComponent(ts.FunctionExpression, _$mergeProps(forwardProps, updateProps));
16
+ }
17
+ const returnType = props.returnType ?? _$createComponent(TypeExpression, {
18
+ get type() {
19
+ return getReturnType(efProps.type);
20
+ }
21
+ });
22
+ const allParameters = buildParameterDescriptors(efProps.type.parameters, {
23
+ params: props.parameters,
24
+ mode: props.parametersMode
25
+ });
26
+ return _$createComponent(ts.FunctionExpression, _$mergeProps(forwardProps, {
27
+ returnType: returnType,
28
+ parameters: allParameters
29
+ }));
30
+ }
31
+ //# sourceMappingURL=function-expression.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-expression.js","names":["splitProps","ts","buildParameterDescriptors","getReturnType","TypeExpression","FunctionExpression","props","efProps","updateProps","forwardProps","type","_$createComponent","_$mergeProps","returnType","allParameters","parameters","params","mode","parametersMode"],"sources":["../../../../src/typescript/components/function-expression.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,UAAU,QAAQ,4BAA4B;AACvD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,yBAAyB,EAAEC,aAAa,QAAQ,uBAAuB;AAChF,SAASC,cAAc;AAWvB;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAACC,KAAwC,EAAE;EAC3E,MAAM,CAACC,OAAO,EAAEC,WAAW,EAAEC,YAAY,CAAC,GAAGT,UAAU,CACrDM,KAAK,EACL,CAAC,MAAM,CAAC,EACR,CAAC,YAAY,EAAE,YAAY,CAC7B,CAAC;EAED,IAAI,CAACC,OAAO,CAACG,IAAI,EAAE;IACjB,OAAAC,iBAAA,CAAQV,EAAE,CAACI,kBAAkB,EAAAO,YAAA,CAAKH,YAAY,EAAMD,WAAW;EACjE;EAEA,MAAMK,UAAU,GAAGP,KAAK,CAACO,UAAU,IAAAF,iBAAA,CAAKP,cAAc;IAAA,IAACM,IAAIA,CAAA;MAAA,OAAEP,aAAa,CAACI,OAAO,CAACG,IAAI,CAAC;IAAA;EAAA,EAAI;EAC5F,MAAMI,aAAa,GAAGZ,yBAAyB,CAACK,OAAO,CAACG,IAAI,CAACK,UAAU,EAAE;IACvEC,MAAM,EAAEV,KAAK,CAACS,UAAU;IACxBE,IAAI,EAAEX,KAAK,CAACY;EACd,CAAC,CAAC;EAEF,OAAAP,iBAAA,CACGV,EAAE,CAACI,kBAAkB,EAAAO,YAAA,CAAKH,YAAY;IAAEI,UAAU,EAAEA,UAAU;IAAEE,UAAU,EAAED;EAAa;AAE9F","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ import * as ts from "@alloy-js/typescript";
2
+ import { Operation } from "@typespec/compiler";
3
+ export interface FunctionTypeProps extends ts.FunctionTypeProps {
4
+ type?: Operation;
5
+ /**
6
+ * Where the parameters from passed to the `parameters` prop should be placed
7
+ * relative the ones created from the TypeSpec operation.
8
+ */
9
+ parametersMode?: "prepend" | "append" | "replace";
10
+ }
11
+ /**
12
+ * A TypeScript function type. Pass the `type` prop to create the function type
13
+ * by converting from a TypeSpec Operation. Any other props provided will take
14
+ * precedence.
15
+ */
16
+ export declare function FunctionType(props: Readonly<FunctionTypeProps>): import("@alloy-js/core/jsx-runtime").Children;
17
+ //# sourceMappingURL=function-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-type.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/function-type.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,MAAM,WAAW,iBAAkB,SAAQ,EAAE,CAAC,iBAAiB;IAC7D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACnD;AACD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,iBAAiB,CAAC,iDAkB9D"}
@@ -0,0 +1,31 @@
1
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
+ import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
3
+ import { splitProps } from "@alloy-js/core/jsx-runtime";
4
+ import * as ts from "@alloy-js/typescript";
5
+ import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
6
+ import { TypeExpression } from "./type-expression.js";
7
+ /**
8
+ * A TypeScript function type. Pass the `type` prop to create the function type
9
+ * by converting from a TypeSpec Operation. Any other props provided will take
10
+ * precedence.
11
+ */
12
+ export function FunctionType(props) {
13
+ const [efProps, updateProps, forwardProps] = splitProps(props, ["type"], ["returnType", "parameters"]);
14
+ if (!efProps.type) {
15
+ return _$createComponent(ts.FunctionType, _$mergeProps(forwardProps, updateProps));
16
+ }
17
+ const returnType = props.returnType ?? _$createComponent(TypeExpression, {
18
+ get type() {
19
+ return getReturnType(efProps.type);
20
+ }
21
+ });
22
+ const allParameters = buildParameterDescriptors(efProps.type.parameters, {
23
+ params: props.parameters,
24
+ mode: props.parametersMode
25
+ });
26
+ return _$createComponent(ts.FunctionType, _$mergeProps(forwardProps, {
27
+ returnType: returnType,
28
+ parameters: allParameters
29
+ }));
30
+ }
31
+ //# sourceMappingURL=function-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function-type.js","names":["splitProps","ts","buildParameterDescriptors","getReturnType","TypeExpression","FunctionType","props","efProps","updateProps","forwardProps","type","_$createComponent","_$mergeProps","returnType","allParameters","parameters","params","mode","parametersMode"],"sources":["../../../../src/typescript/components/function-type.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,UAAU,QAAQ,4BAA4B;AACvD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,yBAAyB,EAAEC,aAAa,QAAQ,uBAAuB;AAChF,SAASC,cAAc;AAUvB;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,KAAkC,EAAE;EAC/D,MAAM,CAACC,OAAO,EAAEC,WAAW,EAAEC,YAAY,CAAC,GAAGT,UAAU,CACrDM,KAAK,EACL,CAAC,MAAM,CAAC,EACR,CAAC,YAAY,EAAE,YAAY,CAC7B,CAAC;EAED,IAAI,CAACC,OAAO,CAACG,IAAI,EAAE;IACjB,OAAAC,iBAAA,CAAQV,EAAE,CAACI,YAAY,EAAAO,YAAA,CAAKH,YAAY,EAAMD,WAAW;EAC3D;EAEA,MAAMK,UAAU,GAAGP,KAAK,CAACO,UAAU,IAAAF,iBAAA,CAAKP,cAAc;IAAA,IAACM,IAAIA,CAAA;MAAA,OAAEP,aAAa,CAACI,OAAO,CAACG,IAAI,CAAC;IAAA;EAAA,EAAI;EAC5F,MAAMI,aAAa,GAAGZ,yBAAyB,CAACK,OAAO,CAACG,IAAI,CAACK,UAAU,EAAE;IACvEC,MAAM,EAAEV,KAAK,CAACS,UAAU;IACxBE,IAAI,EAAEX,KAAK,CAACY;EACd,CAAC,CAAC;EAEF,OAAAP,iBAAA,CAAQV,EAAE,CAACI,YAAY,EAAAO,YAAA,CAAKH,YAAY;IAAEI,UAAU,EAAEA,UAAU;IAAEE,UAAU,EAAED;EAAa;AAC7F","ignoreList":[]}
@@ -1,11 +1,17 @@
1
+ export * from "./array-expression.jsx";
2
+ export * from "./arrow-function.jsx";
1
3
  export * from "./class-method.js";
2
4
  export * from "./function-declaration.js";
5
+ export * from "./function-expression.js";
6
+ export * from "./function-type.js";
3
7
  export * from "./interface-declaration.js";
4
8
  export * from "./interface-member.js";
9
+ export * from "./interface-method.js";
5
10
  export * from "./static-serializers.js";
6
11
  export * from "./type-declaration.js";
7
12
  export * from "./type-expression.js";
8
13
  export * from "./type-transform.js";
9
14
  export * from "./union-declaration.js";
10
15
  export * from "./union-expression.js";
16
+ export * from "./value-expression.js";
11
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC"}
@@ -1,11 +1,17 @@
1
+ export * from "./array-expression.js";
2
+ export * from "./arrow-function.js";
1
3
  export * from "./class-method.js";
2
4
  export * from "./function-declaration.js";
5
+ export * from "./function-expression.js";
6
+ export * from "./function-type.js";
3
7
  export * from "./interface-declaration.js";
4
8
  export * from "./interface-member.js";
9
+ export * from "./interface-method.js";
5
10
  export * from "./static-serializers.js";
6
11
  export * from "./type-declaration.js";
7
12
  export * from "./type-expression.js";
8
13
  export * from "./type-transform.js";
9
14
  export * from "./union-declaration.js";
10
15
  export * from "./union-expression.js";
16
+ export * from "./value-expression.js";
11
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/typescript/components/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,2BAA2B;AACzC,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB;AACrC,cAAc,yBAAyB;AACvC,cAAc,uBAAuB;AACrC,cAAc,sBAAsB;AACpC,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,uBAAuB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/typescript/components/index.ts"],"sourcesContent":[null],"mappings":"AAAA;AACA;AACA,cAAc,mBAAmB;AACjC,cAAc,2BAA2B;AACzC,cAAc,0BAA0B;AACxC,cAAc,oBAAoB;AAClC,cAAc,4BAA4B;AAC1C,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,yBAAyB;AACvC,cAAc,uBAAuB;AACrC,cAAc,sBAAsB;AACpC,cAAc,qBAAqB;AACnC,cAAc,wBAAwB;AACtC,cAAc,uBAAuB;AACrC,cAAc,uBAAuB","ignoreList":[]}
@@ -1,8 +1,7 @@
1
- import * as ay from "@alloy-js/core";
2
1
  import { ModelProperty, Operation } from "@typespec/compiler";
3
2
  export interface InterfaceMemberProps {
4
3
  type: ModelProperty | Operation;
5
4
  optional?: boolean;
6
5
  }
7
- export declare function InterfaceMember(props: InterfaceMemberProps): ay.Children;
6
+ export declare function InterfaceMember(props: InterfaceMemberProps): import("@alloy-js/core").Children;
8
7
  //# sourceMappingURL=interface-member.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interface-member.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/interface-member.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAAe,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM3E,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eA2C1D"}
1
+ {"version":3,"file":"interface-member.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/interface-member.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM3E,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qCA2B1D"}
@@ -1,11 +1,10 @@
1
1
  import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
2
2
  import { memo as _$memo } from "@alloy-js/core/jsx-runtime";
3
- import * as ay from "@alloy-js/core";
4
3
  import * as ts from "@alloy-js/typescript";
5
4
  import { isNeverType } from "@typespec/compiler";
6
5
  import { $ } from "@typespec/compiler/experimental/typekit";
7
6
  import { getHttpPart } from "@typespec/http";
8
- import { FunctionDeclaration } from "./function-declaration.js";
7
+ import { InterfaceMethod } from "./interface-method.js";
9
8
  import { TypeExpression } from "./type-expression.js";
10
9
  export function InterfaceMember(props) {
11
10
  const namer = ts.useTSNamePolicy();
@@ -32,24 +31,9 @@ export function InterfaceMember(props) {
32
31
  });
33
32
  }
34
33
  if ($.operation.is(props.type)) {
35
- const returnType = _$createComponent(TypeExpression, {
34
+ return _$createComponent(InterfaceMethod, {
36
35
  get type() {
37
- return props.type.returnType;
38
- }
39
- });
40
- const params = _$createComponent(ay.Scope, {
41
- get children() {
42
- return _$createComponent(FunctionDeclaration.Parameters, {
43
- get type() {
44
- return props.type.parameters;
45
- }
46
- });
47
- }
48
- });
49
- return _$createComponent(ts.InterfaceMember, {
50
- name: name,
51
- get type() {
52
- return ["(", params, ") => ", returnType];
36
+ return props.type;
53
37
  }
54
38
  });
55
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interface-member.js","names":["ay","ts","isNeverType","$","getHttpPart","FunctionDeclaration","TypeExpression","InterfaceMember","props","namer","useTSNamePolicy","name","getName","type","modelProperty","is","unpackedType","part","program","_$createComponent","optional","operation","returnType","params","Scope","children","Parameters","parameters"],"sources":["../../../../src/typescript/components/interface-member.tsx"],"sourcesContent":[null],"mappings":";;AAAA,OAAO,KAAKA,EAAE,MAAM,gBAAgB;AACpC,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAC1C,SAASC,WAAW,QAAkC,oBAAoB;AAC1E,SAASC,CAAC,QAAQ,yCAAyC;AAC3D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,mBAAmB,QAAQ,2BAA2B;AAC/D,SAASC,cAAc,QAAQ,sBAAsB;AAOrD,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,MAAMC,KAAK,GAAGR,EAAE,CAACS,eAAe,CAAC,CAAC;EAClC,MAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACJ,KAAK,CAACK,IAAI,CAACF,IAAI,EAAE,sBAAsB,CAAC;E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MAAM,WAASD,UAAU;MAAA;IAAA;EAKrC;AACF","ignoreList":[]}
1
+ {"version":3,"file":"interface-member.js","names":["ts","isNeverType","$","getHttpPart","InterfaceMethod","TypeExpression","InterfaceMember","props","namer","useTSNamePolicy","name","getName","type","modelProperty","is","unpackedType","part","program","_$createComponent","optional","operation"],"sources":["../../../../src/typescript/components/interface-member.tsx"],"sourcesContent":[null],"mappings":";;AAAA,OAAO,KAAKA,EAAE,MAAM,sBAAsB;AAC1C,SAASC,WAAW,QAAkC,oBAAoB;AAC1E,SAASC,CAAC,QAAQ,yCAAyC;AAC3D,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,eAAe;AACxB,SAASC,cAAc,QAAQ,sBAAsB;AAOrD,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,MAAMC,KAAK,GAAGR,EAAE,CAACS,eAAe,CAAC,CAAC;EAClC,MAAMC,IAAI,GAAGF,KAAK,CAACG,OAAO,CAACJ,KAAK,CAACK,IAAI,CAACF,IAAI,EAAE,sBAAsB,CAAC;EAEnE,IAAIR,CAAC,CAACW,aAAa,CAACC,EAAE,CAACP,KAAK,CAACK,IAAI,CAAC,EAAE;IAClC,IAAIX,WAAW,CAACM,KAAK,CAACK,IAAI,CAACA,IAAI,CAAC,EAAE;MAChC,OAAO,IAAI;IACb;IAEA,IAAIG,YAAY,GAAGR,KAAK,CAACK,IAAI,CAACA,IAAI;IAClC,MAAMI,IAAI,GAAGb,WAAW,CAACD,CAAC,CAACe,OAAO,EAAEV,KAAK,CAACK,IAAI,CAACA,IAAI,CAAC;IACpD,IAAII,IAAI,EAAE;MACRD,YAAY,GAAGC,IAAI,CAACJ,IAAI;IAC1B;IAEA,OAAAM,iBAAA,CACGlB,EAAE,CAACM,eAAe;MACjBI,IAAI,EAAEA,IAAI;MAAA,IACVS,QAAQA,CAAA;QAAA,OAAEZ,KAAK,CAACY,QAAQ,IAAIZ,KAAK,CAACK,IAAI,CAACO,QAAQ;MAAA;MAAA,IAC/CP,IAAIA,CAAA;QAAA,OAAAM,iBAAA,CAAGb,cAAc;UAACO,IAAI,EAAEG;QAAY;MAAA;IAAA;EAG9C;EAEA,IAAIb,CAAC,CAACkB,SAAS,CAACN,EAAE,CAACP,KAAK,CAACK,IAAI,CAAC,EAAE;IAC9B,OAAAM,iBAAA,CAAQd,eAAe;MAAA,IAACQ,IAAIA,CAAA;QAAA,OAAEL,KAAK,CAACK,IAAI;MAAA;IAAA;EAC1C;AACF","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ import * as ts from "@alloy-js/typescript";
2
+ import { Operation } from "@typespec/compiler";
3
+ export interface InterfaceMethodPropsWithType extends Omit<ts.InterfaceMethodProps, "name"> {
4
+ type: Operation;
5
+ name?: string;
6
+ parametersMode?: "prepend" | "append" | "replace";
7
+ }
8
+ export type InterfaceMethodProps = InterfaceMethodPropsWithType | ts.InterfaceMethodProps;
9
+ /**
10
+ * A TypeScript interface method. Pass the `type` prop to create the
11
+ * method by converting from a TypeSpec Operation. Any other props
12
+ * provided will take precedence.
13
+ */
14
+ export declare function InterfaceMethod(props: Readonly<InterfaceMethodProps>): import("@alloy-js/core/jsx-runtime").Children;
15
+ //# sourceMappingURL=interface-method.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface-method.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/interface-method.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,MAAM,WAAW,4BAA6B,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACzF,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;CACnD;AAED,MAAM,MAAM,oBAAoB,GAAG,4BAA4B,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAE1F;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,oBAAoB,CAAC,iDA4BpE"}
@@ -0,0 +1,34 @@
1
+ import { mergeProps as _$mergeProps } from "@alloy-js/core/jsx-runtime";
2
+ import { createComponent as _$createComponent } from "@alloy-js/core/jsx-runtime";
3
+ import { splitProps } from "@alloy-js/core/jsx-runtime";
4
+ import * as ts from "@alloy-js/typescript";
5
+ import { buildParameterDescriptors, getReturnType } from "../utils/operation.js";
6
+ import { TypeExpression } from "./type-expression.js";
7
+ /**
8
+ * A TypeScript interface method. Pass the `type` prop to create the
9
+ * method by converting from a TypeSpec Operation. Any other props
10
+ * provided will take precedence.
11
+ */
12
+ export function InterfaceMethod(props) {
13
+ const isTypeSpecTyped = "type" in props;
14
+ if (!isTypeSpecTyped) {
15
+ return _$createComponent(ts.InterfaceMethod, props);
16
+ }
17
+ const [efProps, updateProps, forwardProps] = splitProps(props, ["type"], ["returnType", "parameters"]);
18
+ const name = props.name ?? ts.useTSNamePolicy().getName(efProps.type.name, "function");
19
+ const returnType = props.returnType ?? _$createComponent(TypeExpression, {
20
+ get type() {
21
+ return getReturnType(efProps.type);
22
+ }
23
+ });
24
+ const allParameters = buildParameterDescriptors(efProps.type.parameters, {
25
+ params: props.parameters,
26
+ mode: props.parametersMode
27
+ });
28
+ return _$createComponent(ts.InterfaceMethod, _$mergeProps(forwardProps, updateProps, {
29
+ name: name,
30
+ returnType: returnType,
31
+ parameters: allParameters
32
+ }));
33
+ }
34
+ //# sourceMappingURL=interface-method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface-method.js","names":["splitProps","ts","buildParameterDescriptors","getReturnType","TypeExpression","InterfaceMethod","props","isTypeSpecTyped","_$createComponent","efProps","updateProps","forwardProps","name","useTSNamePolicy","getName","type","returnType","allParameters","parameters","params","mode","parametersMode","_$mergeProps"],"sources":["../../../../src/typescript/components/interface-method.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,UAAU,QAAQ,4BAA4B;AACvD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,yBAAyB,EAAEC,aAAa,QAAQ,uBAAuB;AAChF,SAASC,cAAc;AAUvB;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAACC,KAAqC,EAAE;EACrE,MAAMC,eAAe,GAAG,MAAM,IAAID,KAAK;EACvC,IAAI,CAACC,eAAe,EAAE;IACpB,OAAAC,iBAAA,CAAQP,EAAE,CAACI,eAAe,EAAKC,KAAK;EACtC;EAEA,MAAM,CAACG,OAAO,EAAEC,WAAW,EAAEC,YAAY,CAAC,GAAGX,UAAU,CACrDM,KAAK,EACL,CAAC,MAAM,CAAC,EACR,CAAC,YAAY,EAAE,YAAY,CAC7B,CAAC;EAED,MAAMM,IAAI,GAAGN,KAAK,CAACM,IAAI,IAAIX,EAAE,CAACY,eAAe,CAAC,CAAC,CAACC,OAAO,CAACL,OAAO,CAACM,IAAI,CAACH,IAAI,EAAE,UAAU,CAAC;EACtF,MAAMI,UAAU,GAAGV,KAAK,CAACU,UAAU,IAAAR,iBAAA,CAAKJ,cAAc;IAAA,IAACW,IAAIA,CAAA;MAAA,OAAEZ,aAAa,CAACM,OAAO,CAACM,IAAI,CAAC;IAAA;EAAA,EAAI;EAC5F,MAAME,aAAa,GAAGf,yBAAyB,CAACO,OAAO,CAACM,IAAI,CAACG,UAAU,EAAE;IACvEC,MAAM,EAAEb,KAAK,CAACY,UAAU;IACxBE,IAAI,EAAEd,KAAK,CAACe;EACd,CAAC,CAAC;EAEF,OAAAb,iBAAA,CACGP,EAAE,CAACI,eAAe,EAAAiB,YAAA,CACbX,YAAY,EACZD,WAAW;IACfE,IAAI,EAAEA,IAAI;IACVI,UAAU,EAAEA,UAAU;IACtBE,UAAU,EAAED;EAAa;AAG/B","ignoreList":[]}
@@ -1,9 +1,13 @@
1
1
  import * as ts from "@alloy-js/typescript";
2
- import { Scalar } from "@typespec/compiler";
2
+ import { Type } from "@typespec/compiler";
3
3
  export interface TypedAliasDeclarationProps extends Omit<ts.TypeDeclarationProps, "name"> {
4
- type: Scalar;
4
+ type: Type;
5
5
  name?: string;
6
6
  }
7
7
  export type TypeAliasDeclarationProps = TypedAliasDeclarationProps | ts.TypeDeclarationProps;
8
+ /**
9
+ * Create a TypeScript type alias declaration. Pass the `type` prop to emit the
10
+ * type alias as the provided TypeSpec type.
11
+ */
8
12
  export declare function TypeAliasDeclaration(props: TypeAliasDeclarationProps): import("@alloy-js/core").Children;
9
13
  //# sourceMappingURL=type-alias-declaration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-alias-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-alias-declaration.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAK5C,MAAM,WAAW,0BAA2B,SAAQ,IAAI,CAAC,EAAE,CAAC,oBAAoB,EAAE,MAAM,CAAC;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,yBAAyB,GAAG,0BAA0B,GAAG,EAAE,CAAC,oBAAoB,CAAC;AAE7F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,qCAkBpE"}
1
+ {"version":3,"file":"type-alias-declaration.d.ts","sourceRoot":"","sources":["../../../../src/typescript/components/type-alias-declaration.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAK1C,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,qCAoBpE"}
@@ -6,6 +6,10 @@ import * as ts from "@alloy-js/typescript";
6
6
  import { $ } from "@typespec/compiler/experimental/typekit";
7
7
  import { reportDiagnostic } from "../../lib.js";
8
8
  import { TypeExpression } from "./type-expression.js";
9
+ /**
10
+ * Create a TypeScript type alias declaration. Pass the `type` prop to emit the
11
+ * type alias as the provided TypeSpec type.
12
+ */
9
13
  export function TypeAliasDeclaration(props) {
10
14
  if (!isTypedAliasDeclarationProps(props)) {
11
15
  return _$createComponent(ts.TypeDeclaration, _$mergeProps(props, {
@@ -14,7 +18,7 @@ export function TypeAliasDeclaration(props) {
14
18
  }
15
19
  }));
16
20
  }
17
- const originalName = props.name ?? props.type.name;
21
+ const originalName = props.name ?? ("name" in props.type && typeof props.type.name === "string" ? props.type.name : "");
18
22
  if (!originalName || originalName === "") {
19
23
  reportDiagnostic($.program, {
20
24
  code: "type-declaration-missing-name",
@@ -31,7 +35,8 @@ export function TypeAliasDeclaration(props) {
31
35
  return [_$createComponent(TypeExpression, {
32
36
  get type() {
33
37
  return props.type;
34
- }
38
+ },
39
+ noReference: true
35
40
  }), _$memo(() => props.children)];
36
41
  }
37
42
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"type-alias-declaration.js","names":["refkey","getRefkey","ts","$","reportDiagnostic","TypeExpression","TypeAliasDeclaration","props","isTypedAliasDeclarationProps","_$createComponent","TypeDeclaration","_$mergeProps","children","originalName","name","type","program","code","target","useTSNamePolicy","getName","_$memo"],"sources":["../../../../src/typescript/components/type-alias-declaration.tsx"],"sourcesContent":[null],"mappings":";;;AAAA,SAASA,MAAM,IAAIC,SAAS,QAAQ,gBAAgB;AACpD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,CAAC,QAAQ,yCAAyC;AAC3D,SAASC,gBAAgB,QAAQ,cAAc;AAC/C,SAASC,cAAc;AASvB,OAAO,SAASC,oBAAoBA,CAACC,KAAgC,EAAE;EACrE,IAAI,CAACC,4BAA4B,CAACD,KAAK,CAAC,EAAE;IACxC,OAAAE,iBAAA,CAAQP,EAAE,CAACQ,eAAe,EAAAC,YAAA,CAAKJ,KAAK;MAAA,IAAAK,SAAA;QAAA,OAAGL,KAAK,CAACK,QAAQ;MAAA;IAAA;EACvD;EAEA,MAAMC,YAAY,GAAGN,KAAK,CAACO,IAAI,IAAIP,KAAK,CAACQ,IAAI,CAACD,IAAI;EAElD,IAAI,CAACD,YAAY,IAAIA,YAAY,KAAK,EAAE,EAAE;IACxCT,gBAAgB,CAACD,CAAC,CAACa,OAAO,EAAE;MAAEC,IAAI,EAAE,+BAA+B;MAAEC,MAAM,EAAEX,KAAK,CAACQ;IAAK,CAAC,CAAC;EAC5F;EAEA,MAAMD,IAAI,GAAGZ,EAAE,CAACiB,eAAe,CAAC,CAAC,CAACC,OAAO,CAACP,YAAY,EAAE,MAAM,CAAC;EAC/D,OAAAJ,iBAAA,CACGP,EAAE,CAACQ,eAAe,EAAAC,YAAA,CAAKJ,KAAK;IAAEO,IAAI,EAAEA,IAAI;IAAA,IAAEd,MAAMA,CAAA;MAAA,OAAEO,KAAK,CAACP,MAAM,IAAIC,SAAS,CAACM,KAAK,CAACQ,IAAI,CAAC;IAAA;IAAA,IAAAH,SAAA;MAAA,QAAAH,iBAAA,CACrFJ,cAAc;QAAA,IAACU,IAAIA,CAAA;UAAA,OAAER,KAAK,CAACQ,IAAI;QAAA;MAAA,IAAAM,MAAA,OAC/Bd,KAAK,CAACK,QAAQ;IAAA;EAAA;AAGrB;AAEA,SAASJ,4BAA4BA,CACnCD,KAAgC,EACK;EACrC,OAAO,MAAM,IAAIA,KAAK;AACxB","ignoreList":[]}
1
+ {"version":3,"file":"type-alias-declaration.js","names":["refkey","getRefkey","ts","$","reportDiagnostic","TypeExpression","TypeAliasDeclaration","props","isTypedAliasDeclarationProps","_$createComponent","TypeDeclaration","_$mergeProps","children","originalName","name","type","program","code","target","useTSNamePolicy","getName","noReference","_$memo"],"sources":["../../../../src/typescript/components/type-alias-declaration.tsx"],"sourcesContent":[null],"mappings":";;;AAAA,SAASA,MAAM,IAAIC,SAAS,QAAQ,gBAAgB;AACpD,OAAO,KAAKC,EAAE,MAAM,sBAAsB;AAE1C,SAASC,CAAC,QAAQ,yCAAyC;AAC3D,SAASC,gBAAgB,QAAQ,cAAc;AAC/C,SAASC,cAAc;AASvB;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAACC,KAAgC,EAAE;EACrE,IAAI,CAACC,4BAA4B,CAACD,KAAK,CAAC,EAAE;IACxC,OAAAE,iBAAA,CAAQP,EAAE,CAACQ,eAAe,EAAAC,YAAA,CAAKJ,KAAK;MAAA,IAAAK,SAAA;QAAA,OAAGL,KAAK,CAACK,QAAQ;MAAA;IAAA;EACvD;EAEA,MAAMC,YAAY,GAChBN,KAAK,CAACO,IAAI,KACT,MAAM,IAAIP,KAAK,CAACQ,IAAI,IAAI,OAAOR,KAAK,CAACQ,IAAI,CAACD,IAAI,KAAK,QAAQ,GAAGP,KAAK,CAACQ,IAAI,CAACD,IAAI,GAAG,EAAE,CAAC;EAEtF,IAAI,CAACD,YAAY,IAAIA,YAAY,KAAK,EAAE,EAAE;IACxCT,gBAAgB,CAACD,CAAC,CAACa,OAAO,EAAE;MAAEC,IAAI,EAAE,+BAA+B;MAAEC,MAAM,EAAEX,KAAK,CAACQ;IAAK,CAAC,CAAC;EAC5F;EAEA,MAAMD,IAAI,GAAGZ,EAAE,CAACiB,eAAe,CAAC,CAAC,CAACC,OAAO,CAACP,YAAY,EAAE,MAAM,CAAC;EAC/D,OAAAJ,iBAAA,CACGP,EAAE,CAACQ,eAAe,EAAAC,YAAA,CAAKJ,KAAK;IAAEO,IAAI,EAAEA,IAAI;IAAA,IAAEd,MAAMA,CAAA;MAAA,OAAEO,KAAK,CAACP,MAAM,IAAIC,SAAS,CAACM,KAAK,CAACQ,IAAI,CAAC;IAAA;IAAA,IAAAH,SAAA;MAAA,QAAAH,iBAAA,CACrFJ,cAAc;QAAA,IAACU,IAAIA,CAAA;UAAA,OAAER,KAAK,CAACQ,IAAI;QAAA;QAAEM,WAAW;MAAA,IAAAC,MAAA,OAC5Cf,KAAK,CAACK,QAAQ;IAAA;EAAA;AAGrB;AAEA,SAASJ,4BAA4BA,CACnCD,KAAgC,EACK;EACrC,OAAO,MAAM,IAAIA,KAAK;AACxB","ignoreList":[]}
@@ -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;AAM1C,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,qCAgB1D"}
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;AAM1C,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,qCAkB1D"}
@@ -30,6 +30,10 @@ export function TypeDeclaration(props) {
30
30
  return _$createComponent(TypeAliasDeclaration, _$mergeProps({
31
31
  type: type
32
32
  }, restProps));
33
+ case "Operation":
34
+ return _$createComponent(TypeAliasDeclaration, _$mergeProps({
35
+ type: type
36
+ }, restProps));
33
37
  }
34
38
  }
35
39
  //# sourceMappingURL=type-declaration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-declaration.js","names":["ts","EnumDeclaration","InterfaceDeclaration","TypeAliasDeclaration","UnionDeclaration","TypeDeclaration","props","type","_$createComponent","restProps","kind","_$mergeProps"],"sources":["../../../../src/typescript/components/type-declaration.tsx"],"sourcesContent":[null],"mappings":";;AAAA,OAAO,KAAKA,EAAE,MAAM,sBAAsB;AAE1C,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,oBAAoB;AAC7B,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AASzB,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,IAAI,CAACA,KAAK,CAACC,IAAI,EAAE;IACf,OAAAC,iBAAA,CAAQR,EAAE,CAACK,eAAe,EAAMC,KAAK;EACvC;EAEA,MAAM;IAAEC,IAAI;IAAE,GAAGE;EAAU,CAAC,GAAGH,KAAK;EACpC,QAAQC,IAAI,CAACG,IAAI;IACf,KAAK,OAAO;MACV,OAAAF,iBAAA,CAAQN,oBAAoB,EAAAS,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;IACxD,KAAK,OAAO;MACV,OAAAD,iBAAA,CAAQJ,gBAAgB,EAAAO,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;IACpD,KAAK,MAAM;MACT,OAAAD,iBAAA,CAAQP,eAAe,EAAAU,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;IACnD,KAAK,QAAQ;MACX,OAAAD,iBAAA,CAAQL,oBAAoB,EAAAQ,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;EAC1D;AACF","ignoreList":[]}
1
+ {"version":3,"file":"type-declaration.js","names":["ts","EnumDeclaration","InterfaceDeclaration","TypeAliasDeclaration","UnionDeclaration","TypeDeclaration","props","type","_$createComponent","restProps","kind","_$mergeProps"],"sources":["../../../../src/typescript/components/type-declaration.tsx"],"sourcesContent":[null],"mappings":";;AAAA,OAAO,KAAKA,EAAE,MAAM,sBAAsB;AAE1C,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,oBAAoB;AAC7B,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AASzB,OAAO,SAASC,eAAeA,CAACC,KAA2B,EAAE;EAC3D,IAAI,CAACA,KAAK,CAACC,IAAI,EAAE;IACf,OAAAC,iBAAA,CAAQR,EAAE,CAACK,eAAe,EAAMC,KAAK;EACvC;EAEA,MAAM;IAAEC,IAAI;IAAE,GAAGE;EAAU,CAAC,GAAGH,KAAK;EACpC,QAAQC,IAAI,CAACG,IAAI;IACf,KAAK,OAAO;MACV,OAAAF,iBAAA,CAAQN,oBAAoB,EAAAS,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;IACxD,KAAK,OAAO;MACV,OAAAD,iBAAA,CAAQJ,gBAAgB,EAAAO,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;IACpD,KAAK,MAAM;MACT,OAAAD,iBAAA,CAAQP,eAAe,EAAAU,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;IACnD,KAAK,QAAQ;MACX,OAAAD,iBAAA,CAAQL,oBAAoB,EAAAQ,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;IACxD,KAAK,WAAW;MACd,OAAAD,iBAAA,CAAQL,oBAAoB,EAAAQ,YAAA;QAACJ,IAAI,EAAEA;MAAI,GAAME,SAAS;EAC1D;AACF","ignoreList":[]}
@@ -2,6 +2,12 @@ import { Type } from "@typespec/compiler";
2
2
  import "@typespec/http/experimental/typekit";
3
3
  export interface TypeExpressionProps {
4
4
  type: Type;
5
+ /**
6
+ * Whether to disallow references. Setting this will force the type to be
7
+ * emitted inline, even if it is a declaration that would otherwise be
8
+ * referenced.
9
+ */
10
+ noReference?: boolean;
5
11
  }
6
12
  export declare function TypeExpression(props: TypeExpressionProps): import("@alloy-js/core").Children;
7
13
  //# sourceMappingURL=type-expression.d.ts.map
@@ -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;AAO7C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qCAwDxD"}
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;AAQ7C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;IAEX;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qCAyDxD"}
@@ -6,12 +6,13 @@ import { $ } from "@typespec/compiler/experimental/typekit";
6
6
  import "@typespec/http/experimental/typekit";
7
7
  import { reportTypescriptDiagnostic } from "../../typescript/lib.js";
8
8
  import { ArrayExpression } from "./array-expression.js";
9
+ import { FunctionType } from "./function-type.js";
9
10
  import { InterfaceExpression } from "./interface-declaration.js";
10
11
  import { RecordExpression } from "./record-expression.js";
11
12
  import { UnionExpression } from "./union-expression.js";
12
13
  export function TypeExpression(props) {
13
14
  const type = $.httpPart.unpack(props.type);
14
- if (isDeclaration(type)) {
15
+ if (!props.noReference && isDeclaration(type)) {
15
16
  // todo: probably need abstraction around deciding what's a declaration in the output
16
17
  // (it may not correspond to things which are declarations in TypeSpec?)
17
18
  return _$createComponent(Reference, {
@@ -84,6 +85,10 @@ export function TypeExpression(props) {
84
85
  return _$createComponent(InterfaceExpression, {
85
86
  type: type
86
87
  });
88
+ case "Operation":
89
+ return _$createComponent(FunctionType, {
90
+ type: type
91
+ });
87
92
  default:
88
93
  reportTypescriptDiagnostic($.program, {
89
94
  code: "typescript-unsupported-type",
@@ -1 +1 @@
1
- {"version":3,"file":"type-expression.js","names":["For","refkey","Reference","ValueExpression","$","reportTypescriptDiagnostic","ArrayExpression","InterfaceExpression","RecordExpression","UnionExpression","TypeExpression","props","type","httpPart","unpack","isDeclaration","_$createComponent","kind","_$memo","getScalarIntrinsicExpression","jsValue","value","each","values","comma","line","children","element","array","is","elementType","indexer","record","partType","program","code","target","intrinsicNameToTSType","Map","intrinsicName","scalar","isUtcDateTime","extendsUtcDateTime","encoding","getEncoding","emittedType","getStdBase","name","tsType","get","Boolean"],"sources":["../../../../src/typescript/components/type-expression.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,GAAG,EAAEC,MAAM,QAAQ,gBAAgB;AAC5C,SAASC,SAAS,EAAEC,eAAe,QAAQ,sBAAsB;AAEjE,SAASC,CAAC,QAAQ,yCAAyC;AAC3D,OAAO,qCAAqC;AAC5C,SAASC,0BAA0B,QAAQ,yBAAyB;AACpE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,eAAe,QAAQ,uBAA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iC,WAAW,GAAG,MAAM;MACxB,QAAQF,QAAQ,EAAEA,QAAQ;QACxB,KAAK,eAAe;QACpB,KAAK,SAAS;QACd,KAAK,SAAS;QACd;UACEE,WAAW,GAAG,MAAM;UACpB;MACJ;MAEA,OAAOA,WAAW;IACpB;IAEAN,aAAa,GAAGnC,CAAC,CAACoC,MAAM,CAACM,UAAU,CAAClC,IAAI,CAAC,EAAEmC,IAAI,IAAI,EAAE;EACvD,CAAC,MAAM;IACLR,aAAa,GAAG3B,IAAI,CAACmC,IAAI;EAC3B;EAEA,MAAMC,MAAM,GAAGX,qBAAqB,CAACY,GAAG,CAACV,aAAa,CAAC;EAEvD,IAAI,CAACS,MAAM,EAAE;IACX3C,0BAA0B,CAACD,CAAC,CAAC8B,OAAO,EAAE;MAAEC,IAAI,EAAE,+BAA+B;MAAEC,MAAM,EAAExB;IAAK,CAAC,CAAC;IAC9F,OAAO,KAAK;EACd;EAEA,OAAOoC,MAAM;AACf;AAEA,SAASjC,aAAaA,CAACH,IAAU,EAAW;EAC1C,QAAQA,IAAI,CAACK,IAAI;IACf,KAAK,WAAW;IAChB,KAAK,WAAW;IAChB,KAAK,MAAM;IACX,KAAK,WAAW;IAChB,KAAK,YAAY;MACf,OAAO,IAAI;IACb,KAAK,cAAc;MACjB,OAAO,KAAK;IAEd,KAAK,OAAO;MACV,IAAIb,CAAC,CAACwB,KAAK,CAACC,EAAE,CAACjB,IAAI,CAAC,IAAIR,CAAC,CAAC4B,MAAM,CAACH,EAAE,CAACjB,IAAI,CAAC,EAAE;QACzC,OAAO,KAAK;MACd;MAEA,OAAOsC,OAAO,CAACtC,IAAI,CAACmC,IAAI,CAAC;IAC3B,KAAK,OAAO;MACV,OAAOG,OAAO,CAACtC,IAAI,CAACmC,IAAI,CAAC;IAC3B;MACE,OAAO,KAAK;EAChB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"type-expression.js","names":["For","refkey","Reference","ValueExpression","$","reportTypescriptDiagnostic","ArrayExpression","FunctionType","InterfaceExpression","RecordExpression","UnionExpression","TypeExpression","props","type","httpPart","unpack","noReference","isDeclaration","_$createComponent","kind","_$memo","getScalarIntrinsicExpression","jsValue","value","each","values","comma","line","children","element","array","is","elementType","indexer","record","partType","program","code","target","intrinsicNameToTSType","Map","intrinsicName","scalar","isUtcDateTime","extendsUtcDateTime","encoding","getEncoding","emittedType","getStdBase","name","tsType","get","Boolean"],"sources":["../../../../src/typescript/components/type-expression.tsx"],"sourcesContent":[null],"mappings":";;AAAA,SAASA,GAAG,EAAEC,MAAM,QAAQ,gBAAgB;AAC5C,SAASC,SAAS,EAAEC,eAAe,QAAQ,sBAAsB;AAEjE,SAASC,CAAC,QAAQ,yCAAyC;AAC3D,OAAO,qCAAqC;AAC5C,SAASC,0BAA0B,QAAQ,yBAAyB;AACpE,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,eAAe,QAAQ,uBAAuB;AAavD,OAAO,SAASC,cAAcA,CAACC,KAA0B,EAAE;EACzD,MAAMC,IAAI,GAAGT,CAAC,CAACU,QAAQ,CAACC,MAAM,CAACH,KAAK,CAACC,IAAI,CAAC;EAC1C,IAAI,CAACD,KAAK,CAACI,WAAW,IAAIC,aAAa,CAACJ,IAAI,CAAC,EAAE;IAC7C;IACA;IACA,OAAAK,iBAAA,CAAQhB,SAAS;MAAA,IAACD,MAAMA,CAAA;QAAA,OAAEA,MAAM,CAACY,IAAI,CAAC;MAAA;IAAA;IACtC;EACF;;EAEA;EACA,QAAQA,IAAI,CAACM,IAAI;IACf,KAAK,QAAQ;IACb,KAAK,WAAW;MACd,QAAAC,MAAA,OAAUC,4BAA4B,CAACR,IAAI,CAAC;IAC9C,KAAK,SAAS;IACd,KAAK,QAAQ;IACb,KAAK,QAAQ;MACX,OAAAK,iBAAA,CAAQf,eAAe;QAAA,IAACmB,O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CAAC,CAACgC,OAAO,EAAE;MAAEC,IAAI,EAAE,+BAA+B;MAAEC,MAAM,EAAEzB;IAAK,CAAC,CAAC;IAC9F,OAAO,KAAK;EACd;EAEA,OAAOqC,MAAM;AACf;AAEA,SAASjC,aAAaA,CAACJ,IAAU,EAAW;EAC1C,QAAQA,IAAI,CAACM,IAAI;IACf,KAAK,WAAW;IAChB,KAAK,WAAW;IAChB,KAAK,MAAM;IACX,KAAK,WAAW;IAChB,KAAK,YAAY;MACf,OAAO,IAAI;IACb,KAAK,cAAc;MACjB,OAAO,KAAK;IAEd,KAAK,OAAO;MACV,IAAIf,CAAC,CAAC0B,KAAK,CAACC,EAAE,CAAClB,IAAI,CAAC,IAAIT,CAAC,CAAC8B,MAAM,CAACH,EAAE,CAAClB,IAAI,CAAC,EAAE;QACzC,OAAO,KAAK;MACd;MAEA,OAAOuC,OAAO,CAACvC,IAAI,CAACoC,IAAI,CAAC;IAC3B,KAAK,OAAO;MACV,OAAOG,OAAO,CAACvC,IAAI,CAACoC,IAAI,CAAC;IAC3B;MACE,OAAO,KAAK;EAChB;AACF","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=arrow-function.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow-function.test.d.ts","sourceRoot":"","sources":["../../../../test/typescript/components/arrow-function.test.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=function-expression.test.d.ts.map