@powerlines/plugin-alloy 0.21.3 → 0.22.0

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 (89) hide show
  1. package/dist/core/components/output.d.cts +2 -2
  2. package/dist/core/components/single-line-comment.d.cts +2 -2
  3. package/dist/core/contexts/reflection.d.cts.map +1 -1
  4. package/dist/helpers/index.cjs +1 -1
  5. package/dist/helpers/index.d.cts +2 -2
  6. package/dist/helpers/index.d.mts +2 -2
  7. package/dist/helpers/index.mjs +2 -2
  8. package/dist/helpers/typescript.cjs +2 -2
  9. package/dist/helpers/typescript.d.cts +6 -6
  10. package/dist/helpers/typescript.d.cts.map +1 -1
  11. package/dist/helpers/typescript.d.mts +6 -6
  12. package/dist/helpers/typescript.d.mts.map +1 -1
  13. package/dist/helpers/typescript.mjs +2 -2
  14. package/dist/helpers/typescript.mjs.map +1 -1
  15. package/dist/markdown/components/front-matter.d.cts +2 -2
  16. package/dist/markdown/components/front-matter.d.cts.map +1 -1
  17. package/dist/markdown/components/markdown-file.d.cts +3 -3
  18. package/dist/markdown/components/markdown-file.d.mts +3 -3
  19. package/dist/markdown/components/markdown-table.d.cts +4 -4
  20. package/dist/markdown/components/markdown-table.d.mts +4 -4
  21. package/dist/markdown/contexts/markdown-table.d.cts.map +1 -1
  22. package/dist/typescript/components/builtin-file.d.cts +2 -2
  23. package/dist/typescript/components/builtin-file.d.mts +2 -2
  24. package/dist/typescript/components/class-declaration.cjs +112 -14
  25. package/dist/typescript/components/class-declaration.d.cts +55 -1
  26. package/dist/typescript/components/class-declaration.d.cts.map +1 -1
  27. package/dist/typescript/components/class-declaration.d.mts +55 -1
  28. package/dist/typescript/components/class-declaration.d.mts.map +1 -1
  29. package/dist/typescript/components/class-declaration.mjs +112 -16
  30. package/dist/typescript/components/class-declaration.mjs.map +1 -1
  31. package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
  32. package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
  33. package/dist/typescript/components/entry-file.d.mts +2 -2
  34. package/dist/typescript/components/index.cjs +14 -10
  35. package/dist/typescript/components/index.d.cts +5 -5
  36. package/dist/typescript/components/index.d.mts +5 -5
  37. package/dist/typescript/components/index.mjs +6 -6
  38. package/dist/typescript/components/interface-declaration.cjs +225 -0
  39. package/dist/typescript/components/interface-declaration.d.cts +82 -0
  40. package/dist/typescript/components/interface-declaration.d.cts.map +1 -0
  41. package/dist/typescript/components/interface-declaration.d.mts +82 -0
  42. package/dist/typescript/components/interface-declaration.d.mts.map +1 -0
  43. package/dist/typescript/components/interface-declaration.mjs +222 -0
  44. package/dist/typescript/components/interface-declaration.mjs.map +1 -0
  45. package/dist/typescript/components/{typescript-object.cjs → object-declaration.cjs} +6 -6
  46. package/dist/typescript/components/object-declaration.d.cts +30 -0
  47. package/dist/typescript/components/object-declaration.d.cts.map +1 -0
  48. package/dist/typescript/components/object-declaration.d.mts +30 -0
  49. package/dist/typescript/components/object-declaration.d.mts.map +1 -0
  50. package/dist/typescript/components/{typescript-object.mjs → object-declaration.mjs} +6 -6
  51. package/dist/typescript/components/object-declaration.mjs.map +1 -0
  52. package/dist/typescript/components/{typescript-property-name.cjs → property-name.cjs} +3 -3
  53. package/dist/typescript/components/{typescript-property-name.d.mts → property-name.d.cts} +7 -7
  54. package/dist/typescript/components/property-name.d.cts.map +1 -0
  55. package/dist/typescript/components/{typescript-property-name.d.cts → property-name.d.mts} +7 -7
  56. package/dist/typescript/components/property-name.d.mts.map +1 -0
  57. package/dist/typescript/components/{typescript-property-name.mjs → property-name.mjs} +4 -4
  58. package/dist/typescript/components/property-name.mjs.map +1 -0
  59. package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
  60. package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
  61. package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
  62. package/dist/typescript/components/tsdoc-reflection.d.mts.map +1 -1
  63. package/dist/typescript/components/tsdoc.cjs +8 -12
  64. package/dist/typescript/components/tsdoc.d.cts.map +1 -1
  65. package/dist/typescript/components/tsdoc.d.mts.map +1 -1
  66. package/dist/typescript/components/tsdoc.mjs +8 -12
  67. package/dist/typescript/components/tsdoc.mjs.map +1 -1
  68. package/dist/typescript/contexts/lexical-scope.d.cts +2 -2
  69. package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -1
  70. package/dist/typescript/index.cjs +13 -9
  71. package/dist/typescript/index.d.cts +5 -5
  72. package/dist/typescript/index.d.mts +5 -5
  73. package/dist/typescript/index.mjs +6 -6
  74. package/package.json +48 -48
  75. package/dist/typescript/components/typescript-interface.cjs +0 -73
  76. package/dist/typescript/components/typescript-interface.d.cts +0 -26
  77. package/dist/typescript/components/typescript-interface.d.cts.map +0 -1
  78. package/dist/typescript/components/typescript-interface.d.mts +0 -26
  79. package/dist/typescript/components/typescript-interface.d.mts.map +0 -1
  80. package/dist/typescript/components/typescript-interface.mjs +0 -72
  81. package/dist/typescript/components/typescript-interface.mjs.map +0 -1
  82. package/dist/typescript/components/typescript-object.d.cts +0 -30
  83. package/dist/typescript/components/typescript-object.d.cts.map +0 -1
  84. package/dist/typescript/components/typescript-object.d.mts +0 -30
  85. package/dist/typescript/components/typescript-object.d.mts.map +0 -1
  86. package/dist/typescript/components/typescript-object.mjs.map +0 -1
  87. package/dist/typescript/components/typescript-property-name.d.cts.map +0 -1
  88. package/dist/typescript/components/typescript-property-name.d.mts.map +0 -1
  89. package/dist/typescript/components/typescript-property-name.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"class-declaration.mjs","names":["Block","code","For","MemberDeclaration","Name","Prose","Show","splitProps","CallSignature","createMemberSymbol","createTypeAndValueSymbol","Declaration","TSSymbolFlags","TypeRefContext","useTSNamePolicy","LexicalScope","MemberScope","getCallSignatureProps","TSDoc","TSDocParams","TypeParameters","TypescriptPropertyName","ClassDeclaration","props","extendsPart","extends","_$memo","implementsPart","implements","length","_$createComponent","each","comma","space","children","implement","sym","name","refkeys","refkey","export","default","metadata","hasInstanceMembers","namePolicy","for","when","Boolean","doc","heading","_$createIntrinsic","symbol","ownerSymbol","abstract","typeParameters","parameters","ClassMember","tsFlags","None","nullish","Nullish","public","private","protected","static","ClassField","optionality","optional","typeSection","type","initializerSection","_$mergeProps","ClassMethod","callProps","_","rest","Array","isArray","async"],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n code,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Prose,\n Refkey,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n CallSignature,\n CallSignatureProps,\n CommonDeclarationProps,\n createMemberSymbol,\n createTypeAndValueSymbol,\n Declaration,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport { LexicalScope } from \"../contexts\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { getCallSignatureProps } from \"../helpers\";\nimport { TSDoc, TSDocParams } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\nimport { TypescriptPropertyName } from \"./typescript-property-name\";\n\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n /**\n * An indication of whether this class is abstract\n */\n abstract?: boolean;\n /**\n * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration\n */\n extends?: Children;\n /**\n * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration\n */\n implements?: Children[];\n /**\n * The generic type parameters of the class.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @example\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {implement => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n <hbr />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n {props.abstract && code`abstract `} class <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nClassDeclaration.TypeParameters = TypeParameters;\n\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n}\n\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n <hbr />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\nexport interface ClassFieldProps extends ClassMemberProps {\n type?: Children;\n optional?: boolean;\n children?: Children;\n}\n\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <TypescriptPropertyName />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc>\n {props.doc && <Prose children={props.doc} />}\n {Array.isArray(rest.parameters) && (\n <TSDocParams parameters={rest.parameters} />\n )}\n </TSDoc>\n <hbr />\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <TypescriptPropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":""}
