@powerlines/plugin-alloy 0.20.15 → 0.21.1
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.
- package/dist/core/components/output.d.cts +2 -2
- package/dist/core/components/output.d.cts.map +1 -1
- package/dist/core/components/single-line-comment.d.cts +2 -2
- package/dist/core/components/source-file.d.cts +2 -2
- package/dist/core/components/source-file.d.cts.map +1 -1
- package/dist/core/contexts/reflection.d.cts.map +1 -1
- package/dist/markdown/components/front-matter.d.cts +2 -2
- package/dist/markdown/components/front-matter.d.mts +2 -2
- package/dist/markdown/components/markdown-file.d.cts +3 -3
- package/dist/markdown/components/markdown-file.d.cts.map +1 -1
- package/dist/markdown/components/markdown-table.d.cts +4 -4
- package/dist/markdown/components/markdown-table.d.cts.map +1 -1
- package/dist/typescript/components/builtin-file.d.mts +2 -2
- package/dist/typescript/components/class-declaration.cjs +196 -0
- package/dist/typescript/components/class-declaration.d.cts +89 -0
- package/dist/typescript/components/class-declaration.d.cts.map +1 -0
- package/dist/typescript/components/class-declaration.d.mts +89 -0
- package/dist/typescript/components/class-declaration.d.mts.map +1 -0
- package/dist/typescript/components/class-declaration.mjs +193 -0
- package/dist/typescript/components/class-declaration.mjs.map +1 -0
- package/dist/typescript/components/dynamic-import-statement.d.cts +2 -2
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +1 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +2 -2
- package/dist/typescript/components/entry-file.d.cts +2 -2
- package/dist/typescript/components/entry-file.d.cts.map +1 -1
- package/dist/typescript/components/entry-file.d.mts +2 -2
- package/dist/typescript/components/index.cjs +10 -1
- package/dist/typescript/components/index.d.cts +4 -1
- package/dist/typescript/components/index.d.mts +4 -1
- package/dist/typescript/components/index.mjs +4 -1
- package/dist/typescript/components/tsdoc-reflection.d.cts +4 -4
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +1 -1
- package/dist/typescript/components/tsdoc-reflection.d.mts +4 -4
- package/dist/typescript/components/type-parameters.cjs +107 -0
- package/dist/typescript/components/type-parameters.d.cts +25 -0
- package/dist/typescript/components/type-parameters.d.cts.map +1 -0
- package/dist/typescript/components/type-parameters.d.mts +25 -0
- package/dist/typescript/components/type-parameters.d.mts.map +1 -0
- package/dist/typescript/components/type-parameters.mjs +107 -0
- package/dist/typescript/components/type-parameters.mjs.map +1 -0
- package/dist/typescript/components/typescript-file.cjs +2 -2
- package/dist/typescript/components/typescript-file.mjs +2 -2
- package/dist/typescript/components/typescript-file.mjs.map +1 -1
- package/dist/typescript/components/typescript-interface.d.cts +3 -3
- package/dist/typescript/components/typescript-interface.d.cts.map +1 -1
- package/dist/typescript/components/typescript-interface.d.mts +3 -3
- package/dist/typescript/components/typescript-interface.d.mts.map +1 -1
- package/dist/typescript/components/typescript-object.d.cts +3 -3
- package/dist/typescript/components/typescript-object.d.cts.map +1 -1
- package/dist/typescript/components/typescript-object.d.mts +3 -3
- package/dist/typescript/components/typescript-object.d.mts.map +1 -1
- package/dist/typescript/components/typescript-property-name.cjs +31 -0
- package/dist/typescript/components/typescript-property-name.d.cts +24 -0
- package/dist/typescript/components/typescript-property-name.d.cts.map +1 -0
- package/dist/typescript/components/typescript-property-name.d.mts +24 -0
- package/dist/typescript/components/typescript-property-name.d.mts.map +1 -0
- package/dist/typescript/components/typescript-property-name.mjs +31 -0
- package/dist/typescript/components/typescript-property-name.mjs.map +1 -0
- package/dist/typescript/contexts/index.cjs +3 -0
- package/dist/typescript/contexts/index.d.cts +2 -0
- package/dist/typescript/contexts/index.d.mts +2 -0
- package/dist/typescript/contexts/index.mjs +3 -0
- package/dist/typescript/contexts/lexical-scope.cjs +25 -0
- package/dist/typescript/contexts/lexical-scope.d.cts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.cts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.d.mts +17 -0
- package/dist/typescript/contexts/lexical-scope.d.mts.map +1 -0
- package/dist/typescript/contexts/lexical-scope.mjs +25 -0
- package/dist/typescript/contexts/lexical-scope.mjs.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.cjs +25 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts +15 -0
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts +15 -0
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +1 -0
- package/dist/typescript/helpers/get-call-signature-props.mjs +25 -0
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +1 -0
- package/dist/typescript/helpers/index.cjs +5 -0
- package/dist/typescript/helpers/index.d.cts +3 -0
- package/dist/typescript/helpers/index.d.mts +3 -0
- package/dist/typescript/helpers/index.mjs +4 -0
- package/dist/typescript/helpers/utilities.cjs +14 -0
- package/dist/typescript/helpers/utilities.d.cts +11 -0
- package/dist/typescript/helpers/utilities.d.cts.map +1 -0
- package/dist/typescript/helpers/utilities.d.mts +11 -0
- package/dist/typescript/helpers/utilities.d.mts.map +1 -0
- package/dist/typescript/helpers/utilities.mjs +14 -0
- package/dist/typescript/helpers/utilities.mjs.map +1 -0
- package/dist/typescript/index.cjs +18 -1
- package/dist/typescript/index.d.cts +9 -1
- package/dist/typescript/index.d.mts +9 -1
- package/dist/typescript/index.mjs +9 -1
- package/package.json +128 -16
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { TSDoc, TSDocParams } from "./tsdoc.mjs";
|
|
2
|
+
import { getCallSignatureProps } from "../helpers/get-call-signature-props.mjs";
|
|
3
|
+
import { TypeParameters } from "./type-parameters.mjs";
|
|
4
|
+
import { TypescriptPropertyName } from "./typescript-property-name.mjs";
|
|
5
|
+
import { createComponent, createIntrinsic, memo, mergeProps } from "@alloy-js/core/jsx-runtime";
|
|
6
|
+
import { Block, For, MemberDeclaration, MemberScope, Name, Prose, Show, code, findKeyedChild, splitProps } from "@alloy-js/core";
|
|
7
|
+
import { toArray } from "@stryke/convert/to-array";
|
|
8
|
+
import { CallSignature, Declaration as Declaration$1, TSSymbolFlags, TypeRefContext, createMemberSymbol, createTypeAndValueSymbol, useTSNamePolicy } from "@alloy-js/typescript";
|
|
9
|
+
|
|
10
|
+
//#region src/typescript/components/class-declaration.tsx
|
|
11
|
+
/**
|
|
12
|
+
* Create a TypeScript class declaration.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const myPetRefkey = refkey();
|
|
17
|
+
* const Animal = refkey();
|
|
18
|
+
* const staticMember = refkey();
|
|
19
|
+
* const instanceMember = refkey();
|
|
20
|
+
*
|
|
21
|
+
* <ClassDeclaration name="Animal" refkey={Animal}>
|
|
22
|
+
* <ClassMember public static name="something" type="string" refkey={staticMember}>
|
|
23
|
+
* "hello"
|
|
24
|
+
* </ClassMember>
|
|
25
|
+
* <ClassMember public name="kind" type="string" />
|
|
26
|
+
* <ClassMember public name="name" type="string" refkey={instanceMember} />
|
|
27
|
+
* <ClassConstructor parameters="name: string">
|
|
28
|
+
* this.name = name;
|
|
29
|
+
* </ClassConstructor>
|
|
30
|
+
* </ClassDeclaration>
|
|
31
|
+
*
|
|
32
|
+
* <VarDeclaration const name="myPet" refkey={myPetRefkey}>
|
|
33
|
+
* new {Animal}();
|
|
34
|
+
* </VarDeclaration>
|
|
35
|
+
*
|
|
36
|
+
* {staticMember}; // Animal.something
|
|
37
|
+
* <MemberReference path={[myPetRefkey, instanceMember]} /> // myPet.name
|
|
38
|
+
* {memberRefkey(myPetRefkey, instanceMember)}
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
function ClassDeclaration(props) {
|
|
42
|
+
const extendsPart = props.extends && [" extends ", memo(() => props.extends)];
|
|
43
|
+
const implementsPart = props.implements && props.implements.length > 0 && [
|
|
44
|
+
" ",
|
|
45
|
+
"implements",
|
|
46
|
+
" ",
|
|
47
|
+
createComponent(For, {
|
|
48
|
+
get each() {
|
|
49
|
+
return props.implements;
|
|
50
|
+
},
|
|
51
|
+
comma: true,
|
|
52
|
+
space: true,
|
|
53
|
+
children: (implement) => implement
|
|
54
|
+
})
|
|
55
|
+
];
|
|
56
|
+
const sym = createTypeAndValueSymbol(props.name, {
|
|
57
|
+
refkeys: props.refkey,
|
|
58
|
+
export: props.export,
|
|
59
|
+
default: props.default,
|
|
60
|
+
metadata: props.metadata,
|
|
61
|
+
hasInstanceMembers: true,
|
|
62
|
+
namePolicy: useTSNamePolicy().for("class")
|
|
63
|
+
});
|
|
64
|
+
const typeParametersChildren = props.children ? findKeyedChild(toArray(props.children), TypeParameters.tag) : void 0;
|
|
65
|
+
const sTypeParameters = typeParametersChildren ? [
|
|
66
|
+
"<",
|
|
67
|
+
typeParametersChildren,
|
|
68
|
+
">"
|
|
69
|
+
] : createComponent(TypeParameters, { get parameters() {
|
|
70
|
+
return props.typeParameters;
|
|
71
|
+
} });
|
|
72
|
+
return [createComponent(Show, {
|
|
73
|
+
get when() {
|
|
74
|
+
return Boolean(props.doc);
|
|
75
|
+
},
|
|
76
|
+
get children() {
|
|
77
|
+
return [createComponent(TSDoc, { get heading() {
|
|
78
|
+
return props.doc;
|
|
79
|
+
} }), createIntrinsic("hbr", {})];
|
|
80
|
+
}
|
|
81
|
+
}), createComponent(Declaration$1, {
|
|
82
|
+
symbol: sym,
|
|
83
|
+
get ["export"]() {
|
|
84
|
+
return props.export;
|
|
85
|
+
},
|
|
86
|
+
get ["default"]() {
|
|
87
|
+
return props.default;
|
|
88
|
+
},
|
|
89
|
+
get children() {
|
|
90
|
+
return createComponent(MemberScope, {
|
|
91
|
+
ownerSymbol: sym,
|
|
92
|
+
get children() {
|
|
93
|
+
return [
|
|
94
|
+
memo(() => props.abstract && code`abstract `),
|
|
95
|
+
" class ",
|
|
96
|
+
createComponent(Name, {}),
|
|
97
|
+
sTypeParameters,
|
|
98
|
+
extendsPart,
|
|
99
|
+
implementsPart,
|
|
100
|
+
" ",
|
|
101
|
+
createComponent(Block, { get children() {
|
|
102
|
+
return props.children;
|
|
103
|
+
} })
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
})];
|
|
109
|
+
}
|
|
110
|
+
ClassDeclaration.TypeParameters = TypeParameters;
|
|
111
|
+
function ClassMember(props) {
|
|
112
|
+
let tsFlags = TSSymbolFlags.None;
|
|
113
|
+
if (props.nullish) tsFlags |= TSSymbolFlags.Nullish;
|
|
114
|
+
const sym = createMemberSymbol(props.name, props, {
|
|
115
|
+
refkeys: props.refkey,
|
|
116
|
+
tsFlags,
|
|
117
|
+
namePolicy: useTSNamePolicy().for("class-member-data")
|
|
118
|
+
});
|
|
119
|
+
return [createComponent(Show, {
|
|
120
|
+
get when() {
|
|
121
|
+
return Boolean(props.doc);
|
|
122
|
+
},
|
|
123
|
+
get children() {
|
|
124
|
+
return [createComponent(TSDoc, { get heading() {
|
|
125
|
+
return props.doc;
|
|
126
|
+
} }), createIntrinsic("hbr", {})];
|
|
127
|
+
}
|
|
128
|
+
}), createComponent(MemberDeclaration, {
|
|
129
|
+
symbol: sym,
|
|
130
|
+
get children() {
|
|
131
|
+
return [
|
|
132
|
+
memo(() => props.public && "public "),
|
|
133
|
+
memo(() => props.private && "private "),
|
|
134
|
+
memo(() => props.protected && "protected "),
|
|
135
|
+
memo(() => props.static && "static "),
|
|
136
|
+
memo(() => props.children)
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
})];
|
|
140
|
+
}
|
|
141
|
+
function ClassField(props) {
|
|
142
|
+
const optionality = props.optional ? "?" : "";
|
|
143
|
+
const typeSection = props.type && [
|
|
144
|
+
optionality,
|
|
145
|
+
": ",
|
|
146
|
+
createComponent(TypeRefContext, { get children() {
|
|
147
|
+
return props.type;
|
|
148
|
+
} })
|
|
149
|
+
];
|
|
150
|
+
const initializerSection = props.children && [" = ", memo(() => props.children)];
|
|
151
|
+
return createComponent(ClassMember, mergeProps(props, {
|
|
152
|
+
nullish: props.nullish ?? props.optional,
|
|
153
|
+
get children() {
|
|
154
|
+
return [
|
|
155
|
+
createComponent(TypescriptPropertyName, {}),
|
|
156
|
+
typeSection,
|
|
157
|
+
initializerSection
|
|
158
|
+
];
|
|
159
|
+
}
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
function ClassMethod(props) {
|
|
163
|
+
const callProps = getCallSignatureProps(props);
|
|
164
|
+
const [_, rest] = splitProps(props, ["doc"]);
|
|
165
|
+
return [createComponent(Show, {
|
|
166
|
+
get when() {
|
|
167
|
+
return Boolean(props.doc);
|
|
168
|
+
},
|
|
169
|
+
get children() {
|
|
170
|
+
return [createComponent(TSDoc, { get children() {
|
|
171
|
+
return [memo(() => memo(() => !!props.doc)() && createComponent(Prose, { get children() {
|
|
172
|
+
return props.doc;
|
|
173
|
+
} })), memo(() => memo(() => !!Array.isArray(rest.parameters))() && createComponent(TSDocParams, { get parameters() {
|
|
174
|
+
return rest.parameters;
|
|
175
|
+
} }))];
|
|
176
|
+
} }), createIntrinsic("hbr", {})];
|
|
177
|
+
}
|
|
178
|
+
}), createComponent(ClassMember, mergeProps(rest, { get children() {
|
|
179
|
+
return [
|
|
180
|
+
memo(() => props.async && "async "),
|
|
181
|
+
createComponent(TypescriptPropertyName, {}),
|
|
182
|
+
createComponent(CallSignature, callProps),
|
|
183
|
+
" ",
|
|
184
|
+
createComponent(Block, { get children() {
|
|
185
|
+
return props.children;
|
|
186
|
+
} })
|
|
187
|
+
];
|
|
188
|
+
} }))];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
//#endregion
|
|
192
|
+
export { ClassDeclaration, ClassField, ClassMember, ClassMethod };
|
|
193
|
+
//# sourceMappingURL=class-declaration.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"class-declaration.mjs","names":["Block","code","findKeyedChild","For","MemberDeclaration","MemberScope","Name","Prose","Show","splitProps","CallSignature","createMemberSymbol","createTypeAndValueSymbol","Declaration","TSSymbolFlags","TypeRefContext","useTSNamePolicy","toArray","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","typeParametersChildren","tag","undefined","sTypeParameters","parameters","typeParameters","when","Boolean","doc","heading","_$createIntrinsic","symbol","ownerSymbol","abstract","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 findKeyedChild,\n For,\n MemberDeclaration,\n MemberScope,\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 { toArray } from \"@stryke/convert/to-array\";\nimport { getCallSignatureProps } from \"../helpers/get-call-signature-props\";\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 const typeParametersChildren = props.children\n ? findKeyedChild(toArray(props.children), TypeParameters.tag)\n : undefined;\n\n const sTypeParameters = typeParametersChildren ? (\n <>\n {\"<\"}\n {typeParametersChildren}\n {\">\"}\n </>\n ) : (\n <TypeParameters parameters={props.typeParameters} />\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 {sTypeParameters}\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 <CallSignature {...callProps} /> <Block>{props.children}</Block>\n </ClassMember>\n </>\n );\n}\n"],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alloy_js_core9 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):
|
|
29
|
+
declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core9.Children;
|
|
30
30
|
declare type __ΩDynamicImportStatementProps = any[];
|
|
31
31
|
//#endregion
|
|
32
32
|
export { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-import-statement.d.cts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,2BAAA,SAAoC,KACnD;;;AADF;EA6BgB,UAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,
|
|
1
|
+
{"version":3,"file":"dynamic-import-statement.d.cts","names":[],"sources":["../../../src/typescript/components/dynamic-import-statement.tsx"],"sourcesContent":[],"mappings":";;;;UAqBiB,2BAAA,SAAoC,KACnD;;;AADF;EA6BgB,UAAA,EAAA,MAAA;;;;;;;;;;;;;;;;;;;;iBAAA,sBAAA,QAA8B,8BAA2B,eAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _alloy_js_core22 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):
|
|
29
|
+
declare function DynamicImportStatement(props: DynamicImportStatementProps): _alloy_js_core22.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.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _alloy_js_core0 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):
|
|
24
|
+
declare function EntryFile(props: EntryFileProps): _alloy_js_core0.Children;
|
|
25
25
|
declare type __ΩEntryFileProps = any[];
|
|
26
26
|
//#endregion
|
|
27
27
|
export { EntryFile, EntryFileProps, __ΩEntryFileProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-file.d.cts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,
|
|
1
|
+
{"version":3,"file":"entry-file.d.cts","names":[],"sources":["../../../src/typescript/components/entry-file.tsx"],"sourcesContent":[],"mappings":";;;;;KA4BY,cAAA,GAAiB;;;AAA7B;AAoBA;;;;;;mBATmB;;;;;;;;iBASH,SAAA,QAAiB,iBAAc,eAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TypescriptFileProps } from "./typescript-file.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _alloy_js_core21 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):
|
|
24
|
+
declare function EntryFile(props: EntryFileProps): _alloy_js_core21.Children;
|
|
25
25
|
declare type __ΩEntryFileProps = any[];
|
|
26
26
|
//#endregion
|
|
27
27
|
export { EntryFile, EntryFileProps, __ΩEntryFileProps };
|
|
@@ -1,6 +1,9 @@
|
|
|
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_type_parameters = require('./type-parameters.cjs');
|
|
5
|
+
const require_typescript_components_typescript_property_name = require('./typescript-property-name.cjs');
|
|
6
|
+
const require_typescript_components_class_declaration = require('./class-declaration.cjs');
|
|
4
7
|
const require_typescript_components_dynamic_import_statement = require('./dynamic-import-statement.cjs');
|
|
5
8
|
const require_typescript_components_entry_file = require('./entry-file.cjs');
|
|
6
9
|
const require_typescript_components_record_expression = require('./record-expression.cjs');
|
|
@@ -9,6 +12,10 @@ const require_typescript_components_typescript_interface = require('./typescript
|
|
|
9
12
|
const require_typescript_components_typescript_object = require('./typescript-object.cjs');
|
|
10
13
|
|
|
11
14
|
exports.BuiltinFile = require_typescript_components_builtin_file.BuiltinFile;
|
|
15
|
+
exports.ClassDeclaration = require_typescript_components_class_declaration.ClassDeclaration;
|
|
16
|
+
exports.ClassField = require_typescript_components_class_declaration.ClassField;
|
|
17
|
+
exports.ClassMember = require_typescript_components_class_declaration.ClassMember;
|
|
18
|
+
exports.ClassMethod = require_typescript_components_class_declaration.ClassMethod;
|
|
12
19
|
exports.DynamicImportStatement = require_typescript_components_dynamic_import_statement.DynamicImportStatement;
|
|
13
20
|
exports.EntryFile = require_typescript_components_entry_file.EntryFile;
|
|
14
21
|
exports.RecordExpression = require_typescript_components_record_expression.RecordExpression;
|
|
@@ -35,10 +42,12 @@ exports.TSDocReturns = require_typescript_components_tsdoc.TSDocReturns;
|
|
|
35
42
|
exports.TSDocTag = require_typescript_components_tsdoc.TSDocTag;
|
|
36
43
|
exports.TSDocThrows = require_typescript_components_tsdoc.TSDocThrows;
|
|
37
44
|
exports.TSDocTitle = require_typescript_components_tsdoc.TSDocTitle;
|
|
45
|
+
exports.TypeParameters = require_typescript_components_type_parameters.TypeParameters;
|
|
38
46
|
exports.TypeScriptInterface = require_typescript_components_typescript_interface.TypeScriptInterface;
|
|
39
47
|
exports.TypescriptFile = require_typescript_components_typescript_file.TypescriptFile;
|
|
40
48
|
exports.TypescriptFileHeader = require_typescript_components_typescript_file.TypescriptFileHeader;
|
|
41
49
|
exports.TypescriptFileHeaderImports = require_typescript_components_typescript_file.TypescriptFileHeaderImports;
|
|
42
50
|
exports.TypescriptInterfaceProperty = require_typescript_components_typescript_interface.TypescriptInterfaceProperty;
|
|
43
51
|
exports.TypescriptObject = require_typescript_components_typescript_object.TypescriptObject;
|
|
44
|
-
exports.TypescriptObjectProperty = require_typescript_components_typescript_object.TypescriptObjectProperty;
|
|
52
|
+
exports.TypescriptObjectProperty = require_typescript_components_typescript_object.TypescriptObjectProperty;
|
|
53
|
+
exports.TypescriptPropertyName = require_typescript_components_typescript_property_name.TypescriptPropertyName;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./tsdoc.cjs";
|
|
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
|
+
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";
|
|
4
6
|
import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./dynamic-import-statement.cjs";
|
|
5
7
|
import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./entry-file.cjs";
|
|
6
8
|
import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./record-expression.cjs";
|
|
7
9
|
import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./tsdoc-reflection.cjs";
|
|
8
10
|
import { TypeScriptInterface, TypeScriptInterfaceProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptInterfacePropertyProps } from "./typescript-interface.cjs";
|
|
9
11
|
import { ComputedRef, TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, __ΩComputedRef, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps } from "./typescript-object.cjs";
|
|
10
|
-
|
|
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 };
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { TSDoc, TSDocAlias, TSDocAttributesTags, TSDocAttributesTagsProps, TSDocDefaultValue, TSDocDefaultValueProps, TSDocDomain, TSDocExample, TSDocExampleProps, TSDocHidden, TSDocIgnore, TSDocInternal, TSDocLink, TSDocModule, TSDocModuleProps, TSDocParam, TSDocParamProps, TSDocParams, TSDocParamsProps, TSDocPermission, TSDocProps, TSDocReadonly, TSDocRemarks, TSDocReturns, TSDocTag, TSDocTagProps, TSDocThrows, TSDocTitle, __ΩTSDocAttributesTagsProps, __ΩTSDocDefaultValueProps, __ΩTSDocExampleProps, __ΩTSDocModuleProps, __ΩTSDocParamProps, __ΩTSDocParamsProps, __ΩTSDocProps, __ΩTSDocTagProps } from "./tsdoc.mjs";
|
|
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
|
+
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";
|
|
4
6
|
import { DynamicImportStatement, DynamicImportStatementProps, __ΩDynamicImportStatementProps } from "./dynamic-import-statement.mjs";
|
|
5
7
|
import { EntryFile, EntryFileProps, __ΩEntryFileProps } from "./entry-file.mjs";
|
|
6
8
|
import { RecordExpression, RecordExpressionProps, __ΩRecordExpressionProps } from "./record-expression.mjs";
|
|
7
9
|
import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty } from "./tsdoc-reflection.mjs";
|
|
8
10
|
import { TypeScriptInterface, TypeScriptInterfaceProps, TypescriptInterfaceProperty, TypescriptInterfacePropertyProps, __ΩTypeScriptInterfaceProps, __ΩTypescriptInterfacePropertyProps } from "./typescript-interface.mjs";
|
|
9
11
|
import { ComputedRef, TypescriptObject, TypescriptObjectProperty, TypescriptObjectPropertyProps, TypescriptObjectProps, __ΩComputedRef, __ΩTypescriptObjectPropertyProps, __ΩTypescriptObjectProps } from "./typescript-object.mjs";
|
|
10
|
-
|
|
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 };
|
|
@@ -1,6 +1,9 @@
|
|
|
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 { TypeParameters } from "./type-parameters.mjs";
|
|
5
|
+
import { TypescriptPropertyName } from "./typescript-property-name.mjs";
|
|
6
|
+
import { ClassDeclaration, ClassField, ClassMember, ClassMethod } from "./class-declaration.mjs";
|
|
4
7
|
import { DynamicImportStatement } from "./dynamic-import-statement.mjs";
|
|
5
8
|
import { EntryFile } from "./entry-file.mjs";
|
|
6
9
|
import { RecordExpression } from "./record-expression.mjs";
|
|
@@ -8,4 +11,4 @@ import { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty }
|
|
|
8
11
|
import { TypeScriptInterface, TypescriptInterfaceProperty } from "./typescript-interface.mjs";
|
|
9
12
|
import { TypescriptObject, TypescriptObjectProperty } from "./typescript-object.mjs";
|
|
10
13
|
|
|
11
|
-
export { BuiltinFile, 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, TypeScriptInterface, TypescriptFile, TypescriptFileHeader, TypescriptFileHeaderImports, TypescriptInterfaceProperty, TypescriptObject, TypescriptObjectProperty };
|
|
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 };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { TSDocProps } from "./tsdoc.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _alloy_js_core0 from "@alloy-js/core";
|
|
3
3
|
|
|
4
4
|
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Generates a TypeScript interface property for the given reflection class.
|
|
7
7
|
*/
|
|
8
|
-
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps):
|
|
8
|
+
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core0.Children;
|
|
9
9
|
/**
|
|
10
10
|
* Generates a TypeScript interface property for the given reflection class.
|
|
11
11
|
*/
|
|
12
|
-
declare function TSDocReflectionProperty(props: TSDocProps):
|
|
12
|
+
declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core0.Children;
|
|
13
13
|
/**
|
|
14
14
|
* Generates a TypeScript interface property for the given reflection class.
|
|
15
15
|
*/
|
|
16
|
-
declare function TSDocReflectionMethod(props: TSDocProps):
|
|
16
|
+
declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core0.Children;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
|
|
19
19
|
//# sourceMappingURL=tsdoc-reflection.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsdoc-reflection.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAwCgB,iBAAA,oBAAoB,CAAA,UACxB,MADwB,CAAA,MAAA,EAAA,GAAA,CAAA,GACF,MADE,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAE3B,UAF2B,CAAA,EAEjB,
|
|
1
|
+
{"version":3,"file":"tsdoc-reflection.d.cts","names":[],"sources":["../../../src/typescript/components/tsdoc-reflection.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAwCgB,iBAAA,oBAAoB,CAAA,UACxB,MADwB,CAAA,MAAA,EAAA,GAAA,CAAA,GACF,MADE,CAAA,MAAA,EAAA,GAAA,CAAA,CAAA,CAAA,KAAA,EAE3B,UAF2B,CAAA,EAEjB,eAAA,CAAA,QAFiB;;;;AAEjB,iBAyEH,uBAAA,CAzEG,KAAA,EAyE4B,UAzE5B,CAAA,EAyEsC,eAAA,CAAA,QAzEtC;;AAyEnB;AA8BA;iBAAgB,qBAAA,QAA6B,aAAU,eAAA,CAAA"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { TSDocProps } from "./tsdoc.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _alloy_js_core10 from "@alloy-js/core";
|
|
3
3
|
|
|
4
4
|
//#region src/typescript/components/tsdoc-reflection.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Generates a TypeScript interface property for the given reflection class.
|
|
7
7
|
*/
|
|
8
|
-
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps):
|
|
8
|
+
declare function TSDocReflectionClass<T extends Record<string, any> = Record<string, any>>(props: TSDocProps): _alloy_js_core10.Children;
|
|
9
9
|
/**
|
|
10
10
|
* Generates a TypeScript interface property for the given reflection class.
|
|
11
11
|
*/
|
|
12
|
-
declare function TSDocReflectionProperty(props: TSDocProps):
|
|
12
|
+
declare function TSDocReflectionProperty(props: TSDocProps): _alloy_js_core10.Children;
|
|
13
13
|
/**
|
|
14
14
|
* Generates a TypeScript interface property for the given reflection class.
|
|
15
15
|
*/
|
|
16
|
-
declare function TSDocReflectionMethod(props: TSDocProps):
|
|
16
|
+
declare function TSDocReflectionMethod(props: TSDocProps): _alloy_js_core10.Children;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { TSDocReflectionClass, TSDocReflectionMethod, TSDocReflectionProperty };
|
|
19
19
|
//# sourceMappingURL=tsdoc-reflection.d.mts.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
|
|
2
|
+
let __alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
3
|
+
let __alloy_js_core = require("@alloy-js/core");
|
|
4
|
+
let __alloy_js_typescript = require("@alloy-js/typescript");
|
|
5
|
+
|
|
6
|
+
//#region src/typescript/components/type-parameters.tsx
|
|
7
|
+
/** Props for type parameters */
|
|
8
|
+
const typeParametersTag = Symbol("type-parameters");
|
|
9
|
+
function typeParameter(param) {
|
|
10
|
+
return (0, __alloy_js_core_jsx_runtime.createIntrinsic)("group", { get children() {
|
|
11
|
+
return [
|
|
12
|
+
(0, __alloy_js_core_jsx_runtime.memo)(() => param.symbol.name),
|
|
13
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
14
|
+
get when() {
|
|
15
|
+
return !!param.extends;
|
|
16
|
+
},
|
|
17
|
+
get children() {
|
|
18
|
+
return [
|
|
19
|
+
" ",
|
|
20
|
+
"extends",
|
|
21
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("indent", { get children() {
|
|
22
|
+
return [" ", (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeRefContext, { get children() {
|
|
23
|
+
return param.extends;
|
|
24
|
+
} })];
|
|
25
|
+
} })
|
|
26
|
+
];
|
|
27
|
+
}
|
|
28
|
+
}),
|
|
29
|
+
(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Show, {
|
|
30
|
+
get when() {
|
|
31
|
+
return !!param.default;
|
|
32
|
+
},
|
|
33
|
+
get children() {
|
|
34
|
+
return [" = ", (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_typescript.TypeRefContext, { get children() {
|
|
35
|
+
return param.default;
|
|
36
|
+
} })];
|
|
37
|
+
}
|
|
38
|
+
})
|
|
39
|
+
];
|
|
40
|
+
} });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Represent type parameters
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* <A, B extends string>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
const TypeParameters = (0, __alloy_js_core.taggedComponent)(typeParametersTag, function TypeParameters$1(props) {
|
|
51
|
+
if (props.children) return props.children;
|
|
52
|
+
if (!props.parameters) return;
|
|
53
|
+
const typeParameters = normalizeAndDeclareParameters(props.parameters);
|
|
54
|
+
(0, __alloy_js_core.onCleanup)(() => {
|
|
55
|
+
for (const param of typeParameters) param.symbol.delete();
|
|
56
|
+
});
|
|
57
|
+
return [
|
|
58
|
+
"<",
|
|
59
|
+
(0, __alloy_js_core_jsx_runtime.createIntrinsic)("group", { get children() {
|
|
60
|
+
return (0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.Indent, {
|
|
61
|
+
softline: true,
|
|
62
|
+
get children() {
|
|
63
|
+
return [(0, __alloy_js_core_jsx_runtime.createComponent)(__alloy_js_core.For, {
|
|
64
|
+
each: typeParameters,
|
|
65
|
+
comma: true,
|
|
66
|
+
line: true,
|
|
67
|
+
children: (param) => typeParameter(param)
|
|
68
|
+
}), (0, __alloy_js_core_jsx_runtime.createIntrinsic)("ifBreak", { children: "," })];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
} }),
|
|
72
|
+
">"
|
|
73
|
+
];
|
|
74
|
+
});
|
|
75
|
+
function normalizeAndDeclareParameters(parameters, flags = __alloy_js_typescript.TSSymbolFlags.ParameterSymbol) {
|
|
76
|
+
const namePolicy = (0, __alloy_js_typescript.useTSNamePolicy)();
|
|
77
|
+
if (parameters.length === 0) return [];
|
|
78
|
+
if (typeof parameters[0] === "string") return parameters.map((paramName) => {
|
|
79
|
+
const name = namePolicy.getName(paramName, "parameter");
|
|
80
|
+
const TypeSlot = (0, __alloy_js_core.createSymbolSlot)();
|
|
81
|
+
const symbol = (0, __alloy_js_typescript.createValueSymbol)(name, { type: TypeSlot.firstSymbol });
|
|
82
|
+
return {
|
|
83
|
+
refkeys: symbol.refkeys,
|
|
84
|
+
symbol,
|
|
85
|
+
TypeSlot
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
else return parameters.map((param) => {
|
|
89
|
+
const nullishFlag = param.nullish ?? param.optional ? __alloy_js_typescript.TSSymbolFlags.Nullish : __alloy_js_typescript.TSSymbolFlags.None;
|
|
90
|
+
const TypeSlot = (0, __alloy_js_core.createSymbolSlot)();
|
|
91
|
+
const symbol = (0, __alloy_js_typescript.createValueSymbol)(param.name, {
|
|
92
|
+
refkeys: param.refkey,
|
|
93
|
+
tsFlags: flags | nullishFlag,
|
|
94
|
+
metadata: param.metadata,
|
|
95
|
+
type: TypeSlot.firstSymbol,
|
|
96
|
+
namePolicy: namePolicy.for("parameter")
|
|
97
|
+
});
|
|
98
|
+
return {
|
|
99
|
+
...param,
|
|
100
|
+
symbol,
|
|
101
|
+
TypeSlot
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
//#endregion
|
|
107
|
+
exports.TypeParameters = TypeParameters;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as _alloy_js_core4 from "@alloy-js/core";
|
|
2
|
+
import { Children } from "@alloy-js/core";
|
|
3
|
+
import { TypeParameterDescriptor } from "@alloy-js/typescript";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/type-parameters.d.ts
|
|
6
|
+
/** Props for type parameters */
|
|
7
|
+
interface TypeParametersProps {
|
|
8
|
+
/** Parameters */
|
|
9
|
+
parameters?: TypeParameterDescriptor[] | string[];
|
|
10
|
+
/** Jsx Children */
|
|
11
|
+
children?: Children;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Represent type parameters
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* <A, B extends string>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare const TypeParameters: _alloy_js_core4.Component<TypeParametersProps> & Required<Pick<_alloy_js_core4.Component<TypeParametersProps>, "tag">>;
|
|
22
|
+
declare type __ΩTypeParametersProps = any[];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { TypeParameters, TypeParametersProps, __ΩTypeParametersProps };
|
|
25
|
+
//# sourceMappingURL=type-parameters.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-parameters.d.cts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":[],"mappings":";;;;;;UAwCiB,mBAAA;;EAAA,UAAA,CAAA,EAEF,uBAAA,EAAA,GAAA,MAAA,EAAA;EA0DF;EAAc,QAAA,CAAA,EAxDd,QAwDc;;;;;;;;;;cAAd,gBAAc,eAAA,CAAA,UAAA,uBAAA,SAAA,KAAA,eAAA,CAAA,UAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as _alloy_js_core14 from "@alloy-js/core";
|
|
2
|
+
import { Children } from "@alloy-js/core";
|
|
3
|
+
import { TypeParameterDescriptor } from "@alloy-js/typescript";
|
|
4
|
+
|
|
5
|
+
//#region src/typescript/components/type-parameters.d.ts
|
|
6
|
+
/** Props for type parameters */
|
|
7
|
+
interface TypeParametersProps {
|
|
8
|
+
/** Parameters */
|
|
9
|
+
parameters?: TypeParameterDescriptor[] | string[];
|
|
10
|
+
/** Jsx Children */
|
|
11
|
+
children?: Children;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Represent type parameters
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* <A, B extends string>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare const TypeParameters: _alloy_js_core14.Component<TypeParametersProps> & Required<Pick<_alloy_js_core14.Component<TypeParametersProps>, "tag">>;
|
|
22
|
+
declare type __ΩTypeParametersProps = any[];
|
|
23
|
+
//#endregion
|
|
24
|
+
export { TypeParameters, TypeParametersProps, __ΩTypeParametersProps };
|
|
25
|
+
//# sourceMappingURL=type-parameters.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-parameters.d.mts","names":[],"sources":["../../../src/typescript/components/type-parameters.tsx"],"sourcesContent":[],"mappings":";;;;;;UAwCiB,mBAAA;;EAAA,UAAA,CAAA,EAEF,uBAAA,EAAA,GAAA,MAAA,EAAA;EA0DF;EAAc,QAAA,CAAA,EAxDd,QAwDc;;;;;;;;;;cAAd,gBAAc,gBAAA,CAAA,UAAA,uBAAA,SAAA,KAAA,gBAAA,CAAA,UAAA"}
|