@powerlines/plugin-alloy 0.25.33 → 0.25.34
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/README.md +1 -1
- package/dist/core/components/output.cjs +17 -10
- package/dist/core/components/output.mjs +18 -12
- package/dist/core/components/single-line-comment.cjs +6 -4
- package/dist/core/components/single-line-comment.mjs +7 -6
- package/dist/core/components/source-file.cjs +10 -6
- package/dist/core/components/source-file.mjs +11 -8
- package/dist/core/components/spacing.cjs +6 -4
- package/dist/core/components/spacing.mjs +7 -6
- package/dist/core/contexts/context.mjs +1 -2
- package/dist/core/contexts/meta.mjs +1 -2
- package/dist/core/contexts/reflection.mjs +1 -2
- package/dist/core/helpers/code.mjs +1 -2
- package/dist/helpers/capnp.mjs +1 -2
- package/dist/helpers/create-builtin.mjs +1 -2
- package/dist/helpers/refkey.mjs +1 -2
- package/dist/helpers/typescript.mjs +1 -2
- package/dist/index.cjs +8 -18
- package/dist/index.mjs +8 -19
- package/dist/markdown/components/front-matter.cjs +9 -7
- package/dist/markdown/components/front-matter.mjs +10 -9
- package/dist/markdown/components/markdown-file.cjs +76 -44
- package/dist/markdown/components/markdown-file.mjs +77 -46
- package/dist/markdown/components/markdown-table.cjs +49 -28
- package/dist/markdown/components/markdown-table.mjs +50 -30
- package/dist/markdown/contexts/markdown-table.mjs +1 -2
- package/dist/render.cjs +3 -3
- package/dist/render.mjs +4 -5
- package/dist/typescript/components/builtin-file.cjs +29 -19
- package/dist/typescript/components/builtin-file.mjs +30 -21
- package/dist/typescript/components/class-declaration.cjs +165 -100
- package/dist/typescript/components/class-declaration.mjs +166 -102
- package/dist/typescript/components/dynamic-import-statement.cjs +2 -6
- package/dist/typescript/components/dynamic-import-statement.mjs +3 -8
- package/dist/typescript/components/entry-file.cjs +9 -6
- package/dist/typescript/components/entry-file.mjs +10 -8
- package/dist/typescript/components/infrastructure-file.cjs +9 -6
- package/dist/typescript/components/infrastructure-file.mjs +10 -8
- package/dist/typescript/components/interface-declaration.cjs +121 -70
- package/dist/typescript/components/interface-declaration.mjs +122 -72
- package/dist/typescript/components/object-declaration.cjs +76 -44
- package/dist/typescript/components/object-declaration.mjs +77 -46
- package/dist/typescript/components/property-name.cjs +3 -3
- package/dist/typescript/components/property-name.mjs +4 -5
- package/dist/typescript/components/record-expression.mjs +1 -2
- package/dist/typescript/components/tsdoc-reflection.cjs +225 -104
- package/dist/typescript/components/tsdoc-reflection.mjs +226 -106
- package/dist/typescript/components/tsdoc.cjs +255 -160
- package/dist/typescript/components/tsdoc.mjs +256 -162
- package/dist/typescript/components/type-declaration.cjs +20 -15
- package/dist/typescript/components/type-declaration.mjs +21 -17
- package/dist/typescript/components/type-parameters.cjs +55 -29
- package/dist/typescript/components/type-parameters.mjs +56 -31
- package/dist/typescript/components/typescript-file.cjs +145 -80
- package/dist/typescript/components/typescript-file.mjs +146 -82
- package/dist/typescript/contexts/lexical-scope.cjs +5 -3
- package/dist/typescript/contexts/lexical-scope.mjs +6 -5
- package/dist/typescript/contexts/member-scope.cjs +5 -3
- package/dist/typescript/contexts/member-scope.mjs +6 -5
- package/dist/typescript/helpers/get-call-signature-props.mjs +1 -2
- package/dist/typescript/helpers/utilities.mjs +1 -2
- package/dist/yaml/components/yaml-file.cjs +92 -47
- package/dist/yaml/components/yaml-file.mjs +93 -49
- package/package.json +16 -17
- package/dist/core/components/index.d.cts +0 -5
- package/dist/core/components/index.d.mts +0 -5
- package/dist/core/components/output.d.cts +0 -24
- package/dist/core/components/output.d.cts.map +0 -1
- package/dist/core/components/output.d.mts +0 -24
- package/dist/core/components/output.d.mts.map +0 -1
- package/dist/core/components/output.mjs.map +0 -1
- package/dist/core/components/single-line-comment.d.cts +0 -23
- package/dist/core/components/single-line-comment.d.cts.map +0 -1
- package/dist/core/components/single-line-comment.d.mts +0 -23
- package/dist/core/components/single-line-comment.d.mts.map +0 -1
- package/dist/core/components/single-line-comment.mjs.map +0 -1
- package/dist/core/components/source-file.d.cts +0 -33
- package/dist/core/components/source-file.d.cts.map +0 -1
- package/dist/core/components/source-file.d.mts +0 -33
- package/dist/core/components/source-file.d.mts.map +0 -1
- package/dist/core/components/source-file.mjs.map +0 -1
- package/dist/core/components/spacing.d.cts +0 -24
- package/dist/core/components/spacing.d.cts.map +0 -1
- package/dist/core/components/spacing.d.mts +0 -24
- package/dist/core/components/spacing.d.mts.map +0 -1
- package/dist/core/components/spacing.mjs.map +0 -1
- package/dist/core/contexts/context.d.cts +0 -29
- package/dist/core/contexts/context.d.cts.map +0 -1
- package/dist/core/contexts/context.d.mts +0 -29
- package/dist/core/contexts/context.d.mts.map +0 -1
- package/dist/core/contexts/context.mjs.map +0 -1
- package/dist/core/contexts/index.d.cts +0 -4
- package/dist/core/contexts/index.d.mts +0 -4
- package/dist/core/contexts/meta.d.cts +0 -48
- package/dist/core/contexts/meta.d.cts.map +0 -1
- package/dist/core/contexts/meta.d.mts +0 -48
- package/dist/core/contexts/meta.d.mts.map +0 -1
- package/dist/core/contexts/meta.mjs.map +0 -1
- package/dist/core/contexts/reflection.d.cts +0 -53
- package/dist/core/contexts/reflection.d.cts.map +0 -1
- package/dist/core/contexts/reflection.d.mts +0 -53
- package/dist/core/contexts/reflection.d.mts.map +0 -1
- package/dist/core/contexts/reflection.mjs.map +0 -1
- package/dist/core/helpers/code.d.cts +0 -29
- package/dist/core/helpers/code.d.cts.map +0 -1
- package/dist/core/helpers/code.d.mts +0 -29
- package/dist/core/helpers/code.d.mts.map +0 -1
- package/dist/core/helpers/code.mjs.map +0 -1
- package/dist/core/helpers/index.d.cts +0 -2
- package/dist/core/helpers/index.d.mts +0 -2
- package/dist/core/index.d.cts +0 -9
- package/dist/core/index.d.mts +0 -9
- package/dist/helpers/capnp.d.cts +0 -87
- package/dist/helpers/capnp.d.cts.map +0 -1
- package/dist/helpers/capnp.d.mts +0 -87
- package/dist/helpers/capnp.d.mts.map +0 -1
- package/dist/helpers/capnp.mjs.map +0 -1
- package/dist/helpers/create-builtin.d.cts +0 -16
- package/dist/helpers/create-builtin.d.cts.map +0 -1
- package/dist/helpers/create-builtin.d.mts +0 -16
- package/dist/helpers/create-builtin.d.mts.map +0 -1
- package/dist/helpers/create-builtin.mjs.map +0 -1
- package/dist/helpers/index.d.cts +0 -5
- package/dist/helpers/index.d.mts +0 -5
- package/dist/helpers/refkey.d.cts +0 -13
- package/dist/helpers/refkey.d.cts.map +0 -1
- package/dist/helpers/refkey.d.mts +0 -13
- package/dist/helpers/refkey.d.mts.map +0 -1
- package/dist/helpers/refkey.mjs.map +0 -1
- package/dist/helpers/typescript.d.cts +0 -26
- package/dist/helpers/typescript.d.cts.map +0 -1
- package/dist/helpers/typescript.d.mts +0 -26
- package/dist/helpers/typescript.d.mts.map +0 -1
- package/dist/helpers/typescript.mjs.map +0 -1
- package/dist/index.d.cts +0 -19
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -19
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/markdown/components/front-matter.d.cts +0 -16
- package/dist/markdown/components/front-matter.d.cts.map +0 -1
- package/dist/markdown/components/front-matter.d.mts +0 -16
- package/dist/markdown/components/front-matter.d.mts.map +0 -1
- package/dist/markdown/components/front-matter.mjs.map +0 -1
- package/dist/markdown/components/index.d.cts +0 -4
- package/dist/markdown/components/index.d.mts +0 -4
- package/dist/markdown/components/markdown-file.d.cts +0 -29
- package/dist/markdown/components/markdown-file.d.cts.map +0 -1
- package/dist/markdown/components/markdown-file.d.mts +0 -29
- package/dist/markdown/components/markdown-file.d.mts.map +0 -1
- package/dist/markdown/components/markdown-file.mjs.map +0 -1
- package/dist/markdown/components/markdown-table.d.cts +0 -28
- package/dist/markdown/components/markdown-table.d.cts.map +0 -1
- package/dist/markdown/components/markdown-table.d.mts +0 -28
- package/dist/markdown/components/markdown-table.d.mts.map +0 -1
- package/dist/markdown/components/markdown-table.mjs.map +0 -1
- package/dist/markdown/contexts/index.d.cts +0 -2
- package/dist/markdown/contexts/index.d.mts +0 -2
- package/dist/markdown/contexts/markdown-table.d.cts +0 -38
- package/dist/markdown/contexts/markdown-table.d.cts.map +0 -1
- package/dist/markdown/contexts/markdown-table.d.mts +0 -38
- package/dist/markdown/contexts/markdown-table.d.mts.map +0 -1
- package/dist/markdown/contexts/markdown-table.mjs.map +0 -1
- package/dist/markdown/index.d.cts +0 -5
- package/dist/markdown/index.d.mts +0 -5
- package/dist/render.d.cts +0 -38
- package/dist/render.d.cts.map +0 -1
- package/dist/render.d.mts +0 -38
- package/dist/render.d.mts.map +0 -1
- package/dist/render.mjs.map +0 -1
- package/dist/types/components.d.cts +0 -142
- package/dist/types/components.d.cts.map +0 -1
- package/dist/types/components.d.mts +0 -142
- package/dist/types/components.d.mts.map +0 -1
- package/dist/types/index.d.cts +0 -3
- package/dist/types/index.d.mts +0 -3
- package/dist/types/plugin.d.cts +0 -39
- package/dist/types/plugin.d.cts.map +0 -1
- package/dist/types/plugin.d.mts +0 -39
- package/dist/types/plugin.d.mts.map +0 -1
- package/dist/typescript/components/builtin-file.d.cts +0 -35
- package/dist/typescript/components/builtin-file.d.cts.map +0 -1
- package/dist/typescript/components/builtin-file.d.mts +0 -35
- package/dist/typescript/components/builtin-file.d.mts.map +0 -1
- package/dist/typescript/components/builtin-file.mjs.map +0 -1
- package/dist/typescript/components/class-declaration.d.cts +0 -145
- package/dist/typescript/components/class-declaration.d.cts.map +0 -1
- package/dist/typescript/components/class-declaration.d.mts +0 -145
- package/dist/typescript/components/class-declaration.d.mts.map +0 -1
- package/dist/typescript/components/class-declaration.mjs.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.d.cts +0 -33
- package/dist/typescript/components/dynamic-import-statement.d.cts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.d.mts +0 -33
- package/dist/typescript/components/dynamic-import-statement.d.mts.map +0 -1
- package/dist/typescript/components/dynamic-import-statement.mjs.map +0 -1
- package/dist/typescript/components/entry-file.d.cts +0 -28
- package/dist/typescript/components/entry-file.d.cts.map +0 -1
- package/dist/typescript/components/entry-file.d.mts +0 -28
- package/dist/typescript/components/entry-file.d.mts.map +0 -1
- package/dist/typescript/components/entry-file.mjs.map +0 -1
- package/dist/typescript/components/index.d.cts +0 -15
- package/dist/typescript/components/index.d.mts +0 -15
- package/dist/typescript/components/infrastructure-file.d.cts +0 -21
- package/dist/typescript/components/infrastructure-file.d.cts.map +0 -1
- package/dist/typescript/components/infrastructure-file.d.mts +0 -21
- package/dist/typescript/components/infrastructure-file.d.mts.map +0 -1
- package/dist/typescript/components/infrastructure-file.mjs.map +0 -1
- package/dist/typescript/components/interface-declaration.d.cts +0 -86
- package/dist/typescript/components/interface-declaration.d.cts.map +0 -1
- package/dist/typescript/components/interface-declaration.d.mts +0 -86
- package/dist/typescript/components/interface-declaration.d.mts.map +0 -1
- package/dist/typescript/components/interface-declaration.mjs.map +0 -1
- package/dist/typescript/components/object-declaration.d.cts +0 -30
- package/dist/typescript/components/object-declaration.d.cts.map +0 -1
- package/dist/typescript/components/object-declaration.d.mts +0 -30
- package/dist/typescript/components/object-declaration.d.mts.map +0 -1
- package/dist/typescript/components/object-declaration.mjs.map +0 -1
- package/dist/typescript/components/property-name.d.cts +0 -24
- package/dist/typescript/components/property-name.d.cts.map +0 -1
- package/dist/typescript/components/property-name.d.mts +0 -24
- package/dist/typescript/components/property-name.d.mts.map +0 -1
- package/dist/typescript/components/property-name.mjs.map +0 -1
- package/dist/typescript/components/record-expression.d.cts +0 -13
- package/dist/typescript/components/record-expression.d.cts.map +0 -1
- package/dist/typescript/components/record-expression.d.mts +0 -13
- package/dist/typescript/components/record-expression.d.mts.map +0 -1
- package/dist/typescript/components/record-expression.mjs.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.d.cts +0 -44
- package/dist/typescript/components/tsdoc-reflection.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.d.mts +0 -44
- package/dist/typescript/components/tsdoc-reflection.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc-reflection.mjs.map +0 -1
- package/dist/typescript/components/tsdoc.d.cts +0 -164
- package/dist/typescript/components/tsdoc.d.cts.map +0 -1
- package/dist/typescript/components/tsdoc.d.mts +0 -164
- package/dist/typescript/components/tsdoc.d.mts.map +0 -1
- package/dist/typescript/components/tsdoc.mjs.map +0 -1
- package/dist/typescript/components/type-declaration.d.cts +0 -18
- package/dist/typescript/components/type-declaration.d.cts.map +0 -1
- package/dist/typescript/components/type-declaration.d.mts +0 -18
- package/dist/typescript/components/type-declaration.d.mts.map +0 -1
- package/dist/typescript/components/type-declaration.mjs.map +0 -1
- package/dist/typescript/components/type-parameters.d.cts +0 -24
- package/dist/typescript/components/type-parameters.d.cts.map +0 -1
- package/dist/typescript/components/type-parameters.d.mts +0 -24
- package/dist/typescript/components/type-parameters.d.mts.map +0 -1
- package/dist/typescript/components/type-parameters.mjs.map +0 -1
- package/dist/typescript/components/typescript-file.d.cts +0 -50
- package/dist/typescript/components/typescript-file.d.cts.map +0 -1
- package/dist/typescript/components/typescript-file.d.mts +0 -50
- package/dist/typescript/components/typescript-file.d.mts.map +0 -1
- package/dist/typescript/components/typescript-file.mjs.map +0 -1
- package/dist/typescript/contexts/index.d.cts +0 -2
- package/dist/typescript/contexts/index.d.mts +0 -2
- package/dist/typescript/contexts/lexical-scope.d.cts +0 -17
- package/dist/typescript/contexts/lexical-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.d.mts +0 -17
- package/dist/typescript/contexts/lexical-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/lexical-scope.mjs.map +0 -1
- package/dist/typescript/contexts/member-scope.d.cts +0 -20
- package/dist/typescript/contexts/member-scope.d.cts.map +0 -1
- package/dist/typescript/contexts/member-scope.d.mts +0 -20
- package/dist/typescript/contexts/member-scope.d.mts.map +0 -1
- package/dist/typescript/contexts/member-scope.mjs.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.cts +0 -14
- package/dist/typescript/helpers/get-call-signature-props.d.cts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.d.mts +0 -14
- package/dist/typescript/helpers/get-call-signature-props.d.mts.map +0 -1
- package/dist/typescript/helpers/get-call-signature-props.mjs.map +0 -1
- package/dist/typescript/helpers/index.d.cts +0 -3
- package/dist/typescript/helpers/index.d.mts +0 -3
- package/dist/typescript/helpers/utilities.d.cts +0 -11
- package/dist/typescript/helpers/utilities.d.cts.map +0 -1
- package/dist/typescript/helpers/utilities.d.mts +0 -11
- package/dist/typescript/helpers/utilities.d.mts.map +0 -1
- package/dist/typescript/helpers/utilities.mjs.map +0 -1
- package/dist/typescript/index.d.cts +0 -18
- package/dist/typescript/index.d.mts +0 -18
- package/dist/yaml/components/index.d.cts +0 -2
- package/dist/yaml/components/index.d.mts +0 -2
- package/dist/yaml/components/yaml-file.d.cts +0 -34
- package/dist/yaml/components/yaml-file.d.cts.map +0 -1
- package/dist/yaml/components/yaml-file.d.mts +0 -34
- package/dist/yaml/components/yaml-file.d.mts.map +0 -1
- package/dist/yaml/components/yaml-file.mjs.map +0 -1
- package/dist/yaml/index.d.cts +0 -2
- package/dist/yaml/index.d.mts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReflectionClassContext, ReflectionPropertyContext } from "../../core/contexts/reflection.mjs";
|
|
2
2
|
import { TSDocReflectionClass, TSDocReflectionProperty } from "./tsdoc-reflection.mjs";
|
|
3
|
+
import { createComponent, createIntrinsic, memo } from "@alloy-js/core/jsx-runtime";
|
|
3
4
|
import { Declaration, For, Name, Show, computed, createSymbolSlot, splitProps } from "@alloy-js/core";
|
|
4
|
-
import { jsx, jsxs } from "@alloy-js/core/jsx-runtime";
|
|
5
5
|
import { stringifyDefaultValue } from "@powerlines/deepkit/utilities";
|
|
6
6
|
import { camelCase } from "@stryke/string-format/camel-case";
|
|
7
7
|
import { isUndefined } from "@stryke/type-checks/is-undefined";
|
|
@@ -34,41 +34,67 @@ function ObjectDeclaration(props) {
|
|
|
34
34
|
});
|
|
35
35
|
if (!props.type) ValueTypeSymbolSlot.moveMembersTo(sym);
|
|
36
36
|
const keyword = props.var ? "var" : props.let ? "let" : "const";
|
|
37
|
-
const type = props.type ?
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
37
|
+
const type = props.type ? createComponent(TypeRefContext, { get children() {
|
|
38
|
+
return [": ", createComponent(TypeSymbolSlot, { get children() {
|
|
39
|
+
return props.type;
|
|
40
|
+
} })];
|
|
41
|
+
} }) : void 0;
|
|
42
|
+
return createComponent(Show, {
|
|
43
|
+
get when() {
|
|
44
|
+
return !!props.reflection.value;
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return createComponent(ReflectionClassContext.Provider, {
|
|
48
|
+
get value() {
|
|
49
|
+
return {
|
|
50
|
+
reflection: props.reflection.value,
|
|
51
|
+
override: {
|
|
52
|
+
name: objectName.value,
|
|
53
|
+
type: objectType.value,
|
|
54
|
+
defaultValue: props.defaultValue?.value
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
get children() {
|
|
59
|
+
return [createComponent(Show, {
|
|
60
|
+
get when() {
|
|
61
|
+
return !!objectName.value && !!objectType.value;
|
|
62
|
+
},
|
|
63
|
+
get children() {
|
|
64
|
+
return [createComponent(TSDocReflectionClass, { get reflection() {
|
|
65
|
+
return props.reflection.value;
|
|
66
|
+
} }), createComponent(Declaration, {
|
|
67
|
+
symbol: sym,
|
|
68
|
+
get children() {
|
|
69
|
+
return [
|
|
70
|
+
memo(() => props.export ? "export " : ""),
|
|
71
|
+
memo(() => props.default ? "default " : ""),
|
|
72
|
+
keyword,
|
|
73
|
+
" ",
|
|
74
|
+
createComponent(Name, {}),
|
|
75
|
+
type,
|
|
76
|
+
" =",
|
|
77
|
+
" ",
|
|
78
|
+
createComponent(ValueTypeSymbolSlot, { get children() {
|
|
79
|
+
return props.initializer ?? props.children ?? createComponent(ObjectExpression, { get children() {
|
|
80
|
+
return createComponent(For, {
|
|
81
|
+
get each() {
|
|
82
|
+
return properties.value ?? [];
|
|
83
|
+
},
|
|
84
|
+
comma: true,
|
|
85
|
+
doubleHardline: true,
|
|
86
|
+
children: (prop) => createComponent(ObjectDeclarationProperty, { property: prop })
|
|
87
|
+
});
|
|
88
|
+
} });
|
|
89
|
+
} })
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
})];
|
|
93
|
+
}
|
|
94
|
+
}), createIntrinsic("hbr", {})];
|
|
47
95
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
when: !!objectName.value && !!objectType.value,
|
|
51
|
-
children: [/* @__PURE__ */ jsx(TSDocReflectionClass, { reflection: props.reflection.value }), /* @__PURE__ */ jsxs(Declaration, {
|
|
52
|
-
symbol: sym,
|
|
53
|
-
children: [
|
|
54
|
-
props.export ? "export " : "",
|
|
55
|
-
props.default ? "default " : "",
|
|
56
|
-
keyword,
|
|
57
|
-
" ",
|
|
58
|
-
/* @__PURE__ */ jsx(Name, {}),
|
|
59
|
-
type,
|
|
60
|
-
" =",
|
|
61
|
-
" ",
|
|
62
|
-
/* @__PURE__ */ jsx(ValueTypeSymbolSlot, { children: props.initializer ?? props.children ?? /* @__PURE__ */ jsx(ObjectExpression, { children: /* @__PURE__ */ jsx(For, {
|
|
63
|
-
each: properties.value ?? [],
|
|
64
|
-
comma: true,
|
|
65
|
-
doubleHardline: true,
|
|
66
|
-
children: (prop) => /* @__PURE__ */ jsx(ObjectDeclarationProperty, { property: prop })
|
|
67
|
-
}) }) })
|
|
68
|
-
]
|
|
69
|
-
})]
|
|
70
|
-
}), /* @__PURE__ */ jsx("hbr", {})]
|
|
71
|
-
})
|
|
96
|
+
});
|
|
97
|
+
}
|
|
72
98
|
});
|
|
73
99
|
}
|
|
74
100
|
/**
|
|
@@ -76,19 +102,24 @@ function ObjectDeclaration(props) {
|
|
|
76
102
|
*/
|
|
77
103
|
function ObjectDeclarationProperty(props) {
|
|
78
104
|
const [{ property }] = splitProps(props, ["property"]);
|
|
79
|
-
return
|
|
105
|
+
return createComponent(ReflectionPropertyContext.Provider, {
|
|
80
106
|
value: property,
|
|
81
|
-
children
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
107
|
+
get children() {
|
|
108
|
+
return [
|
|
109
|
+
createComponent(TSDocReflectionProperty, { reflection: property }),
|
|
110
|
+
createComponent(ObjectProperty, {
|
|
111
|
+
get name() {
|
|
112
|
+
return property.getNameAsString();
|
|
113
|
+
},
|
|
114
|
+
get value() {
|
|
115
|
+
return stringifyDefaultValue(property);
|
|
116
|
+
}
|
|
117
|
+
}),
|
|
118
|
+
createIntrinsic("hbr", {})
|
|
119
|
+
];
|
|
120
|
+
}
|
|
89
121
|
});
|
|
90
122
|
}
|
|
91
123
|
|
|
92
124
|
//#endregion
|
|
93
|
-
export { ObjectDeclaration, ObjectDeclarationProperty };
|
|
94
|
-
//# sourceMappingURL=object-declaration.mjs.map
|
|
125
|
+
export { ObjectDeclaration, ObjectDeclarationProperty };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_typescript_helpers_utilities = require('../helpers/utilities.cjs');
|
|
4
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
5
4
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
5
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
6
6
|
|
|
7
7
|
//#region src/typescript/components/property-name.tsx
|
|
8
8
|
/**
|
|
@@ -19,8 +19,8 @@ function PropertyName(props) {
|
|
|
19
19
|
else {
|
|
20
20
|
const declSymbol = (0, _alloy_js_core.useContext)(_alloy_js_core.MemberDeclarationContext);
|
|
21
21
|
if (!declSymbol) return "(no member declaration context)";
|
|
22
|
-
if (declSymbol.isPrivateMemberSymbol) return
|
|
23
|
-
else return
|
|
22
|
+
if (declSymbol.isPrivateMemberSymbol) return ["#", (0, _alloy_js_core_jsx_runtime.memo)(() => declSymbol.name)];
|
|
23
|
+
else return [(0, _alloy_js_core_jsx_runtime.memo)(() => quoteIfNeeded(declSymbol.name))];
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
function quoteIfNeeded(name) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isValidJSIdentifier } from "../helpers/utilities.mjs";
|
|
2
|
+
import { memo } from "@alloy-js/core/jsx-runtime";
|
|
2
3
|
import { MemberDeclarationContext, useContext } from "@alloy-js/core";
|
|
3
|
-
import { Fragment, jsx, jsxs, memo } from "@alloy-js/core/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/typescript/components/property-name.tsx
|
|
6
6
|
/**
|
|
@@ -17,8 +17,8 @@ function PropertyName(props) {
|
|
|
17
17
|
else {
|
|
18
18
|
const declSymbol = useContext(MemberDeclarationContext);
|
|
19
19
|
if (!declSymbol) return "(no member declaration context)";
|
|
20
|
-
if (declSymbol.isPrivateMemberSymbol) return
|
|
21
|
-
else return
|
|
20
|
+
if (declSymbol.isPrivateMemberSymbol) return ["#", memo(() => declSymbol.name)];
|
|
21
|
+
else return [memo(() => quoteIfNeeded(declSymbol.name))];
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
function quoteIfNeeded(name) {
|
|
@@ -27,5 +27,4 @@ function quoteIfNeeded(name) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
//#endregion
|
|
30
|
-
export { PropertyName };
|
|
31
|
-
//# sourceMappingURL=property-name.mjs.map
|
|
30
|
+
export { PropertyName };
|
|
@@ -3,8 +3,8 @@ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
|
3
3
|
const require_core_contexts_reflection = require('../../core/contexts/reflection.cjs');
|
|
4
4
|
const require_core_components_spacing = require('../../core/components/spacing.cjs');
|
|
5
5
|
const require_typescript_components_tsdoc = require('./tsdoc.cjs');
|
|
6
|
-
let _alloy_js_core = require("@alloy-js/core");
|
|
7
6
|
let _alloy_js_core_jsx_runtime = require("@alloy-js/core/jsx-runtime");
|
|
7
|
+
let _alloy_js_core = require("@alloy-js/core");
|
|
8
8
|
let _stryke_string_format_title_case = require("@stryke/string-format/title-case");
|
|
9
9
|
let _stryke_type_checks_is_undefined = require("@stryke/type-checks/is-undefined");
|
|
10
10
|
let _powerlines_deepkit_vendor_type = require("@powerlines/deepkit/vendor/type");
|
|
@@ -34,41 +34,77 @@ function TSDocReflectionClass(props) {
|
|
|
34
34
|
const hidden = (0, _alloy_js_core.computed)(() => reflection.isHidden());
|
|
35
35
|
if (!computedHeading.value || (0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value) && computedHeading.value.trim() === "") return null;
|
|
36
36
|
const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(title.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(alias.value) && alias.value.length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(permission.value) && permission.value.length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(domain.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(readonly.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(internal.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(ignore.value) || !(0, _stryke_type_checks_is_undefined.isUndefined)(hidden.value));
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
37
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)(rest, {
|
|
38
|
+
get heading() {
|
|
39
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!(0, _stryke_type_checks_is_set_string.isSetString)(computedHeading.value))() ? computedHeading.value.trim() : computedHeading.value;
|
|
40
|
+
},
|
|
41
|
+
get children() {
|
|
42
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
43
|
+
get when() {
|
|
44
|
+
return hasAttributes.value;
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
48
|
+
get title() {
|
|
49
|
+
return title.value;
|
|
50
|
+
},
|
|
51
|
+
get alias() {
|
|
52
|
+
return alias.value;
|
|
53
|
+
},
|
|
54
|
+
get domain() {
|
|
55
|
+
return domain.value;
|
|
56
|
+
},
|
|
57
|
+
get permission() {
|
|
58
|
+
return permission.value;
|
|
59
|
+
},
|
|
60
|
+
get readonly() {
|
|
61
|
+
return readonly.value;
|
|
62
|
+
},
|
|
63
|
+
get internal() {
|
|
64
|
+
return internal.value;
|
|
65
|
+
},
|
|
66
|
+
get ignore() {
|
|
67
|
+
return ignore.value;
|
|
68
|
+
},
|
|
69
|
+
get hidden() {
|
|
70
|
+
return hidden.value;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
75
|
+
get when() {
|
|
76
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
|
|
77
|
+
},
|
|
78
|
+
get children() {
|
|
79
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
80
|
+
get when() {
|
|
81
|
+
return hasAttributes.value;
|
|
82
|
+
},
|
|
83
|
+
get children() {
|
|
84
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
85
|
+
}
|
|
86
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
87
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
88
|
+
} })];
|
|
89
|
+
}
|
|
90
|
+
})];
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
60
93
|
}
|
|
61
94
|
/**
|
|
62
95
|
* Uses the `useReflectionClass` hook to retrieve the reflection class from the context, and then renders a `TSDocReflectionClass` component with the retrieved reflection class. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection class without having to manually retrieve the reflection class from the context.
|
|
63
96
|
*/
|
|
64
97
|
function TSDocContextClass(props) {
|
|
65
98
|
const reflectionClass = require_core_contexts_reflection.useReflectionClass();
|
|
66
|
-
return
|
|
67
|
-
when
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
99
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
100
|
+
get when() {
|
|
101
|
+
return (0, _stryke_type_checks.isSetObject)(reflectionClass.reflection);
|
|
102
|
+
},
|
|
103
|
+
get children() {
|
|
104
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionClass, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { get reflection() {
|
|
105
|
+
return reflectionClass.reflection;
|
|
106
|
+
} }));
|
|
107
|
+
}
|
|
72
108
|
});
|
|
73
109
|
}
|
|
74
110
|
/**
|
|
@@ -78,43 +114,76 @@ function TSDocReflectionProperty(props) {
|
|
|
78
114
|
const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
|
|
79
115
|
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
80
116
|
const hasAttributes = (0, _alloy_js_core.computed)(() => (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getTitle()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getAlias()) && reflection.getAlias().length > 0 || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getPermission()) && reflection.getPermission().length > 0 || (0, _stryke_type_checks_is_set_string.isSetString)(reflection.getDomain()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isReadonly()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isInternal()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isIgnored()) || !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.isHidden()) || reflection.hasDefault() && !(0, _stryke_type_checks_is_undefined.isUndefined)(reflection.getDefaultValue()));
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
when
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
117
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
118
|
+
return reflection.getDescription();
|
|
119
|
+
} }, rest, { get children() {
|
|
120
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
121
|
+
get when() {
|
|
122
|
+
return hasAttributes.value;
|
|
123
|
+
},
|
|
124
|
+
get children() {
|
|
125
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
126
|
+
type: reflection,
|
|
127
|
+
get title() {
|
|
128
|
+
return reflection.getTitle();
|
|
129
|
+
},
|
|
130
|
+
get alias() {
|
|
131
|
+
return reflection.getAlias();
|
|
132
|
+
},
|
|
133
|
+
get domain() {
|
|
134
|
+
return reflection.getDomain();
|
|
135
|
+
},
|
|
136
|
+
get permission() {
|
|
137
|
+
return reflection.getPermission();
|
|
138
|
+
},
|
|
139
|
+
get readonly() {
|
|
140
|
+
return reflection.isReadonly();
|
|
141
|
+
},
|
|
142
|
+
get internal() {
|
|
143
|
+
return reflection.isInternal();
|
|
144
|
+
},
|
|
145
|
+
get ignore() {
|
|
146
|
+
return reflection.isIgnored();
|
|
147
|
+
},
|
|
148
|
+
get hidden() {
|
|
149
|
+
return reflection.isHidden();
|
|
150
|
+
},
|
|
151
|
+
get defaultValue() {
|
|
152
|
+
return reflection.getDefaultValue();
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
157
|
+
get when() {
|
|
158
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!!(0, _stryke_type_checks_is_undefined.isUndefined)(children))() && (0, _alloy_js_core.childrenArray)(() => children).filter(Boolean).length > 0;
|
|
159
|
+
},
|
|
160
|
+
get children() {
|
|
161
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
162
|
+
get when() {
|
|
163
|
+
return hasAttributes.value;
|
|
164
|
+
},
|
|
165
|
+
get children() {
|
|
166
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {});
|
|
167
|
+
}
|
|
168
|
+
}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
169
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
170
|
+
} })];
|
|
171
|
+
}
|
|
172
|
+
})];
|
|
173
|
+
} }));
|
|
106
174
|
}
|
|
107
175
|
/**
|
|
108
176
|
* Uses the `useReflectionProperty` hook to retrieve the reflection property from the context, and then renders a `TSDocReflectionProperty` component with the retrieved reflection property. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection property without having to manually retrieve the reflection property from the context.
|
|
109
177
|
*/
|
|
110
178
|
function TSDocContextProperty(props) {
|
|
111
179
|
const reflection = require_core_contexts_reflection.useReflectionProperty();
|
|
112
|
-
return
|
|
113
|
-
when
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
180
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
181
|
+
get when() {
|
|
182
|
+
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
183
|
+
},
|
|
184
|
+
get children() {
|
|
185
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionProperty, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
|
|
186
|
+
}
|
|
118
187
|
});
|
|
119
188
|
}
|
|
120
189
|
/**
|
|
@@ -123,60 +192,112 @@ function TSDocContextProperty(props) {
|
|
|
123
192
|
function TSDocReflectionMethod(props) {
|
|
124
193
|
const [{ children, reflection }, rest] = (0, _alloy_js_core.splitProps)(props, ["children", "reflection"]);
|
|
125
194
|
if (!(0, _stryke_type_checks.isSetObject)(reflection)) return null;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
195
|
+
const heading = (0, _alloy_js_core.computed)(() => reflection.getDescription() || ((0, _stryke_type_checks_is_string.isString)(reflection.getName()) ? _alloy_js_core.code`${String(reflection.getName())} method definition` : void 0));
|
|
196
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDoc, (0, _alloy_js_core_jsx_runtime.mergeProps)({ get heading() {
|
|
197
|
+
return heading.value;
|
|
198
|
+
} }, rest, { get children() {
|
|
199
|
+
return [
|
|
200
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocAttributesTags, {
|
|
201
|
+
get title() {
|
|
202
|
+
return reflection.getTitle();
|
|
203
|
+
},
|
|
204
|
+
get alias() {
|
|
205
|
+
return reflection.getAlias();
|
|
206
|
+
},
|
|
207
|
+
get domain() {
|
|
208
|
+
return reflection.getDomain();
|
|
209
|
+
},
|
|
210
|
+
get permission() {
|
|
211
|
+
return reflection.getPermission();
|
|
212
|
+
},
|
|
213
|
+
get readonly() {
|
|
214
|
+
return reflection.isReadonly();
|
|
215
|
+
},
|
|
216
|
+
get internal() {
|
|
217
|
+
return reflection.isInternal();
|
|
218
|
+
},
|
|
219
|
+
get ignore() {
|
|
220
|
+
return reflection.isIgnored();
|
|
221
|
+
},
|
|
222
|
+
get hidden() {
|
|
223
|
+
return reflection.isHidden();
|
|
224
|
+
}
|
|
139
225
|
}),
|
|
140
|
-
|
|
141
|
-
when
|
|
142
|
-
|
|
226
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
227
|
+
get when() {
|
|
228
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!Boolean(children))() && (0, _alloy_js_core.childrenArray)(() => children).length > 0;
|
|
229
|
+
},
|
|
230
|
+
get children() {
|
|
231
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.List, { get children() {
|
|
232
|
+
return (0, _alloy_js_core.childrenArray)(() => children);
|
|
233
|
+
} });
|
|
234
|
+
}
|
|
143
235
|
}),
|
|
144
|
-
|
|
145
|
-
when
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
236
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
237
|
+
get when() {
|
|
238
|
+
return reflection.getParameters().length > 0;
|
|
239
|
+
},
|
|
240
|
+
get children() {
|
|
241
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.For, {
|
|
242
|
+
get each() {
|
|
243
|
+
return reflection.getParameters();
|
|
244
|
+
},
|
|
245
|
+
hardline: true,
|
|
246
|
+
get ender() {
|
|
247
|
+
return (0, _alloy_js_core_jsx_runtime.createIntrinsic)("hbr", {});
|
|
248
|
+
},
|
|
249
|
+
children: (param) => (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocParam, {
|
|
250
|
+
get name() {
|
|
251
|
+
return param.getName();
|
|
252
|
+
},
|
|
253
|
+
get optional() {
|
|
254
|
+
return param.isOptional();
|
|
255
|
+
},
|
|
256
|
+
get defaultValue() {
|
|
257
|
+
return (0, _alloy_js_core_jsx_runtime.memo)(() => !!param.hasDefault())() ? param.getDefaultValue() : void 0;
|
|
258
|
+
},
|
|
259
|
+
get children() {
|
|
260
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
261
|
+
get when() {
|
|
262
|
+
return Boolean(param.parameter.description);
|
|
263
|
+
},
|
|
264
|
+
get fallback() {
|
|
265
|
+
return _alloy_js_core.code`A parameter to provide a ${param.getName()} value to the function.`;
|
|
266
|
+
},
|
|
267
|
+
get children() {
|
|
268
|
+
return param.parameter.description;
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
158
272
|
})
|
|
159
|
-
})
|
|
160
|
-
}
|
|
273
|
+
})];
|
|
274
|
+
}
|
|
161
275
|
}),
|
|
162
|
-
|
|
163
|
-
when
|
|
164
|
-
|
|
276
|
+
(0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
277
|
+
get when() {
|
|
278
|
+
return reflection.getReturnType().kind !== _powerlines_deepkit_vendor_type.ReflectionKind.void;
|
|
279
|
+
},
|
|
280
|
+
get children() {
|
|
281
|
+
return [(0, _alloy_js_core_jsx_runtime.createComponent)(require_core_components_spacing.Spacing, {}), (0, _alloy_js_core_jsx_runtime.createComponent)(require_typescript_components_tsdoc.TSDocReturns, { get children() {
|
|
282
|
+
return _alloy_js_core.code`The return value of the function, which is of type ${(0, _powerlines_deepkit_vendor_type.stringifyType)(reflection.getReturnType())}.`;
|
|
283
|
+
} })];
|
|
284
|
+
}
|
|
165
285
|
})
|
|
166
|
-
]
|
|
167
|
-
});
|
|
286
|
+
];
|
|
287
|
+
} }));
|
|
168
288
|
}
|
|
169
289
|
/**
|
|
170
290
|
* Uses the `useReflectionMethod` hook to retrieve the reflection method from the context, and then renders a `TSDocReflectionMethod` component with the retrieved reflection method. This is a convenience component that allows you to easily render a TSDoc documentation block for the current reflection method without having to manually retrieve the reflection method from the context.
|
|
171
291
|
*/
|
|
172
292
|
function TSDocContextMethod(props) {
|
|
173
293
|
const reflection = require_core_contexts_reflection.useReflectionMethod();
|
|
174
|
-
return
|
|
175
|
-
when
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
294
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(_alloy_js_core.Show, {
|
|
295
|
+
get when() {
|
|
296
|
+
return (0, _stryke_type_checks.isSetObject)(reflection);
|
|
297
|
+
},
|
|
298
|
+
get children() {
|
|
299
|
+
return (0, _alloy_js_core_jsx_runtime.createComponent)(TSDocReflectionMethod, (0, _alloy_js_core_jsx_runtime.mergeProps)(props, { reflection }));
|
|
300
|
+
}
|
|
180
301
|
});
|
|
181
302
|
}
|
|
182
303
|
|