1
+ {"version":3,"file":"class-declaration.mjs","names":["Block","code","For","MemberDeclaration","Name","Show","splitProps","CallSignature","createMemberSymbol","createTypeAndValueSymbol","Declaration","TSSymbolFlags","TypeRefContext","useTSNamePolicy","LexicalScope","MemberScope","getCallSignatureProps","PropertyName","TSDoc","TSDocParams","TypeParameters","ClassDeclaration","props","extendsPart","extends","_$memo","implementsPart","implements","length","_$createComponent","each","comma","space","children","implement","sym","name","refkeys","refkey","export","default","metadata","hasInstanceMembers","namePolicy","for","when","Boolean","doc","heading","symbol","ownerSymbol","abstract","typeParameters","parameters","ClassMember","tsFlags","None","nullish","Nullish","public","private","protected","static","ClassField","optionality","optional","typeSection","type","initializerSection","_$mergeProps","isPrivateMember","ClassPropertySet","ClassPropertyGet","returnType","ClassMethod","callProps","_","rest","Array","isArray","async"],"sources":["../../../src/typescript/components/class-declaration.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport {\n Block,\n Children,\n code,\n For,\n MemberDeclaration,\n Name,\n Namekey,\n Refkey,\n Show,\n splitProps\n} from \"@alloy-js/core\";\nimport {\n CallSignature,\n CallSignatureProps,\n CommonDeclarationProps,\n createMemberSymbol,\n createTypeAndValueSymbol,\n Declaration,\n TSSymbolFlags,\n TypeParameterDescriptor,\n TypeRefContext,\n useTSNamePolicy\n} from \"@alloy-js/typescript\";\nimport { LexicalScope } from \"../contexts\";\nimport { MemberScope } from \"../contexts/member-scope\";\nimport { getCallSignatureProps } from \"../helpers\";\nimport { PropertyName } from \"./property-name\";\nimport { TSDoc, TSDocParams } from \"./tsdoc\";\nimport { TypeParameters } from \"./type-parameters\";\n\n/**\n * Props for the ClassDeclaration component, which represents a TypeScript class declaration\n */\nexport interface ClassDeclarationProps extends CommonDeclarationProps {\n /**\n * An indication of whether this class is abstract\n */\n abstract?: boolean;\n\n /**\n * An optional class that this class extends. This will be rendered as an `extends` clause in the class declaration\n */\n extends?: Children;\n\n /**\n * Optional interfaces that this class implements. This will be rendered as an `implements` clause in the class declaration\n */\n implements?: Children[];\n\n /**\n * The generic type parameters of the class.\n */\n typeParameters?: TypeParameterDescriptor[] | string[];\n}\n\n/**\n * Create a TypeScript class declaration.\n *\n * @example\n * ```tsx\n * const myPetRefkey = refkey();\n * const Animal = refkey();\n * const staticMember = refkey();\n * const instanceMember = refkey();\n *\n * <ClassDeclaration name=\"Animal\" refkey={Animal}>\n * <ClassMember public static name=\"something\" type=\"string\" refkey={staticMember}>\n * \"hello\"\n * </ClassMember>\n * <ClassMember public name=\"kind\" type=\"string\" />\n * <ClassMember public name=\"name\" type=\"string\" refkey={instanceMember} />\n * <ClassConstructor parameters=\"name: string\">\n * this.name = name;\n * </ClassConstructor>\n * </ClassDeclaration>\n *\n * <VarDeclaration const name=\"myPet\" refkey={myPetRefkey}>\n * new {Animal}();\n * </VarDeclaration>\n *\n * {staticMember}; // Animal.something\n * <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name\n * {memberRefkey(myPetRefkey, instanceMember)}\n * ```\n */\nexport function ClassDeclaration(props: ClassDeclarationProps) {\n const extendsPart = props.extends && <> extends {props.extends}</>;\n const implementsPart = props.implements && props.implements.length > 0 && (\n <>\n {\" \"}\n implements{\" \"}\n <For each={props.implements} comma space>\n {implement => implement}\n </For>\n </>\n );\n const sym = createTypeAndValueSymbol(props.name, {\n refkeys: props.refkey,\n export: props.export,\n default: props.default,\n metadata: props.metadata,\n hasInstanceMembers: true,\n namePolicy: useTSNamePolicy().for(\"class\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <Declaration symbol={sym} export={props.export} default={props.default}>\n <MemberScope ownerSymbol={sym}>\n {props.abstract && code`abstract `} class <Name />\n {props.typeParameters && (\n <TypeParameters parameters={props.typeParameters} />\n )}\n {extendsPart}\n {implementsPart} <Block>{props.children}</Block>\n </MemberScope>\n </Declaration>\n </>\n );\n}\n\nClassDeclaration.TypeParameters = TypeParameters;\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n */\nexport interface ClassMemberProps {\n name: string | Namekey;\n refkey?: Refkey;\n public?: boolean;\n private?: boolean;\n protected?: boolean;\n jsPrivate?: boolean;\n static?: boolean;\n abstract?: boolean;\n children?: Children;\n doc?: Children;\n nullish?: boolean;\n}\n\n/**\n * Generates a TypeScript class member declaration for the given reflection class.\n *\n * @param props - The properties of the class member, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class member declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMember(props: ClassMemberProps) {\n let tsFlags = TSSymbolFlags.None;\n if (props.nullish) {\n tsFlags |= TSSymbolFlags.Nullish;\n }\n\n const sym = createMemberSymbol(props.name, props, {\n refkeys: props.refkey,\n tsFlags,\n namePolicy: useTSNamePolicy().for(\"class-member-data\")\n });\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc} />\n </Show>\n <MemberDeclaration symbol={sym}>\n {props.public && \"public \"}\n {props.private && \"private \"}\n {props.protected && \"protected \"}\n {props.abstract && \"abstract \"}\n {props.static && \"static \"}\n {props.children}\n </MemberDeclaration>\n </>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassFieldProps extends ClassMemberProps {\n type?: Children;\n optional?: boolean;\n children?: Children;\n isPrivateMember?: boolean;\n}\n\n/**\n * Generates a TypeScript class field declaration for the given reflection class.\n *\n * @param props - The properties of the class field, including its name, type, optionality, and other modifiers.\n * @returns A JSX element representing the class field declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassField(props: ClassFieldProps) {\n const optionality = props.optional ? \"?\" : \"\";\n const typeSection = props.type && (\n <>\n {optionality}: <TypeRefContext>{props.type}</TypeRefContext>\n </>\n );\n const initializerSection = props.children && <> = {props.children}</>;\n const nullish = props.nullish ?? props.optional;\n\n return (\n <ClassMember {...props} nullish={nullish}>\n <PropertyName private={props.isPrivateMember} />\n {typeSection}\n {initializerSection}\n </ClassMember>\n );\n}\n\n/**\n * Props for a class field, which is a specific type of class member that represents a property of the class.\n */\nexport interface ClassPropertyProps extends ClassMemberProps {\n type?: Children;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class property setter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property setter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertySet(props: ClassPropertyProps) {\n return (\n <>\n <ClassMember {...props}>\n {\" set \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature\n parameters={[\n {\n name: \"value\",\n type: <TypeRefContext>{props.type}</TypeRefContext>\n }\n ]}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n\n/**\n * Generates a TypeScript class property getter declaration for the given reflection class.\n *\n * @param props - The properties of the class property, including its name, type, and other modifiers.\n * @returns A JSX element representing the class property getter declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassPropertyGet(props: ClassPropertyProps) {\n return (\n <ClassMember {...props}>\n {\" get \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature\n returnType={<TypeRefContext>{props.type}</TypeRefContext>}\n />{\" \"}\n <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n );\n}\n\n/**\n * Props for a class method, which is a specific type of class member that represents a function defined within the class.\n */\nexport interface ClassMethodProps extends ClassMemberProps, CallSignatureProps {\n async?: boolean;\n children?: Children;\n}\n\n/**\n * Generates a TypeScript class method declaration for the given reflection class.\n *\n * @param props - The properties of the class method, including its name, visibility, and other modifiers.\n * @returns A JSX element representing the class method declaration, which can be used within a ClassDeclaration component.\n */\nexport function ClassMethod(props: ClassMethodProps) {\n const callProps = getCallSignatureProps(props);\n const [_, rest] = splitProps(props, [\"doc\"]);\n\n return (\n <>\n <Show when={Boolean(props.doc)}>\n <TSDoc heading={props.doc}>\n {Array.isArray(rest.parameters) && (\n <TSDocParams parameters={rest.parameters} />\n )}\n </TSDoc>\n </Show>\n <ClassMember {...rest}>\n {props.async && \"async \"}\n <PropertyName />\n <LexicalScope>\n <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </LexicalScope>\n </ClassMember>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0SA;EAAA;cAAA;AAAA,WAAA,MAAA;;GAAA,OAAA;GAAA,OAAA;GAAA,yBAAA;GAAA,CAAA;;CAAA,MAAA,MAAA,yBAAA,MAAA,MAAA"}
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core17 from "@alloy-js/core";
1
+ import * as _alloy_js_core16 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core17.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core16.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core15 from "@alloy-js/core";
1
+ import * as _alloy_js_core16 from "@alloy-js/core";
2
2
  import { VarDeclarationProps } from "@alloy-js/typescript";
3
3
 
4
4
  //#region src/typescript/components/dynamic-import-statement.d.ts
@@ -26,7 +26,7 @@ interface DynamicImportStatementProps extends Omit<VarDeclarationProps, "initial
26
26
  * @param props - The properties for the dynamic import statement.
27
27
  * @returns A `VarDeclaration` component representing the dynamic import statement.
28
28
  */
29
- declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core15.Children;
29
+ declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core16.Children;
30
30
  declare type __ΩDynamicImportStatementProps = any[];
31
31
  //#endregion
32
32
  export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
@@ -1,5 +1,5 @@
1
1
  import { TypescriptFileProps } from "./typescript-file.mjs";
2
- import * as _alloy_js_core10 from "@alloy-js/core";
2
+ import * as _alloy_js_core17 from "@alloy-js/core";
3
3
  import { ResolvedEntryTypeDefinition } from "powerlines/types/resolved";
4
4
 
5
5
  //#region src/typescript/components/entry-file.d.ts
@@ -21,7 +21,7 @@ type EntryFileProps = TypescriptFileProps & {
21
21
  * @param props - The properties for the source file.
22
22
  * @returns The rendered source file component.
23
23
  */
24
- declare function EntryFile(props: EntryFileProps): _alloy_js_core10.Children;
24
+ declare function EntryFile(props: EntryFileProps): _alloy_js_core17.Children;
25
25
  declare type __ΩEntryFileProps = any[];
26
26
  //#endregion
27
27
  export { EntryFile, EntryFileProps, __ΩEntryFileProps };
@@ -1,23 +1,32 @@
1
1
  const require_typescript_components_tsdoc = require('./tsdoc.cjs');
2
2
  const require_typescript_components_typescript_file = require('./typescript-file.cjs');
3
3
  const require_typescript_components_builtin_file = require('./builtin-file.cjs');
4
+ const require_typescript_components_property_name = require('./property-name.cjs');
4
5
  const require_typescript_components_type_parameters = require('./type-parameters.cjs');
5
- const require_typescript_components_typescript_property_name = require('./typescript-property-name.cjs');
6
6
  const require_typescript_components_class_declaration = require('./class-declaration.cjs');
7
7
  const require_typescript_components_dynamic_import_statement = require('./dynamic-import-statement.cjs');
8
8
  const require_typescript_components_entry_file = require('./entry-file.cjs');
9
- const require_typescript_components_record_expression = require('./record-expression.cjs');
10
9
  const require_typescript_components_tsdoc_reflection = require('./tsdoc-reflection.cjs');
11
- const require_typescript_components_typescript_interface = require('./typescript-interface.cjs');
12
- const require_typescript_components_typescript_object = require('./typescript-object.cjs');
10
+ const require_typescript_components_interface_declaration = require('./interface-declaration.cjs');
11
+ const require_typescript_components_object_declaration = require('./object-declaration.cjs');
12
+ const require_typescript_components_record_expression = require('./record-expression.cjs');
13
13
 
14
14
  exports.BuiltinFile = require_typescript_components_builtin_file.BuiltinFile;
15
15
  exports.ClassDeclaration = require_typescript_components_class_declaration.ClassDeclaration;
16
16
  exports.ClassField = require_typescript_components_class_declaration.ClassField;
17
17
  exports.ClassMember = require_typescript_components_class_declaration.ClassMember;
18
18
  exports.ClassMethod = require_typescript_components_class_declaration.ClassMethod;
19
+ exports.ClassPropertyGet = require_typescript_components_class_declaration.ClassPropertyGet;
20
+ exports.ClassPropertySet = require_typescript_components_class_declaration.ClassPropertySet;
19
21
  exports.DynamicImportStatement = require_typescript_components_dynamic_import_statement.DynamicImportStatement;
20
22
  exports.EntryFile = require_typescript_components_entry_file.EntryFile;
23
+ exports.InterfaceDeclaration = require_typescript_components_interface_declaration.InterfaceDeclaration;
24
+ exports.InterfaceDeclarationProperty = require_typescript_components_interface_declaration.InterfaceDeclarationProperty;
25
+ exports.InterfaceExpression = require_typescript_components_interface_declaration.InterfaceExpression;
26
+ exports.InterfaceMember = require_typescript_components_interface_declaration.InterfaceMember;
27
+ exports.ObjectDeclaration = require_typescript_components_object_declaration.ObjectDeclaration;
28
+ exports.ObjectDeclarationProperty = require_typescript_components_object_declaration.ObjectDeclarationProperty;
29
+ exports.PropertyName = require_typescript_components_property_name.PropertyName;
21
30
  exports.RecordExpression = require_typescript_components_record_expression.RecordExpression;
22
31
  exports.TSDoc = require_typescript_components_tsdoc.TSDoc;
23
32
  exports.TSDocAlias = require_typescript_components_tsdoc.TSDocAlias;
@@ -43,11 +52,6 @@ exports.TSDocTag = require_typescript_components_tsdoc.TSDocTag;
43
52
  exports.TSDocThrows = require_typescript_components_tsdoc.TSDocThrows;
44
53
  exports.TSDocTitle = require_typescript_components_tsdoc.TSDocTitle;
45
54
  exports.TypeParameters = require_typescript_components_type_parameters.TypeParameters;
46
- exports.TypeScriptInterface = require_typescript_components_typescript_interface.TypeScriptInterface;
47
55
  exports.TypescriptFile = require_typescript_components_typescript_file.TypescriptFile;
48
56
  exports.TypescriptFileHeader = require_typescript_components_typescript_file.TypescriptFileHeader;
49
- exports.TypescriptFileHeaderImports = require_typescript_components_typescript_file.TypescriptFileHeaderImports;
50
- exports.TypescriptInterfaceProperty = require_typescript_components_typescript_interface.TypescriptInterfaceProperty;
51
- exports.TypescriptObject = require_typescript_components_typescript_object.TypescriptObject;
52
- exports.TypescriptObjectProperty = require_typescript_components_typescript_object.TypescriptObjectProperty;
53
- exports.TypescriptPropertyName = require_typescript_components_typescript_property_name.TypescriptPropertyName;
57
+ exports.TypescriptFileHeaderImports = require_typescript_components_typescript_file.TypescriptFileHeaderImports;
@@ -2,12 +2,12 @@ import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDoc
2
2
  import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./typescript-file.cjs";
3
3
  import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./builtin-file.cjs";
4
4
  import { TypeParameters, TypeParametersProps, __ΩTypeParametersProps } from "./type-parameters.cjs";
5
- import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps } from "./class-declaration.cjs";
5
+ import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps } from "./class-declaration.cjs";
6
6
  import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./dynamic-import-statement.cjs";
