@alloy-js/core 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/src/binder.d.ts +43 -18
- package/dist/src/binder.d.ts.map +1 -1
- package/dist/src/binder.js +120 -16
- package/dist/src/binder.js.map +1 -1
- package/dist/src/components/Declaration.d.ts +2 -2
- package/dist/src/components/Declaration.d.ts.map +1 -1
- package/dist/src/components/Declaration.js.map +1 -1
- package/dist/src/components/Indent.d.ts +2 -2
- package/dist/src/components/Indent.d.ts.map +1 -1
- package/dist/src/components/Indent.js.map +1 -1
- package/dist/src/components/MemberDeclaration.d.ts +2 -2
- package/dist/src/components/MemberDeclaration.d.ts.map +1 -1
- package/dist/src/components/MemberDeclaration.js.map +1 -1
- package/dist/src/components/MemberName.d.ts +1 -1
- package/dist/src/components/MemberName.d.ts.map +1 -1
- package/dist/src/components/MemberScope.d.ts +2 -2
- package/dist/src/components/MemberScope.d.ts.map +1 -1
- package/dist/src/components/Name.d.ts +1 -1
- package/dist/src/components/Name.d.ts.map +1 -1
- package/dist/src/components/Output.d.ts +2 -2
- package/dist/src/components/Output.d.ts.map +1 -1
- package/dist/src/components/Output.js +6 -2
- package/dist/src/components/Output.js.map +1 -1
- package/dist/src/components/Scope.d.ts +2 -2
- package/dist/src/components/Scope.d.ts.map +1 -1
- package/dist/src/components/Scope.js.map +1 -1
- package/dist/src/components/SourceDirectory.d.ts +3 -3
- package/dist/src/components/SourceDirectory.d.ts.map +1 -1
- package/dist/src/components/SourceDirectory.js +1 -1
- package/dist/src/components/SourceDirectory.js.map +1 -1
- package/dist/src/components/SourceFile.d.ts +3 -3
- package/dist/src/components/SourceFile.d.ts.map +1 -1
- package/dist/src/components/SourceFile.js +1 -1
- package/dist/src/components/SourceFile.js.map +1 -1
- package/dist/src/components/stc/index.d.ts +18 -18
- package/dist/src/context/assignment.d.ts.map +1 -1
- package/dist/src/context/assignment.js +2 -2
- package/dist/src/context/assignment.js.map +1 -1
- package/dist/src/context/binder.d.ts.map +1 -1
- package/dist/src/context/binder.js +2 -2
- package/dist/src/context/binder.js.map +1 -1
- package/dist/src/context/declaration.d.ts.map +1 -1
- package/dist/src/context/declaration.js +2 -2
- package/dist/src/context/declaration.js.map +1 -1
- package/dist/src/context/indent.d.ts.map +1 -1
- package/dist/src/context/indent.js +2 -2
- package/dist/src/context/indent.js.map +1 -1
- package/dist/src/context/member-declaration.d.ts +1 -0
- package/dist/src/context/member-declaration.d.ts.map +1 -1
- package/dist/src/context/member-declaration.js +5 -2
- package/dist/src/context/member-declaration.js.map +1 -1
- package/dist/src/context/member-scope.d.ts.map +1 -1
- package/dist/src/context/member-scope.js +2 -2
- package/dist/src/context/member-scope.js.map +1 -1
- package/dist/src/context/name-policy.d.ts.map +1 -1
- package/dist/src/context/name-policy.js +2 -2
- package/dist/src/context/name-policy.js.map +1 -1
- package/dist/src/context/scope.d.ts.map +1 -1
- package/dist/src/context/scope.js +2 -2
- package/dist/src/context/scope.js.map +1 -1
- package/dist/src/context/source-directory.d.ts.map +1 -1
- package/dist/src/context/source-directory.js +2 -2
- package/dist/src/context/source-directory.js.map +1 -1
- package/dist/src/context/source-file.d.ts.map +1 -1
- package/dist/src/context/source-file.js +2 -2
- package/dist/src/context/source-file.js.map +1 -1
- package/dist/src/context.d.ts +5 -2
- package/dist/src/context.d.ts.map +1 -1
- package/dist/src/context.js +11 -4
- package/dist/src/context.js.map +1 -1
- package/dist/src/debug.d.ts +14 -0
- package/dist/src/debug.d.ts.map +1 -0
- package/dist/src/debug.js +163 -0
- package/dist/src/debug.js.map +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/jsx-runtime.d.ts +27 -4
- package/dist/src/jsx-runtime.d.ts.map +1 -1
- package/dist/src/jsx-runtime.js +20 -7
- package/dist/src/jsx-runtime.js.map +1 -1
- package/dist/src/render.d.ts +1 -1
- package/dist/src/render.d.ts.map +1 -1
- package/dist/src/render.js +15 -13
- package/dist/src/render.js.map +1 -1
- package/dist/src/slot.d.ts +15 -0
- package/dist/src/slot.d.ts.map +1 -0
- package/dist/src/slot.js +51 -0
- package/dist/src/slot.js.map +1 -0
- package/dist/src/tap.d.ts +19 -0
- package/dist/src/tap.d.ts.map +1 -0
- package/dist/src/tap.js +39 -0
- package/dist/src/tap.js.map +1 -0
- package/dist/src/utils.d.ts +1 -6
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/src/utils.js +1 -34
- package/dist/src/utils.js.map +1 -1
- package/dist/src/write-output.browser.d.ts +2 -0
- package/dist/src/write-output.browser.d.ts.map +1 -0
- package/dist/src/write-output.browser.js +4 -0
- package/dist/src/write-output.browser.js.map +1 -0
- package/dist/src/write-output.d.ts +7 -0
- package/dist/src/write-output.d.ts.map +1 -0
- package/dist/src/write-output.js +34 -0
- package/dist/src/write-output.js.map +1 -0
- package/dist/test/components/slot.test.d.ts +2 -0
- package/dist/test/components/slot.test.d.ts.map +1 -0
- package/dist/testing/render.d.ts +1 -1
- package/dist/testing/render.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -6
- package/src/binder.ts +214 -50
- package/src/components/Declaration.tsx +1 -1
- package/src/components/Indent.tsx +1 -1
- package/src/components/MemberDeclaration.tsx +1 -1
- package/src/components/MemberScope.tsx +1 -1
- package/src/components/Output.tsx +4 -2
- package/src/components/Scope.tsx +1 -1
- package/src/components/SourceDirectory.tsx +2 -2
- package/src/components/SourceFile.tsx +2 -6
- package/src/context/assignment.ts +6 -2
- package/src/context/binder.ts +7 -2
- package/src/context/declaration.ts +2 -2
- package/src/context/indent.ts +13 -6
- package/src/context/member-declaration.ts +10 -2
- package/src/context/member-scope.ts +6 -2
- package/src/context/name-policy.ts +6 -2
- package/src/context/scope.ts +7 -2
- package/src/context/source-directory.ts +2 -2
- package/src/context/source-file.ts +2 -2
- package/src/context.ts +15 -4
- package/src/debug.ts +209 -0
- package/src/index.ts +3 -1
- package/src/jsx-runtime.ts +46 -11
- package/src/render.ts +21 -19
- package/src/slot.ts +90 -0
- package/src/tap.ts +69 -0
- package/src/utils.ts +2 -34
- package/src/write-output.browser.ts +3 -0
- package/src/write-output.ts +33 -0
- package/temp/api.json +1848 -203
- package/test/components/slot.test.tsx +172 -0
- package/test/rendering/basic.test.tsx +1 -1
- package/test/symbols.test.ts +161 -3
- package/testing/render.ts +1 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { it } from "vitest";
|
|
2
|
+
import { Output } from "../../src/components/Output.jsx";
|
|
3
|
+
import { SourceFile } from "../../src/components/SourceFile.jsx";
|
|
4
|
+
import {
|
|
5
|
+
Declaration,
|
|
6
|
+
Name,
|
|
7
|
+
OutputSymbol,
|
|
8
|
+
Ref,
|
|
9
|
+
refkey,
|
|
10
|
+
Scope,
|
|
11
|
+
useBinder,
|
|
12
|
+
} from "../../src/index.js";
|
|
13
|
+
import { render } from "../../src/render.js";
|
|
14
|
+
import { defineSlot, rename, replace } from "../../src/slot.js";
|
|
15
|
+
import "../../testing/extend-expect.js";
|
|
16
|
+
|
|
17
|
+
it("works with string keys", () => {
|
|
18
|
+
interface FunctionSlotProps extends FunctionComponentProps {
|
|
19
|
+
additionalProp: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const FunctionSlot = defineSlot<FunctionSlotProps>(
|
|
23
|
+
(query: { name: string }) => query.name,
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
interface FunctionComponentProps {
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function MyFunctionComponent(props: FunctionComponentProps) {
|
|
31
|
+
const FunctionSlotInstance = FunctionSlot.create(
|
|
32
|
+
props.name,
|
|
33
|
+
{ ...props, additionalProp: "hi" },
|
|
34
|
+
<>
|
|
35
|
+
function {props.name}() {"{"}
|
|
36
|
+
console.log("hello world");
|
|
37
|
+
{"}"}
|
|
38
|
+
</>,
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
return <FunctionSlotInstance />;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// extension.tsx
|
|
45
|
+
replace(FunctionSlot.find({ name: "foo" }), (props: any) => {
|
|
46
|
+
return <>
|
|
47
|
+
// original
|
|
48
|
+
{ props.original }
|
|
49
|
+
</>;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const tree = render(
|
|
53
|
+
<Output>
|
|
54
|
+
<SourceFile path="test.ts" filetype="ts">
|
|
55
|
+
<MyFunctionComponent name="foo" />
|
|
56
|
+
</SourceFile>
|
|
57
|
+
</Output>,
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
console.log(tree.contents[0].contents);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("works with symbols", () => {
|
|
64
|
+
interface FunctionSlotProps extends FunctionComponentProps {
|
|
65
|
+
additionalProp: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const FunctionSlot = defineSlot<FunctionSlotProps>((query: {
|
|
69
|
+
fqn: string;
|
|
70
|
+
}) => {
|
|
71
|
+
const binder = useBinder();
|
|
72
|
+
return binder.resolveFQN(query.fqn);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
interface FunctionComponentProps {
|
|
76
|
+
name: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function MyFunctionComponent(props: FunctionComponentProps) {
|
|
80
|
+
const binder = useBinder();
|
|
81
|
+
const sym = binder.createSymbol({
|
|
82
|
+
name: props.name,
|
|
83
|
+
refkey: refkey(),
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const FunctionSlotInstance = FunctionSlot.create(
|
|
87
|
+
sym,
|
|
88
|
+
{ ...props, additionalProp: "hi" },
|
|
89
|
+
<Declaration symbol={sym}>
|
|
90
|
+
function <Name />() {"{"}
|
|
91
|
+
console.log("hello world");
|
|
92
|
+
{"}"}
|
|
93
|
+
</Declaration>,
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
return <FunctionSlotInstance />;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// extension.tsx
|
|
100
|
+
replace(FunctionSlot.find({ fqn: "foo.bar" }), (props: any) => {
|
|
101
|
+
return <>
|
|
102
|
+
// original
|
|
103
|
+
{ props.original }
|
|
104
|
+
</>;
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const tree = render(
|
|
108
|
+
<Output>
|
|
109
|
+
<SourceFile path="test.ts" filetype="ts">
|
|
110
|
+
<Scope name="foo">
|
|
111
|
+
<MyFunctionComponent name="bar" />
|
|
112
|
+
</Scope>
|
|
113
|
+
</SourceFile>
|
|
114
|
+
</Output>,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
console.log(tree.contents[0].contents);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
it("can rename", () => {
|
|
121
|
+
interface FunctionSlotProps extends FunctionComponentProps {
|
|
122
|
+
additionalProp: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const FunctionSlot = defineSlot<FunctionSlotProps>((query: {
|
|
126
|
+
fqn: string;
|
|
127
|
+
}) => {
|
|
128
|
+
const binder = useBinder();
|
|
129
|
+
return binder.resolveFQN(query.fqn);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
interface FunctionComponentProps {
|
|
133
|
+
name: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function MyFunctionComponent(props: FunctionComponentProps) {
|
|
137
|
+
const binder = useBinder();
|
|
138
|
+
const sym = binder.createSymbol({
|
|
139
|
+
name: props.name,
|
|
140
|
+
refkey: refkey(),
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
const FunctionSlotInstance = FunctionSlot.create(
|
|
144
|
+
sym,
|
|
145
|
+
{ ...props, additionalProp: "hi" },
|
|
146
|
+
<Declaration symbol={sym}>
|
|
147
|
+
function <Name />() {"{"}
|
|
148
|
+
console.log("hello world");
|
|
149
|
+
{"}"}
|
|
150
|
+
</Declaration>,
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
return <FunctionSlotInstance />;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
rename(() => {
|
|
157
|
+
const binder = useBinder();
|
|
158
|
+
return binder.resolveFQN("foo.bar") as Ref<OutputSymbol | undefined>;
|
|
159
|
+
}, "bazxxx");
|
|
160
|
+
|
|
161
|
+
const tree = render(
|
|
162
|
+
<Output>
|
|
163
|
+
<SourceFile path="test.ts" filetype="ts">
|
|
164
|
+
<Scope name="foo">
|
|
165
|
+
<MyFunctionComponent name="bar" />
|
|
166
|
+
</Scope>
|
|
167
|
+
</SourceFile>
|
|
168
|
+
</Output>,
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
console.log(tree.contents[0].contents);
|
|
172
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Children } from "@alloy-js/core/jsx-runtime";
|
|
2
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { Children } from "../../src/jsx-runtime.js";
|
|
3
3
|
import "../../testing/extend-expect.js";
|
|
4
4
|
describe("string nodes", () => {
|
|
5
5
|
it("renders string nodes", () => {
|
package/test/symbols.test.ts
CHANGED
|
@@ -20,7 +20,6 @@ it("works", () => {
|
|
|
20
20
|
const symbol = binder.createSymbol({
|
|
21
21
|
name: "sym",
|
|
22
22
|
scope,
|
|
23
|
-
refkey: "foo",
|
|
24
23
|
});
|
|
25
24
|
|
|
26
25
|
expect([...scope.getSymbolNames()]).toEqual(["sym"]);
|
|
@@ -41,13 +40,11 @@ it("resolves symbol conflicts", () => {
|
|
|
41
40
|
const _s1 = binder.createSymbol({
|
|
42
41
|
name: "sym",
|
|
43
42
|
scope,
|
|
44
|
-
refkey: "foo",
|
|
45
43
|
});
|
|
46
44
|
|
|
47
45
|
const s2 = binder.createSymbol({
|
|
48
46
|
name: "sym",
|
|
49
47
|
scope,
|
|
50
|
-
refkey: "foo",
|
|
51
48
|
});
|
|
52
49
|
|
|
53
50
|
expect(s2.name).toEqual("sym_2");
|
|
@@ -404,3 +401,164 @@ describe("instantiating members", () => {
|
|
|
404
401
|
).toBeDefined();
|
|
405
402
|
});
|
|
406
403
|
});
|
|
404
|
+
|
|
405
|
+
describe("symbol name resolution", () => {
|
|
406
|
+
it("resolves static symbols", () => {
|
|
407
|
+
const binder = createOutputBinder();
|
|
408
|
+
const {
|
|
409
|
+
symbols: { static: staticSym },
|
|
410
|
+
} = createScopeTree(binder, {
|
|
411
|
+
root: {
|
|
412
|
+
symbols: {
|
|
413
|
+
root: {
|
|
414
|
+
flags:
|
|
415
|
+
OutputSymbolFlags.InstanceMemberContainer |
|
|
416
|
+
OutputSymbolFlags.StaticMemberContainer,
|
|
417
|
+
staticMembers: {
|
|
418
|
+
static: {
|
|
419
|
+
flags: OutputSymbolFlags.StaticMember,
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
const result = binder.resolveFQN("root.root.static");
|
|
428
|
+
expect(result.value).toEqual(staticSym);
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
it("resolves static symbols that are added later", () => {
|
|
432
|
+
const binder = createOutputBinder();
|
|
433
|
+
const result = binder.resolveFQN("root.root.static");
|
|
434
|
+
expect(result.value).toBeUndefined();
|
|
435
|
+
|
|
436
|
+
const {
|
|
437
|
+
symbols: { static: staticSym },
|
|
438
|
+
} = createScopeTree(binder, {
|
|
439
|
+
root: {
|
|
440
|
+
symbols: {
|
|
441
|
+
root: {
|
|
442
|
+
flags:
|
|
443
|
+
OutputSymbolFlags.InstanceMemberContainer |
|
|
444
|
+
OutputSymbolFlags.StaticMemberContainer,
|
|
445
|
+
staticMembers: {
|
|
446
|
+
static: {
|
|
447
|
+
flags: OutputSymbolFlags.StaticMember,
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
expect(result.value).toEqual(staticSym);
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
it("resolves instance symbols", () => {
|
|
459
|
+
const binder = createOutputBinder();
|
|
460
|
+
const {
|
|
461
|
+
symbols: { instance },
|
|
462
|
+
} = createScopeTree(binder, {
|
|
463
|
+
root: {
|
|
464
|
+
symbols: {
|
|
465
|
+
root: {
|
|
466
|
+
flags: OutputSymbolFlags.InstanceMemberContainer,
|
|
467
|
+
instanceMembers: {
|
|
468
|
+
instance: {
|
|
469
|
+
flags: OutputSymbolFlags.InstanceMember,
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
const result = binder.resolveFQN("root.root#instance");
|
|
478
|
+
expect(result.value).toEqual(instance);
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
it("resolves instance symbols that are added later", () => {
|
|
482
|
+
const binder = createOutputBinder();
|
|
483
|
+
const result = binder.resolveFQN("root.root#instance");
|
|
484
|
+
expect(result.value).toBeUndefined();
|
|
485
|
+
|
|
486
|
+
const {
|
|
487
|
+
symbols: { instance },
|
|
488
|
+
} = createScopeTree(binder, {
|
|
489
|
+
root: {
|
|
490
|
+
symbols: {
|
|
491
|
+
root: {
|
|
492
|
+
flags: OutputSymbolFlags.InstanceMemberContainer,
|
|
493
|
+
instanceMembers: {
|
|
494
|
+
instance: {
|
|
495
|
+
flags: OutputSymbolFlags.InstanceMember,
|
|
496
|
+
},
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
expect(result.value).toEqual(instance);
|
|
504
|
+
});
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
describe("refkey resolution", () => {
|
|
508
|
+
it("resolves existing symbols by refkey", () => {
|
|
509
|
+
const key = refkey();
|
|
510
|
+
const binder = createOutputBinder();
|
|
511
|
+
const sym = binder.createSymbol({
|
|
512
|
+
name: "foo",
|
|
513
|
+
refkey: key,
|
|
514
|
+
scope: binder.globalScope,
|
|
515
|
+
});
|
|
516
|
+
|
|
517
|
+
const resolvedSym = binder.resolveDeclarationByKey(
|
|
518
|
+
undefined,
|
|
519
|
+
undefined,
|
|
520
|
+
key,
|
|
521
|
+
);
|
|
522
|
+
expect(resolvedSym.value?.targetDeclaration).toBe(sym);
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
it("resolves symbols by refkey when symbol is added later", () => {
|
|
526
|
+
const key = refkey();
|
|
527
|
+
const binder = createOutputBinder();
|
|
528
|
+
|
|
529
|
+
const resolvedSym = binder.resolveDeclarationByKey(
|
|
530
|
+
undefined,
|
|
531
|
+
undefined,
|
|
532
|
+
key,
|
|
533
|
+
);
|
|
534
|
+
|
|
535
|
+
const sym = binder.createSymbol({
|
|
536
|
+
name: "foo",
|
|
537
|
+
refkey: key,
|
|
538
|
+
scope: binder.globalScope,
|
|
539
|
+
});
|
|
540
|
+
|
|
541
|
+
expect(resolvedSym.value?.targetDeclaration).toBe(sym);
|
|
542
|
+
});
|
|
543
|
+
|
|
544
|
+
it("resolves symbols by refkey when refkey is added later", () => {
|
|
545
|
+
const key = refkey();
|
|
546
|
+
const binder = createOutputBinder();
|
|
547
|
+
|
|
548
|
+
const resolvedSym = binder.resolveDeclarationByKey(
|
|
549
|
+
undefined,
|
|
550
|
+
undefined,
|
|
551
|
+
key,
|
|
552
|
+
);
|
|
553
|
+
|
|
554
|
+
const sym = binder.createSymbol({
|
|
555
|
+
name: "foo",
|
|
556
|
+
scope: binder.globalScope,
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
expect(resolvedSym.value).toBe(undefined);
|
|
560
|
+
|
|
561
|
+
sym.refkey = key;
|
|
562
|
+
expect(resolvedSym.value?.targetDeclaration).toBe(sym);
|
|
563
|
+
});
|
|
564
|
+
});
|
package/testing/render.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RenderTextTree, renderTree } from "@alloy-js/core";
|
|
2
|
-
import { Children } from "
|
|
2
|
+
import { Children } from "../src/jsx-runtime.js";
|
|
3
3
|
|
|
4
4
|
export function printTree(tree: RenderTextTree) {
|
|
5
5
|
return (tree as any).flat(Infinity).join("");
|