@alloy-js/go 0.0.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/CHANGELOG.md +1 -0
- package/LICENSE +7 -0
- package/api-extractor.json +4 -0
- package/dist/src/builtins/fmt/fmt.d.ts +147 -0
- package/dist/src/builtins/fmt/fmt.d.ts.map +1 -0
- package/dist/src/builtins/fmt/fmt.js +148 -0
- package/dist/src/builtins/fmt/fmt.js.map +1 -0
- package/dist/src/builtins/index.d.ts +2004 -0
- package/dist/src/builtins/index.d.ts.map +1 -0
- package/dist/src/builtins/index.js +9 -0
- package/dist/src/builtins/index.js.map +1 -0
- package/dist/src/builtins/io/io.d.ts +648 -0
- package/dist/src/builtins/io/io.d.ts.map +1 -0
- package/dist/src/builtins/io/io.js +650 -0
- package/dist/src/builtins/io/io.js.map +1 -0
- package/dist/src/builtins/net/net.d.ts +1210 -0
- package/dist/src/builtins/net/net.d.ts.map +1 -0
- package/dist/src/builtins/net/net.js +1212 -0
- package/dist/src/builtins/net/net.js.map +1 -0
- package/dist/src/components/ImportStatement.d.ts +15 -0
- package/dist/src/components/ImportStatement.d.ts.map +1 -0
- package/dist/src/components/ImportStatement.js +90 -0
- package/dist/src/components/ImportStatement.js.map +1 -0
- package/dist/src/components/ModuleDirectory.d.ts +8 -0
- package/dist/src/components/ModuleDirectory.d.ts.map +1 -0
- package/dist/src/components/ModuleDirectory.js +20 -0
- package/dist/src/components/ModuleDirectory.js.map +1 -0
- package/dist/src/components/Name.d.ts +2 -0
- package/dist/src/components/Name.d.ts.map +1 -0
- package/dist/src/components/Name.js +12 -0
- package/dist/src/components/Name.js.map +1 -0
- package/dist/src/components/Reference.d.ts +6 -0
- package/dist/src/components/Reference.d.ts.map +1 -0
- package/dist/src/components/Reference.js +15 -0
- package/dist/src/components/Reference.js.map +1 -0
- package/dist/src/components/SourceDirectory.d.ts +6 -0
- package/dist/src/components/SourceDirectory.d.ts.map +1 -0
- package/dist/src/components/SourceDirectory.js +30 -0
- package/dist/src/components/SourceDirectory.js.map +1 -0
- package/dist/src/components/SourceFile.d.ts +16 -0
- package/dist/src/components/SourceFile.d.ts.map +1 -0
- package/dist/src/components/SourceFile.js +75 -0
- package/dist/src/components/SourceFile.js.map +1 -0
- package/dist/src/components/doc/comment.d.ts +21 -0
- package/dist/src/components/doc/comment.d.ts.map +1 -0
- package/dist/src/components/doc/comment.js +30 -0
- package/dist/src/components/doc/comment.js.map +1 -0
- package/dist/src/components/doc/comment.test.d.ts +2 -0
- package/dist/src/components/doc/comment.test.d.ts.map +1 -0
- package/dist/src/components/doc/comment.test.js +215 -0
- package/dist/src/components/doc/comment.test.js.map +1 -0
- package/dist/src/components/function/function.d.ts +31 -0
- package/dist/src/components/function/function.d.ts.map +1 -0
- package/dist/src/components/function/function.js +134 -0
- package/dist/src/components/function/function.js.map +1 -0
- package/dist/src/components/function/function.test.d.ts +2 -0
- package/dist/src/components/function/function.test.d.ts.map +1 -0
- package/dist/src/components/function/function.test.js +410 -0
- package/dist/src/components/function/function.test.js.map +1 -0
- package/dist/src/components/index.d.ts +16 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/index.js +16 -0
- package/dist/src/components/index.js.map +1 -0
- package/dist/src/components/interface/declaration.d.ts +68 -0
- package/dist/src/components/interface/declaration.d.ts.map +1 -0
- package/dist/src/components/interface/declaration.js +181 -0
- package/dist/src/components/interface/declaration.js.map +1 -0
- package/dist/src/components/interface/interface.test.d.ts +2 -0
- package/dist/src/components/interface/interface.test.d.ts.map +1 -0
- package/dist/src/components/interface/interface.test.js +517 -0
- package/dist/src/components/interface/interface.test.js.map +1 -0
- package/dist/src/components/package.test.d.ts +2 -0
- package/dist/src/components/package.test.d.ts.map +1 -0
- package/dist/src/components/package.test.js +89 -0
- package/dist/src/components/package.test.js.map +1 -0
- package/dist/src/components/parameters/parameters.d.ts +15 -0
- package/dist/src/components/parameters/parameters.d.ts.map +1 -0
- package/dist/src/components/parameters/parameters.js +58 -0
- package/dist/src/components/parameters/parameters.js.map +1 -0
- package/dist/src/components/parameters/typeparameters.d.ts +25 -0
- package/dist/src/components/parameters/typeparameters.d.ts.map +1 -0
- package/dist/src/components/parameters/typeparameters.js +53 -0
- package/dist/src/components/parameters/typeparameters.js.map +1 -0
- package/dist/src/components/pointer/pointer.d.ts +9 -0
- package/dist/src/components/pointer/pointer.d.ts.map +1 -0
- package/dist/src/components/pointer/pointer.js +8 -0
- package/dist/src/components/pointer/pointer.js.map +1 -0
- package/dist/src/components/stc/index.d.ts +27 -0
- package/dist/src/components/stc/index.d.ts.map +1 -0
- package/dist/src/components/stc/index.js +27 -0
- package/dist/src/components/stc/index.js.map +1 -0
- package/dist/src/components/struct/declaration.d.ts +62 -0
- package/dist/src/components/struct/declaration.d.ts.map +1 -0
- package/dist/src/components/struct/declaration.js +161 -0
- package/dist/src/components/struct/declaration.js.map +1 -0
- package/dist/src/components/struct/struct.test.d.ts +2 -0
- package/dist/src/components/struct/struct.test.d.ts.map +1 -0
- package/dist/src/components/struct/struct.test.js +741 -0
- package/dist/src/components/struct/struct.test.js.map +1 -0
- package/dist/src/components/type/declaration.d.ts +29 -0
- package/dist/src/components/type/declaration.d.ts.map +1 -0
- package/dist/src/components/type/declaration.js +63 -0
- package/dist/src/components/type/declaration.js.map +1 -0
- package/dist/src/components/var/declaration.d.ts +27 -0
- package/dist/src/components/var/declaration.d.ts.map +1 -0
- package/dist/src/components/var/declaration.js +84 -0
- package/dist/src/components/var/declaration.js.map +1 -0
- package/dist/src/components/var/var-declaration.test.d.ts +2 -0
- package/dist/src/components/var/var-declaration.test.d.ts.map +1 -0
- package/dist/src/components/var/var-declaration.test.js +340 -0
- package/dist/src/components/var/var-declaration.test.js.map +1 -0
- package/dist/src/context/package.d.ts +9 -0
- package/dist/src/context/package.d.ts.map +1 -0
- package/dist/src/context/package.js +6 -0
- package/dist/src/context/package.js.map +1 -0
- package/dist/src/create-module.d.ts +47 -0
- package/dist/src/create-module.d.ts.map +1 -0
- package/dist/src/create-module.js +158 -0
- package/dist/src/create-module.js.map +1 -0
- package/dist/src/create-module.test.d.ts +2 -0
- package/dist/src/create-module.test.d.ts.map +1 -0
- package/dist/src/create-module.test.js +147 -0
- package/dist/src/create-module.test.js.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +6 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/name-policy.d.ts +5 -0
- package/dist/src/name-policy.d.ts.map +1 -0
- package/dist/src/name-policy.js +27 -0
- package/dist/src/name-policy.js.map +1 -0
- package/dist/src/scopes/contexts.d.ts +9 -0
- package/dist/src/scopes/contexts.d.ts.map +1 -0
- package/dist/src/scopes/contexts.js +34 -0
- package/dist/src/scopes/contexts.js.map +1 -0
- package/dist/src/scopes/factories.d.ts +7 -0
- package/dist/src/scopes/factories.d.ts.map +1 -0
- package/dist/src/scopes/factories.js +16 -0
- package/dist/src/scopes/factories.js.map +1 -0
- package/dist/src/scopes/function.d.ts +9 -0
- package/dist/src/scopes/function.d.ts.map +1 -0
- package/dist/src/scopes/function.js +14 -0
- package/dist/src/scopes/function.js.map +1 -0
- package/dist/src/scopes/go.d.ts +8 -0
- package/dist/src/scopes/go.d.ts.map +1 -0
- package/dist/src/scopes/go.js +12 -0
- package/dist/src/scopes/go.js.map +1 -0
- package/dist/src/scopes/index.d.ts +10 -0
- package/dist/src/scopes/index.d.ts.map +1 -0
- package/dist/src/scopes/index.js +10 -0
- package/dist/src/scopes/index.js.map +1 -0
- package/dist/src/scopes/lexical.d.ts +8 -0
- package/dist/src/scopes/lexical.d.ts.map +1 -0
- package/dist/src/scopes/lexical.js +11 -0
- package/dist/src/scopes/lexical.js.map +1 -0
- package/dist/src/scopes/module.d.ts +9 -0
- package/dist/src/scopes/module.d.ts.map +1 -0
- package/dist/src/scopes/module.js +31 -0
- package/dist/src/scopes/module.js.map +1 -0
- package/dist/src/scopes/named-type.d.ts +23 -0
- package/dist/src/scopes/named-type.d.ts.map +1 -0
- package/dist/src/scopes/named-type.js +33 -0
- package/dist/src/scopes/named-type.js.map +1 -0
- package/dist/src/scopes/package.d.ts +11 -0
- package/dist/src/scopes/package.d.ts.map +1 -0
- package/dist/src/scopes/package.js +39 -0
- package/dist/src/scopes/package.js.map +1 -0
- package/dist/src/scopes/source-file.d.ts +17 -0
- package/dist/src/scopes/source-file.d.ts.map +1 -0
- package/dist/src/scopes/source-file.js +42 -0
- package/dist/src/scopes/source-file.js.map +1 -0
- package/dist/src/symbols/factories.d.ts +25 -0
- package/dist/src/symbols/factories.d.ts.map +1 -0
- package/dist/src/symbols/factories.js +114 -0
- package/dist/src/symbols/factories.js.map +1 -0
- package/dist/src/symbols/function.d.ts +10 -0
- package/dist/src/symbols/function.d.ts.map +1 -0
- package/dist/src/symbols/function.js +12 -0
- package/dist/src/symbols/function.js.map +1 -0
- package/dist/src/symbols/go.d.ts +22 -0
- package/dist/src/symbols/go.d.ts.map +1 -0
- package/dist/src/symbols/go.js +56 -0
- package/dist/src/symbols/go.js.map +1 -0
- package/dist/src/symbols/index.d.ts +7 -0
- package/dist/src/symbols/index.d.ts.map +1 -0
- package/dist/src/symbols/index.js +7 -0
- package/dist/src/symbols/index.js.map +1 -0
- package/dist/src/symbols/named-type.d.ts +24 -0
- package/dist/src/symbols/named-type.d.ts.map +1 -0
- package/dist/src/symbols/named-type.js +53 -0
- package/dist/src/symbols/named-type.js.map +1 -0
- package/dist/src/symbols/package.d.ts +18 -0
- package/dist/src/symbols/package.d.ts.map +1 -0
- package/dist/src/symbols/package.js +38 -0
- package/dist/src/symbols/package.js.map +1 -0
- package/dist/src/symbols/reference.d.ts +3 -0
- package/dist/src/symbols/reference.d.ts.map +1 -0
- package/dist/src/symbols/reference.js +76 -0
- package/dist/src/symbols/reference.js.map +1 -0
- package/dist/test/utils.d.ts +8 -0
- package/dist/test/utils.d.ts.map +1 -0
- package/dist/test/utils.js +68 -0
- package/dist/test/utils.js.map +1 -0
- package/dist/test/vitest.setup.d.ts +2 -0
- package/dist/test/vitest.setup.d.ts.map +1 -0
- package/dist/test/vitest.setup.js +2 -0
- package/dist/test/vitest.setup.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +45 -0
- package/src/builtins/fmt/fmt.ts +78 -0
- package/src/builtins/index.ts +9 -0
- package/src/builtins/io/io.ts +355 -0
- package/src/builtins/net/net.ts +502 -0
- package/src/components/ImportStatement.tsx +115 -0
- package/src/components/ModuleDirectory.tsx +18 -0
- package/src/components/Name.tsx +11 -0
- package/src/components/Reference.tsx +18 -0
- package/src/components/SourceDirectory.tsx +32 -0
- package/src/components/SourceFile.tsx +74 -0
- package/src/components/doc/comment.test.tsx +278 -0
- package/src/components/doc/comment.tsx +40 -0
- package/src/components/function/function.test.tsx +387 -0
- package/src/components/function/function.tsx +194 -0
- package/src/components/index.ts +15 -0
- package/src/components/interface/declaration.tsx +250 -0
- package/src/components/interface/interface.test.tsx +390 -0
- package/src/components/package.test.tsx +63 -0
- package/src/components/parameters/parameters.tsx +74 -0
- package/src/components/parameters/typeparameters.tsx +78 -0
- package/src/components/pointer/pointer.tsx +12 -0
- package/src/components/stc/index.ts +27 -0
- package/src/components/struct/declaration.tsx +228 -0
- package/src/components/struct/struct.test.tsx +558 -0
- package/src/components/type/declaration.tsx +93 -0
- package/src/components/var/declaration.tsx +138 -0
- package/src/components/var/var-declaration.test.tsx +236 -0
- package/src/context/package.ts +13 -0
- package/src/create-module.test.tsx +128 -0
- package/src/create-module.ts +347 -0
- package/src/index.ts +5 -0
- package/src/name-policy.ts +65 -0
- package/src/scopes/contexts.ts +45 -0
- package/src/scopes/factories.ts +29 -0
- package/src/scopes/function.ts +22 -0
- package/src/scopes/go.ts +18 -0
- package/src/scopes/index.ts +9 -0
- package/src/scopes/lexical.ts +14 -0
- package/src/scopes/module.ts +35 -0
- package/src/scopes/named-type.ts +49 -0
- package/src/scopes/package.ts +55 -0
- package/src/scopes/source-file.ts +66 -0
- package/src/symbols/factories.ts +234 -0
- package/src/symbols/function.ts +17 -0
- package/src/symbols/go.ts +82 -0
- package/src/symbols/index.ts +6 -0
- package/src/symbols/named-type.ts +90 -0
- package/src/symbols/package.ts +54 -0
- package/src/symbols/reference.ts +87 -0
- package/temp/api.json +8753 -0
- package/test/utils.tsx +77 -0
- package/test/vitest.setup.ts +1 -0
- package/tsconfig.json +15 -0
- package/tsdoc-metadata.json +11 -0
- package/vitest.config.ts +13 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { createComponent as _$createComponent, mergeProps as _$mergeProps, memo as _$memo, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
|
|
2
|
+
import { Block, Declaration, DeclarationContext, effect, For, memo, Scope, Show, takeSymbols, useContext, watch } from "@alloy-js/core";
|
|
3
|
+
import { useGoScope, useNamedTypeScope } from "../../scopes/contexts.js";
|
|
4
|
+
import { createFunctionScope, createNamedTypeScope } from "../../scopes/factories.js";
|
|
5
|
+
import { GoNamedTypeScope } from "../../scopes/named-type.js";
|
|
6
|
+
import { createAnonymousTypeSymbol, createInterfaceMemberSymbol } from "../../symbols/factories.js";
|
|
7
|
+
import { LineComment } from "../doc/comment.js";
|
|
8
|
+
import { Name } from "../Name.js";
|
|
9
|
+
import { FunctionParameters } from "../parameters/parameters.js";
|
|
10
|
+
import { TypeDeclaration } from "../type/declaration.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Properties for creating an interface declaration.
|
|
14
|
+
* This can be used for both named and anonymous interfaces.
|
|
15
|
+
* For named interfaces, use `InterfaceTypeDeclarationProps` instead.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Properties for creating a named interface type declaration.
|
|
20
|
+
* This is a combination of `InterfaceDeclarationProps` and `TypeDeclarationProps`.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Wrapper for creating a named interface type declaration.
|
|
25
|
+
*/
|
|
26
|
+
export function InterfaceTypeDeclaration(props) {
|
|
27
|
+
return _$createComponent(TypeDeclaration, _$mergeProps(props, {
|
|
28
|
+
get children() {
|
|
29
|
+
return _$createComponent(InterfaceDeclaration, props);
|
|
30
|
+
}
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Go interface declaration.
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <InterfaceDeclaration>
|
|
39
|
+
* <InterfaceEmbed>{MyOtherInterface}</InterfaceEmbed>
|
|
40
|
+
* <InterfaceFunction name="MyFunc" parameters={params} returns="int" />
|
|
41
|
+
* </InterfaceDeclaration>
|
|
42
|
+
* ```
|
|
43
|
+
* This will produce:
|
|
44
|
+
* ```go
|
|
45
|
+
* interface {
|
|
46
|
+
* MyOtherInterface
|
|
47
|
+
* func MyFunc(param Param) int
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
export function InterfaceDeclaration(props) {
|
|
52
|
+
const scope = useGoScope();
|
|
53
|
+
let interfaceScope;
|
|
54
|
+
if (!(scope instanceof GoNamedTypeScope) || scope.ownerSymbol.typeKind !== "type") {
|
|
55
|
+
const declSymbol = useContext(DeclarationContext);
|
|
56
|
+
// this is an anonymous interface
|
|
57
|
+
if (!declSymbol) {
|
|
58
|
+
// this can only happen when instantiating an interface directly
|
|
59
|
+
const anonymousSymbol = createAnonymousTypeSymbol("interface");
|
|
60
|
+
const anonymousScope = createNamedTypeScope(anonymousSymbol);
|
|
61
|
+
interfaceScope = anonymousScope;
|
|
62
|
+
} else {
|
|
63
|
+
// this is most likely a struct field
|
|
64
|
+
const anonymousScope = createNamedTypeScope(declSymbol);
|
|
65
|
+
interfaceScope = anonymousScope;
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
scope.ownerSymbol.typeKind = "interface";
|
|
69
|
+
}
|
|
70
|
+
const content = memo(() => {
|
|
71
|
+
if (props.children) {
|
|
72
|
+
if (props.singleLine) {
|
|
73
|
+
return ["{", " ", _$memo(() => props.children), " ", "}"];
|
|
74
|
+
} else {
|
|
75
|
+
return [" ", _$createComponent(Block, {
|
|
76
|
+
get children() {
|
|
77
|
+
return props.children;
|
|
78
|
+
}
|
|
79
|
+
})];
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
return "{}";
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
return ["interface", interfaceScope ? _$createComponent(Scope, {
|
|
86
|
+
value: interfaceScope,
|
|
87
|
+
children: content
|
|
88
|
+
}) : content];
|
|
89
|
+
}
|
|
90
|
+
export function InterfaceFunction(props) {
|
|
91
|
+
const symbol = createInterfaceMemberSymbol(props.name, {
|
|
92
|
+
refkeys: props.refkey
|
|
93
|
+
});
|
|
94
|
+
const functionScope = createFunctionScope();
|
|
95
|
+
return _$createComponent(Declaration, {
|
|
96
|
+
symbol: symbol,
|
|
97
|
+
get children() {
|
|
98
|
+
return _$createComponent(Scope, {
|
|
99
|
+
value: functionScope,
|
|
100
|
+
get children() {
|
|
101
|
+
return [_$createComponent(Show, {
|
|
102
|
+
get when() {
|
|
103
|
+
return Boolean(props.doc);
|
|
104
|
+
},
|
|
105
|
+
get children() {
|
|
106
|
+
return [_$createComponent(LineComment, {
|
|
107
|
+
get children() {
|
|
108
|
+
return props.doc;
|
|
109
|
+
}
|
|
110
|
+
}), _$createIntrinsic("hbr", {})];
|
|
111
|
+
}
|
|
112
|
+
}), "func ", _$createComponent(Name, {}), _$createComponent(FunctionParameters, {
|
|
113
|
+
get parameters() {
|
|
114
|
+
return props.parameters;
|
|
115
|
+
}
|
|
116
|
+
}), _$memo(() => _$memo(() => !!props.returns)() ? [" ", _$memo(() => props.returns)] : null)];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
export function InterfaceEmbed(props) {
|
|
123
|
+
let typeName = "<Unresolved symbol>";
|
|
124
|
+
if (props.children) {
|
|
125
|
+
if (typeof props.children === "string") {
|
|
126
|
+
typeName = props.children;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const memberSymbol = createInterfaceMemberSymbol(typeName, {
|
|
130
|
+
refkeys: props.refkey
|
|
131
|
+
});
|
|
132
|
+
const taken = takeSymbols();
|
|
133
|
+
effect(() => {
|
|
134
|
+
if (taken.size !== 1) return;
|
|
135
|
+
const symbol = Array.from(taken)[0];
|
|
136
|
+
memberSymbol.name = symbol.name;
|
|
137
|
+
watch(() => symbol.name, () => {
|
|
138
|
+
memberSymbol.name = symbol.name;
|
|
139
|
+
});
|
|
140
|
+
const namedTypeScope = useNamedTypeScope();
|
|
141
|
+
symbol.copyMembersTo(namedTypeScope.ownerSymbol);
|
|
142
|
+
});
|
|
143
|
+
return _$createComponent(Declaration, {
|
|
144
|
+
symbol: memberSymbol,
|
|
145
|
+
get children() {
|
|
146
|
+
return [_$createComponent(Show, {
|
|
147
|
+
get when() {
|
|
148
|
+
return Boolean(props.doc);
|
|
149
|
+
},
|
|
150
|
+
get children() {
|
|
151
|
+
return [_$createComponent(LineComment, {
|
|
152
|
+
get children() {
|
|
153
|
+
return props.doc;
|
|
154
|
+
}
|
|
155
|
+
}), _$createIntrinsic("hbr", {})];
|
|
156
|
+
}
|
|
157
|
+
}), _$memo(() => props.children)];
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
export function TypeConstraint(props) {
|
|
162
|
+
const constraints = [];
|
|
163
|
+
if (!props.constraints || props.constraints.length === 0) {
|
|
164
|
+
if (props.children) {
|
|
165
|
+
constraints.push(props.children);
|
|
166
|
+
} else {
|
|
167
|
+
throw new Error("TypeConstraint requires constraints or children.");
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
if (props.children) {
|
|
171
|
+
throw new Error("TypeConstraint cannot have both constraints and children.");
|
|
172
|
+
}
|
|
173
|
+
constraints.push(...props.constraints);
|
|
174
|
+
}
|
|
175
|
+
return _$createComponent(For, {
|
|
176
|
+
each: constraints,
|
|
177
|
+
joiner: " | ",
|
|
178
|
+
children: constraint => [constraint]
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
//# sourceMappingURL=declaration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Block","Declaration","DeclarationContext","effect","For","memo","Scope","Show","takeSymbols","useContext","watch","useGoScope","useNamedTypeScope","createFunctionScope","createNamedTypeScope","GoNamedTypeScope","createAnonymousTypeSymbol","createInterfaceMemberSymbol","LineComment","Name","FunctionParameters","TypeDeclaration","InterfaceTypeDeclaration","props","_$createComponent","_$mergeProps","children","InterfaceDeclaration","scope","interfaceScope","ownerSymbol","typeKind","declSymbol","anonymousSymbol","anonymousScope","content","singleLine","_$memo","value","InterfaceFunction","symbol","name","refkeys","refkey","functionScope","when","Boolean","doc","_$createIntrinsic","parameters","returns","InterfaceEmbed","typeName","memberSymbol","taken","size","Array","from","namedTypeScope","copyMembersTo","TypeConstraint","constraints","length","push","Error","each","joiner","constraint"],"sources":["../../../../src/components/interface/declaration.tsx"],"sourcesContent":[null],"mappings":";AAAA,SACEA,KAAK,EAELC,WAAW,EACXC,kBAAkB,EAClBC,MAAM,EACNC,GAAG,EACHC,IAAI,EAGJC,KAAK,EACLC,IAAI,EACJC,WAAW,EACXC,UAAU,EACVC,KAAK,QACA,gBAAgB;AACvB,SAASC,UAAU,EAAEC,iBAAiB,QAAQ,0BAA0B;AACxE,SACEC,mBAAmB,EACnBC,oBAAoB,QACf,2BAA2B;AAClC,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SACEC,yBAAyB,EACzBC,2BAA2B,QACtB,4BAA4B;AAGnC,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,QAAQ,YAAY;AACjC,SAEEC,kBAAkB,QACb,6BAA6B;AACpC,SAASC,eAAe;;AAExB;AACA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA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AI,CAACtC,KAAK,CAACsC,WAAW,IAAItC,KAAK,CAACsC,WAAW,CAACC,MAAM,KAAK,CAAC,EAAE;IACxD,IAAIvC,KAAK,CAACG,QAAQ,EAAE;MAClBmC,WAAW,CAACE,IAAI,CAACxC,KAAK,CAACG,QAAQ,CAAC;IAClC,CAAC,MAAM;MACL,MAAM,IAAIsC,KAAK,CAAC,kDAAkD,CAAC;IACrE;EACF,CAAC,MAAM;IACL,IAAIzC,KAAK,CAACG,QAAQ,EAAE;MAClB,MAAM,IAAIsC,KAAK,CACb,2DACF,CAAC;IACH;IACAH,WAAW,CAACE,IAAI,CAAC,GAAGxC,KAAK,CAACsC,WAAW,CAAC;EACxC;EAEA,OAAArC,iBAAA,CACGpB,GAAG;IAAC6D,IAAI,EAAEJ,WAAW;IAAEK,MAAM;IAAAxC,QAAA,EAC1ByC,UAAU,KAAQA,UAAU;EAAI;AAGxC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.test.d.ts","sourceRoot":"","sources":["../../../../src/components/interface/interface.test.tsx"],"names":[],"mappings":""}
|