7
7
  import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./entry-file.cjs";
8
+ import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps } from "./interface-declaration.cjs";
9
+ import { ComputedRef, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, __ΩComputedRef, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps } from "./object-declaration.cjs";
10
+ import { PropertyName, PropertyNameProps, __ΩPropertyNameProps } from "./property-name.cjs";
8
11
  import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./record-expression.cjs";
9
12
  import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./tsdoc-reflection.cjs";
10
- import { TypeScriptInterface, TypeScriptInterfaceProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptInterfacePropertyProps } from "./typescript-interface.cjs";
11
- import { ComputedRef, TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, __ΩComputedRef, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps } from "./typescript-object.cjs";
12
- import { TypescriptPropertyName, TypescriptPropertyNameProps, __ΩTypescriptPropertyNameProps } from "./typescript-property-name.cjs";
13
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeParameters, TypeParametersProps, TypeScriptInterface, TypeScriptInterfaceProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, TypescriptPropertyName, TypescriptPropertyNameProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps, __ΩTypeParametersProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps, __ΩTypescriptInterfacePropertyProps, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps, __ΩTypescriptPropertyNameProps };
13
+ export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps, __ΩPropertyNameProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps, __ΩTypeParametersProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
@@ -2,12 +2,12 @@ import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDoc
2
2
  import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps } from "./typescript-file.mjs";
