@alloy-js/typescript 0.23.0-dev.4 → 0.23.0-dev.6
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/src/components/Interface.d.ts.map +1 -1
- package/dist/src/components/Interface.js +10 -0
- package/dist/src/components/Interface.js.map +1 -1
- package/dist/src/components/MemberExpression.d.ts +1 -1
- package/dist/src/components/MemberExpression.d.ts.map +1 -1
- package/dist/src/components/MemberExpression.js +115 -330
- package/dist/src/components/MemberExpression.js.map +1 -1
- package/dist/src/components/TsConfigJson.d.ts.map +1 -1
- package/dist/src/components/TsConfigJson.js +5 -0
- package/dist/src/components/TsConfigJson.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/Interface.tsx +34 -16
- package/src/components/MemberExpression.tsx +194 -454
- package/src/components/TsConfigJson.tsx +18 -9
- package/temp/api.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alloy-js/typescript",
|
|
3
|
-
"version": "0.23.0-dev.
|
|
3
|
+
"version": "0.23.0-dev.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "brian.terlson@microsoft.com",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@alloy-js/core": "~0.22.0 || >= 0.23.0-dev.
|
|
29
|
+
"@alloy-js/core": "~0.22.0 || >= 0.23.0-dev.11",
|
|
30
30
|
"change-case": "^5.4.4",
|
|
31
31
|
"pathe": "^2.0.3"
|
|
32
32
|
},
|
|
@@ -39,17 +39,26 @@ const _InterfaceDeclaration = ensureTypeRefContext(
|
|
|
39
39
|
function InterfaceDeclaration(props: InterfaceDeclarationProps) {
|
|
40
40
|
const ExprSlot = createSymbolSlot();
|
|
41
41
|
|
|
42
|
-
effect(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
symbol.
|
|
42
|
+
effect(
|
|
43
|
+
() => {
|
|
44
|
+
if (ExprSlot.ref.value) {
|
|
45
|
+
const takenSymbols = ExprSlot.ref.value;
|
|
46
|
+
for (const symbol of takenSymbols) {
|
|
47
|
+
// ignore non-transient symbols (likely not the result of an expression).
|
|
48
|
+
if (symbol.isTransient) {
|
|
49
|
+
symbol.moveMembersTo(sym);
|
|
50
|
+
}
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
+
},
|
|
54
|
+
undefined,
|
|
55
|
+
{
|
|
56
|
+
debug: {
|
|
57
|
+
name: "InterfaceDeclaration:moveExprSlotMembers",
|
|
58
|
+
type: "symbol",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
);
|
|
53
62
|
|
|
54
63
|
const children = childrenArray(() => props.children);
|
|
55
64
|
|
|
@@ -203,13 +212,22 @@ export function InterfaceMember(props: InterfaceMemberProps) {
|
|
|
203
212
|
|
|
204
213
|
const taken = takeSymbols();
|
|
205
214
|
|
|
206
|
-
effect(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
symbol
|
|
211
|
-
|
|
212
|
-
|
|
215
|
+
effect(
|
|
216
|
+
() => {
|
|
217
|
+
if (taken.size > 1) return;
|
|
218
|
+
const symbol = Array.from(taken)[0];
|
|
219
|
+
if (symbol?.isTransient) {
|
|
220
|
+
symbol.moveMembersTo(sym!);
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
undefined,
|
|
224
|
+
{
|
|
225
|
+
debug: {
|
|
226
|
+
name: "InterfaceMember:moveTakenMembers",
|
|
227
|
+
type: "symbol",
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
);
|
|
213
231
|
|
|
214
232
|
return (
|
|
215
233
|
<MemberDeclaration symbol={sym}>
|