3
3
  import { BuiltinFile, BuiltinFileProps, __ΩBuiltinFileProps } from "./builtin-file.mjs";
4
4
  import { TypeParameters, TypeParametersProps, __ΩTypeParametersProps } from "./type-parameters.mjs";
5
- import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps } from "./class-declaration.mjs";
5
+ import { ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps } from "./class-declaration.mjs";
6
6
  import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./dynamic-import-statement.mjs";
7
7
  import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./entry-file.mjs";
8
+ import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps } from "./interface-declaration.mjs";
9
+ import { ComputedRef, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, __ΩComputedRef, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps } from "./object-declaration.mjs";
10
+ import { PropertyName, PropertyNameProps, __ΩPropertyNameProps } from "./property-name.mjs";
8
11
  import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./record-expression.mjs";
9
12
  import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./tsdoc-reflection.mjs";
10
- import { TypeScriptInterface, TypeScriptInterfaceProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptInterfacePropertyProps } from "./typescript-interface.mjs";
11
- import { ComputedRef, TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, __ΩComputedRef, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps } from "./typescript-object.mjs";
12
- import { TypescriptPropertyName, TypescriptPropertyNameProps, __ΩTypescriptPropertyNameProps } from "./typescript-property-name.mjs";
13
- export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeParameters, TypeParametersProps, TypeScriptInterface, TypeScriptInterfaceProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, TypescriptPropertyName, TypescriptPropertyNameProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps, __ΩTypeParametersProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps, __ΩTypescriptInterfacePropertyProps, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps, __ΩTypescriptPropertyNameProps };
13
+ export { BuiltinFile, BuiltinFileProps, ClassDeclaration, ClassDeclarationProps, ClassField, ClassFieldProps, ClassMember, ClassMemberProps, ClassMethod, ClassMethodProps, ClassPropertyGet, ClassPropertyProps, ClassPropertySet, ComputedRef, DynamicImportStatement, DynamicImportStatementProps, EntryFile, EntryFileProps, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, ObjectDeclaration, ObjectDeclarationProperty, ObjectDeclarationPropertyProps, ObjectDeclarationProps, PropertyName, PropertyNameProps, RecordExpression, RecordExpressionProps, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, TypeParameters, TypeParametersProps, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptFileHeaderImportsProps, TypescriptFileHeaderProps, TypescriptFileProps, __ΩBuiltinFileProps, __ΩClassDeclarationProps, __ΩClassFieldProps, __ΩClassMemberProps, __ΩClassMethodProps, __ΩClassPropertyProps, __ΩComputedRef, __ΩDynamicImportStatementProps, __ΩEntryFileProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps, __ΩObjectDeclarationPropertyProps, __ΩObjectDeclarationProps, __ΩPropertyNameProps, __ΩRecordExpressionProps, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps, __ΩTypeParametersProps, __ΩTypescriptFileHeaderImportsProps, __ΩTypescriptFileHeaderProps, __ΩTypescriptFileProps };
@@ -1,14 +1,14 @@
1
1
  import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle } from "./tsdoc.mjs";
2
2
  import { TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports } from "./typescript-file.mjs";
3
3
  import { BuiltinFile } from "./builtin-file.mjs";
4
+ import { PropertyName } from "./property-name.mjs";
4
5
  import { TypeParameters } from "./type-parameters.mjs";
5
- import { TypescriptPropertyName } from "./typescript-property-name.mjs";
6
- import { ClassDeclaration, ClassField, ClassMember, ClassMethod } from "./class-declaration.mjs";
6
+ import { ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet } from "./class-declaration.mjs";
7
7
  import { DynamicImportStatement } from "./dynamic-import-statement.mjs";
8
8
  import { EntryFile } from "./entry-file.mjs";
9
- import { RecordExpression } from "./record-expression.mjs";
10
9
  import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./tsdoc-reflection.mjs";
11
- import { TypeScriptInterface, TypescriptInterfaceProperty } from "./typescript-interface.mjs";
12
- import { TypescriptObject, TypescriptObjectProperty } from "./typescript-object.mjs";
10
+ import { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceExpression, InterfaceMember } from "./interface-declaration.mjs";
11
+ import { ObjectDeclaration, ObjectDeclarationProperty } from "./object-declaration.mjs";
12
+ import { RecordExpression } from "./record-expression.mjs";
13
13
 
14
- export { BuiltinFile, ClassDeclaration, ClassField, ClassMember, ClassMethod, DynamicImportStatement, EntryFile, RecordExpression, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle, TypeParameters, TypeScriptInterface, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptInterfaceProperty, TypescriptObject, TypescriptObjectProperty, TypescriptPropertyName };
14
+ export { BuiltinFile, ClassDeclaration, ClassField, ClassMember, ClassMethod, ClassPropertyGet, ClassPropertySet, DynamicImportStatement, EntryFile, InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceExpression, InterfaceMember, ObjectDeclaration, ObjectDeclarationProperty, PropertyName, RecordExpression, TSDoc, TSDocAlias, TSDocAttributesTags, TSDocDefaultValue, TSDocDomain, TSDocExample, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocParam, TSDocParams, TSDocPermission, TSDocReadonly, TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty, TSDocRemarks, TSDocReturns, TSDocTag, TSDocThrows, TSDocTitle, TypeParameters, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports };
@@ -0,0 +1,225 @@
1
+ const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
+ const require_core_contexts_reflection = require('../../core/contexts/reflection.cjs');
3
+ const require_typescript_components_tsdoc = require('./tsdoc.cjs');
4
+ const require_typescript_contexts_member_scope = require('../contexts/member-scope.cjs');
5
+ const require_typescript_components_property_name = require('./property-name.cjs');
6
+ const require_typescript_components_type_parameters = require('./type-parameters.cjs');
7
+ const require_typescript_components_tsdoc_reflection = require('./tsdoc-reflection.cjs');
8
+ let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
9
+ let __alloy_js_core = require("@alloy-js/core");
10
+ let __powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
11
+ let __stryke_string_format_pascal_case = require("@stryke/string-format/pascal-case");
12
+ let __stryke_type_checks_is_string = require("@stryke/type-checks/is-string");
13
+ let __alloy_js_typescript = require("@alloy-js/typescript");
14
+
15
+ //#region src/typescript/components/interface-declaration.tsx
16
+ const InterfaceExpression = (0, __alloy_js_typescript.ensureTypeRefContext)(function InterfaceExpression$1(props) {
17
+ const symbol = (0, __alloy_js_core.createSymbol)(__alloy_js_typescript.TSOutputSymbol, "", void 0, {
18
+ transient: true,
19
+ binder: (0, __alloy_js_typescript.useTSLexicalScope)()?.binder
20
+ });
21
+ (0, __alloy_js_core.emitSymbol)(symbol);
22
+ return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("group", { get children() {
23
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_contexts_member_scope.MemberScope, {
24
+ ownerSymbol: symbol,
25
+ get children() {
26
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Block, { get children() {
27
+ return props.children;
28
+ } });
29
+ }
30
+ });
31
+ } });
32
+ });
33
+ /**
34
+ * Create a TypeScript interface member.
35
+ *
36
+ * An interface member can either provide a `name` prop to create a named
37
+ * property, or an `indexer` prop to define an indexer for the interface.
38
+ *
39
+ * The type of the member can be provided either as the `type` prop or as the
40
+ * children of the component.
41
+ */
42
+ function InterfaceMember(props) {
43
+ const type = props.type ?? props.children;
44
+ const readonly = props.readonly ? "readonly " : "";
45
+ if ("indexer" in props) return [
46
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
47
+ get when() {
48
+ return Boolean(props.doc);
49
+ },
50
+ get children() {
51
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, { get heading() {
52
+ return props.doc;
53
+ } });
54
+ }
55
+ }),
56
+ readonly,
57
+ "[",
58
+ (0, __alloy_js_core_jsx_runtime.memo)(() => props.indexer),
59
+ "]: ",
60
+ type
61
+ ];
62
+ const optionality = props.optional ? "?" : "";
63
+ const scope = (0, __alloy_js_typescript.useTSMemberScope)();
64
+ const sym = (0, __alloy_js_core.createSymbol)(__alloy_js_typescript.TSOutputSymbol, props.name, scope.ownerSymbol.staticMembers, {
65
+ refkeys: props.refkey,
66
+ tsFlags: __alloy_js_typescript.TSSymbolFlags.TypeSymbol | (props.nullish ?? props.optional ? __alloy_js_typescript.TSSymbolFlags.Nullish : __alloy_js_typescript.TSSymbolFlags.None),
67
+ namePolicy: (0, __alloy_js_typescript.useTSNamePolicy)().for("interface-member"),
68
+ binder: scope.binder
69
+ });
70
+ const taken = (0, __alloy_js_core.takeSymbols)();
71
+ (0, __alloy_js_core.effect)(() => {
72
+ if (taken.size > 1) return;
73
+ const symbol = Array.from(taken)[0];
74
+ if (symbol?.isTransient) symbol.moveMembersTo(sym);
75
+ });
76
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.MemberDeclaration, {
77
+ symbol: sym,
78
+ get children() {
79
+ return [
80
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
81
+ get when() {
82
+ return Boolean(props.doc);
83
+ },
84
+ get children() {
85
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, { get heading() {
86
+ return props.doc;
87
+ } });
88
+ }
89
+ }),
90
+ readonly,
91
+ (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_property_name.PropertyName, {}),
92
+ optionality,
93
+ ": ",
94
+ type
95
+ ];
96
+ }
97
+ });
98
+ }
99
+ const BaseInterfaceDeclaration = (0, __alloy_js_typescript.ensureTypeRefContext)(function InterfaceDeclaration$1(props) {
100
+ const ExprSlot = (0, __alloy_js_core.createSymbolSlot)();
101
+ const children = (0, __alloy_js_core.childrenArray)(() => props.children);
102
+ const extendsPart = props.extends ? [" extends ", (0, __alloy_js_core_jsx_runtime.memo)(() => props.extends)] : "";
103
+ const filteredChildren = (0, __alloy_js_core.findUnkeyedChildren)(children);
104
+ const currentScope = (0, __alloy_js_typescript.useTSLexicalScope)();
105
+ const binder = currentScope?.binder;
106
+ const sym = (0, __alloy_js_core.createSymbol)(__alloy_js_typescript.TSOutputSymbol, props.name, currentScope.types, {
107
+ refkeys: props.refkey,
108
+ default: props.default,
109
+ export: props.export,
110
+ metadata: props.metadata,
111
+ tsFlags: __alloy_js_typescript.TSSymbolFlags.TypeSymbol,
112
+ namePolicy: (0, __alloy_js_typescript.useTSNamePolicy)().for("interface"),
113
+ binder
114
+ });
115
+ (0, __alloy_js_core.effect)(() => {
116
+ if (ExprSlot.ref.value) {
117
+ const takenSymbols = ExprSlot.ref.value;
118
+ for (const symbol of takenSymbols) if (symbol.isTransient) symbol.moveMembersTo(sym);
119
+ }
120
+ });
121
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
122
+ get when() {
123
+ return Boolean(props.doc);
124
+ },
125
+ get children() {
126
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, { get heading() {
127
+ return props.doc;
128
+ } });
129
+ }
130
+ }), (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.Declaration, (0, __alloy_js_core_jsx_runtime.mergeProps)(props, {
131
+ nameKind: "interface",
132
+ kind: "type",
133
+ symbol: sym,
134
+ get children() {
135
+ return [
136
+ "interface ",
137
+ (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Name, {}),
138
+ (0, __alloy_js_core_jsx_runtime.memo)(() => (0, __alloy_js_core_jsx_runtime.memo)(() => !!props.typeParameters)() && (0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_type_parameters.TypeParameters, { get parameters() {
139
+ return props.typeParameters;
140
+ } })),
141
+ extendsPart,
142
+ " ",
143
+ (0, __alloy_js_core_jsx_runtime.createComponent)(ExprSlot, { get children() {
144
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(InterfaceExpression, { children: filteredChildren });
145
+ } })
146
+ ];
147
+ }
148
+ }))];
149
+ });
150
+ /**
151
+ * Generates a TypeScript interface for the given reflection class.
152
+ */
153
+ function InterfaceDeclaration(props) {
154
+ const [{ name, reflection, doc }, rest] = (0, __alloy_js_core.splitProps)(props, [
155
+ "name",
156
+ "reflection",
157
+ "doc"
158
+ ]);
159
+ const interfaceName = (0, __alloy_js_core.computed)(() => (0, __stryke_string_format_pascal_case.pascalCase)(((0, __stryke_type_checks_is_string.isString)(name) ? name : name.toString()) || reflection?.getName()));
160
+ const properties = (0, __alloy_js_core.computed)(() => reflection ? reflection.getProperties().filter((item) => !item.isIgnored()).sort((a, b) => a.isReadonly() && b.isReadonly() || !a.isReadonly() && !b.isReadonly() ? a.getNameAsString().localeCompare(b.getNameAsString()) : a.isReadonly() ? 1 : -1) : []);
161
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
162
+ get when() {
163
+ return properties.value.length > 0;
164
+ },
165
+ get fallback() {
166
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(BaseInterfaceDeclaration, (0, __alloy_js_core_jsx_runtime.mergeProps)(props, { get name() {
167
+ return interfaceName.value;
168
+ } }));
169
+ },
170
+ get children() {
171
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_reflection.ReflectionClassContext.Provider, {
172
+ value: { reflection },
173
+ get children() {
174
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc_reflection.TSDocReflectionClass, { heading: doc }), (0, __alloy_js_core_jsx_runtime.createComponent)(BaseInterfaceDeclaration, (0, __alloy_js_core_jsx_runtime.mergeProps)({
175
+ "export": true,
176
+ get name() {
177
+ return interfaceName.value;
178
+ }
179
+ }, rest, { get children() {
180
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
181
+ each: properties,
182
+ doubleHardline: true,
183
+ semicolon: true,
184
+ children: (prop) => (0, __alloy_js_core_jsx_runtime.createComponent)(InterfaceDeclarationProperty, { property: prop })
185
+ });
186
+ } }))];
187
+ }
188
+ });
189
+ }
190
+ });
191
+ }
192
+ /**
193
+ * Generates a TypeScript interface property for the given reflection class.
194
+ */
195
+ function InterfaceDeclarationProperty(props) {
196
+ const [{ property }, rest] = (0, __alloy_js_core.splitProps)(props, ["property"]);
197
+ return (0, __alloy_js_core_jsx_runtime.createComponent)(require_core_contexts_reflection.ReflectionPropertyContext.Provider, {
198
+ value: property,
199
+ get children() {
200
+ return [(0, __alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc_reflection.TSDocReflectionProperty, {}), (0, __alloy_js_core_jsx_runtime.createComponent)(InterfaceMember, (0, __alloy_js_core_jsx_runtime.mergeProps)({
201
+ get name() {
202
+ return property.getNameAsString();
203
+ },
204
+ get readonly() {
205
+ return property.isReadonly();
206
+ },
207
+ get optional() {
208
+ return property.isOptional();
209
+ },
210
+ get nullish() {
211
+ return property.isNullable();
212
+ },
213
+ get type() {
214
+ return (0, __powerlines_deepkit_vendor_type.stringifyType)(property.getType());
215
+ }
216
+ }, rest))];
217
+ }
218
+ });
219
+ }
220
+
221
+ //#endregion
222
+ exports.InterfaceDeclaration = InterfaceDeclaration;
223
+ exports.InterfaceDeclarationProperty = InterfaceDeclarationProperty;
224
+ exports.InterfaceExpression = InterfaceExpression;
225
+ exports.InterfaceMember = InterfaceMember;
@@ -0,0 +1,82 @@
1
+ import { ComponentProps } from "../../types/components.cjs";
2
+ import * as _alloy_js_core15 from "@alloy-js/core";
3
+ import { Children, Namekey, Refkey } from "@alloy-js/core";
4
+ import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
5
+ import { CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
6
+
7
+ //#region src/typescript/components/interface-declaration.d.ts
8
+ interface InterfaceDeclarationProps<T extends Record<string, any> = Record<string, any>> extends CommonDeclarationProps, ComponentProps {
9
+ /**
10
+ * A base type that this interface extends. This can be used to represent inheritance
11
+ */
12
+ extends?: Children;
13
+ /**
14
+ * The generic type parameters of the interface.
15
+ */
16
+ typeParameters?: TypeParameterDescriptor[] | string[];
17
+ /**
18
+ * The reflection class that describes the properties of this interface.
19
+ *
20
+ * @remarks
21
+ * This is used to generate the members of the interface based on the properties of the reflection class.
22
+ */
23
+ reflection?: ReflectionClass<T>;
24
+ /**
25
+ * A default value for this interface.
26
+ *
27
+ * @remarks
28
+ * This is used when the interface is used as a type for a variable declaration, to provide an initial value for the variable.
29
+ */
30
+ defaultValue?: Partial<T>;
31
+ }
32
+ interface InterfaceDeclarationPropertyProps extends Omit<InterfaceMemberProps, "name">, ComponentProps {
33
+ property: ReflectionProperty;
34
+ }
35
+ interface InterfaceExpressionProps {
36
+ children?: Children;
37
+ }
38
+ declare const InterfaceExpression: _alloy_js_core15.Component<InterfaceExpressionProps>;
39
+ interface InterfaceMemberPropsBase {
40
+ type?: Children;
41
+ children?: Children;
42
+ readonly?: boolean;
43
+ doc?: Children;
44
+ refkey?: Refkey | Refkey[];
45
+ }
46
+ interface InterfacePropertyMemberProps extends InterfaceMemberPropsBase {
47
+ name: string | Namekey;
48
+ optional?: boolean;
49
+ nullish?: boolean;
50
+ }
51
+ interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {
52
+ indexer: Children;
53
+ }
54
+ type InterfaceMemberProps = InterfacePropertyMemberProps | InterfaceIndexerMemberProps;
55
+ /**
56
+ * Create a TypeScript interface member.
57
+ *
58
+ * An interface member can either provide a `name` prop to create a named
59
+ * property, or an `indexer` prop to define an indexer for the interface.
60
+ *
61
+ * The type of the member can be provided either as the `type` prop or as the
62
+ * children of the component.
63
+ */
64
+ declare function InterfaceMember(props: InterfaceMemberProps): Children;
65
+ /**
66
+ * Generates a TypeScript interface for the given reflection class.
67
+ */
68
+ declare function InterfaceDeclaration<T extends Record<string, any> = Record<string, any>>(props: InterfaceDeclarationProps<T>): Children;
69
+ /**
70
+ * Generates a TypeScript interface property for the given reflection class.
71
+ */
72
+ declare function InterfaceDeclarationProperty(props: InterfaceDeclarationPropertyProps): Children;
73
+ declare type __ΩInterfaceDeclarationProps = any[];
74
+ declare type __ΩInterfaceDeclarationPropertyProps = any[];
75
+ declare type __ΩInterfaceExpressionProps = any[];
76
+ declare type __ΩInterfaceMemberPropsBase = any[];
77
+ declare type __ΩInterfacePropertyMemberProps = any[];
78
+ declare type __ΩInterfaceIndexerMemberProps = any[];
79
+ declare type __ΩInterfaceMemberProps = any[];
80
+ //#endregion
81
+ export { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps };
82
+ //# sourceMappingURL=interface-declaration.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface-declaration.d.cts","names":[],"sources":["../../../src/typescript/components/interface-declaration.tsx"],"sourcesContent":[],"mappings":";;;;;;;UAqEiB,oCACL,sBAAsB,6BAExB,wBAAwB;;;AAHlC;EACY,OAAA,CAAA,EAMA,QANA;EAAsB;;;EAmBH,cAAA,CAAA,EARZ,uBAQY,EAAA,GAAA,MAAA,EAAA;EAAhB;;;;;;EAWE,UAAA,CAAA,EAXF,eAWE,CAXc,CAWd,CAAA;EACF;;;;;AAIf;EAIa,YAAA,CAAA,EAZI,OA8BhB,CA9BwB,CA8BxB,CAAA;AAED;AACS,UA9BQ,iCAAA,SACP,IA6BD,CA7BM,oBA6BN,EAAA,MAAA,CAAA,EA7BqC,cA6BrC,CAAA;EACI,QAAA,EA7BD,kBA6BC;;AAGF,UA7BM,wBAAA,CA6BN;EAAS,QAAA,CAAA,EA5BP,QA4BO;;AAEH,cA3BJ,mBA2BiC,EA3Bd,gBAAA,CAAA,SA2BsB,CA3BtB,wBA2B8C,CAAA;AAM7D,UAbA,wBAAA,CAa4B;EAIjC,IAAA,CAAA,EAhBH,QAgBG;EAaI,QAAA,CAAA,EA5BH,QA4BkB;EA+Gf,QAAA,CAAA,EAAA,OAAA;EACJ,GAAA,CAAA,EA1IJ,QA0II;EAAsB,MAAA,CAAA,EAzIvB,MAyIuB,GAzId,MAyIc,EAAA;;AACzB,UAxIQ,4BAAA,SAAqC,wBAwI7C,CAAA;EAA4B,IAAA,EAAA,MAAA,GAvIpB,OAuIoB;EAAA,QAAA,CAAA,EAAA,OAAA;EAwDrB,OAAA,CAAA,EAAA,OAAA;;UA1LC,2BAAA,SAAoC;WAC1C;;KAGC,oBAAA,GACR,+BACA;;;;;;;;;;iBAWY,eAAA,QAAuB,uBAAoB;;;;iBA+G3C,+BACJ,sBAAsB,4BACzB,0BAA0B,KAAE;;;;iBAwDrB,4BAAA,QACP,oCAAiC"}
@@ -0,0 +1,82 @@
1
+ import { ComponentProps } from "../../types/components.mjs";
2
+ import * as _alloy_js_core15 from "@alloy-js/core";
3
+ import { Children, Namekey, Refkey } from "@alloy-js/core";
4
+ import { ReflectionClass, ReflectionProperty } from "@powerlines/deepkit/vendor/type";
5
+ import { CommonDeclarationProps, TypeParameterDescriptor } from "@alloy-js/typescript";
6
+
7
+ //#region src/typescript/components/interface-declaration.d.ts
8
+ interface InterfaceDeclarationProps<T extends Record<string, any> = Record<string, any>> extends CommonDeclarationProps, ComponentProps {
9
+ /**
10
+ * A base type that this interface extends. This can be used to represent inheritance
11
+ */
12
+ extends?: Children;
13
+ /**
14
+ * The generic type parameters of the interface.
15
+ */
16
+ typeParameters?: TypeParameterDescriptor[] | string[];
17
+ /**
18
+ * The reflection class that describes the properties of this interface.
19
+ *
20
+ * @remarks
21
+ * This is used to generate the members of the interface based on the properties of the reflection class.
22
+ */
23
+ reflection?: ReflectionClass<T>;
24
+ /**
25
+ * A default value for this interface.
26
+ *
27
+ * @remarks
28
+ * This is used when the interface is used as a type for a variable declaration, to provide an initial value for the variable.
29
+ */
30
+ defaultValue?: Partial<T>;
31
+ }
32
+ interface InterfaceDeclarationPropertyProps extends Omit<InterfaceMemberProps, "name">, ComponentProps {
33
+ property: ReflectionProperty;
34
+ }
35
+ interface InterfaceExpressionProps {
36
+ children?: Children;
37
+ }
38
+ declare const InterfaceExpression: _alloy_js_core15.Component<InterfaceExpressionProps>;
39
+ interface InterfaceMemberPropsBase {
40
+ type?: Children;
41
+ children?: Children;
42
+ readonly?: boolean;
43
+ doc?: Children;
44
+ refkey?: Refkey | Refkey[];
45
+ }
46
+ interface InterfacePropertyMemberProps extends InterfaceMemberPropsBase {
47
+ name: string | Namekey;
48
+ optional?: boolean;
49
+ nullish?: boolean;
50
+ }
51
+ interface InterfaceIndexerMemberProps extends InterfaceMemberPropsBase {
52
+ indexer: Children;
53
+ }
54
+ type InterfaceMemberProps = InterfacePropertyMemberProps | InterfaceIndexerMemberProps;
55
+ /**
56
+ * Create a TypeScript interface member.
57
+ *
58
+ * An interface member can either provide a `name` prop to create a named
59
+ * property, or an `indexer` prop to define an indexer for the interface.
60
+ *
61
+ * The type of the member can be provided either as the `type` prop or as the
62
+ * children of the component.
63
+ */
64
+ declare function InterfaceMember(props: InterfaceMemberProps): Children;
65
+ /**
66
+ * Generates a TypeScript interface for the given reflection class.
67
+ */
68
+ declare function InterfaceDeclaration<T extends Record<string, any> = Record<string, any>>(props: InterfaceDeclarationProps<T>): Children;
69
+ /**
70
+ * Generates a TypeScript interface property for the given reflection class.
71
+ */
72
+ declare function InterfaceDeclarationProperty(props: InterfaceDeclarationPropertyProps): Children;
73
+ declare type __ΩInterfaceDeclarationProps = any[];
74
+ declare type __ΩInterfaceDeclarationPropertyProps = any[];
75
+ declare type __ΩInterfaceExpressionProps = any[];
76
+ declare type __ΩInterfaceMemberPropsBase = any[];
77
+ declare type __ΩInterfacePropertyMemberProps = any[];
78
+ declare type __ΩInterfaceIndexerMemberProps = any[];
79
+ declare type __ΩInterfaceMemberProps = any[];
80
+ //#endregion
81
+ export { InterfaceDeclaration, InterfaceDeclarationProperty, InterfaceDeclarationPropertyProps, InterfaceDeclarationProps, InterfaceExpression, InterfaceExpressionProps, InterfaceIndexerMemberProps, InterfaceMember, InterfaceMemberProps, InterfaceMemberPropsBase, InterfacePropertyMemberProps, __ΩInterfaceDeclarationPropertyProps, __ΩInterfaceDeclarationProps, __ΩInterfaceExpressionProps, __ΩInterfaceIndexerMemberProps, __ΩInterfaceMemberProps, __ΩInterfaceMemberPropsBase, __ΩInterfacePropertyMemberProps };
82
+ //# sourceMappingURL=interface-declaration.d.mts.map