@esportsplus/reactivity 0.36.7 → 0.37.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/bench/cellx.bench.ts +4 -4
- package/bench/dynamic.bench.ts +10 -9
- package/bench/kairo.bench.ts +28 -33
- package/bench/molbench.bench.ts +4 -4
- package/bench/reactive/array.bench.ts +163 -163
- package/bench/reactive/reactive-object.bench.ts +47 -45
- package/bench/system.bench.ts +263 -263
- package/build/compiler/array.js +68 -73
- package/build/compiler/bindings.d.ts +19 -0
- package/build/compiler/bindings.js +65 -0
- package/build/compiler/index.js +15 -6
- package/build/compiler/object.js +10 -6
- package/build/compiler/primitives.js +137 -138
- package/build/compiler/types.d.ts +7 -2
- package/build/constants.d.ts +1 -1
- package/build/constants.js +4 -4
- package/build/reactive/array.js +19 -12
- package/build/system.js +1 -1
- package/package.json +2 -2
- package/pnpm-workspace.yaml +2 -4
- package/src/compiler/array.ts +86 -89
- package/src/compiler/bindings.ts +100 -0
- package/src/compiler/index.ts +22 -9
- package/src/compiler/object.ts +12 -7
- package/src/compiler/primitives.ts +190 -187
- package/src/compiler/types.ts +7 -2
- package/src/constants.ts +5 -5
- package/src/reactive/array.ts +27 -14
- package/src/system.ts +3 -1
- package/test/async-iterable.test.ts +42 -0
- package/test/compiler/compiler.test.ts +115 -45
- package/test/reactive/array.test.ts +54 -14
- package/vitest.config.ts +2 -2
package/bench/system.bench.ts
CHANGED
|
@@ -1,371 +1,371 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { test } from 'vitest';
|
|
2
2
|
import { computed, dispose, effect, onCleanup, read, root, signal, write } from '~/system';
|
|
3
|
+
import type { Computed } from '~/system';
|
|
3
4
|
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
bench(
|
|
7
|
-
signal(
|
|
8
|
-
|
|
6
|
+
test('signal', async ({ bench }) => {
|
|
7
|
+
await bench.compare(
|
|
8
|
+
bench('create signal', () => {
|
|
9
|
+
signal(0);
|
|
10
|
+
}),
|
|
11
|
+
bench('read signal (no observer)', () => {
|
|
12
|
+
let s = signal(0);
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
read(s);
|
|
15
|
+
}),
|
|
16
|
+
bench('write signal (no subscribers)', () => {
|
|
17
|
+
let s = signal(0);
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
write(s, 1);
|
|
20
|
+
}),
|
|
21
|
+
bench('write signal (1 subscriber)', () => {
|
|
22
|
+
let s = signal(0),
|
|
23
|
+
i = 0;
|
|
15
24
|
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
effect(() => {
|
|
26
|
+
read(s);
|
|
27
|
+
});
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
write(s, ++i);
|
|
30
|
+
}),
|
|
31
|
+
bench('write + read cycle', () => {
|
|
32
|
+
let s = signal(0);
|
|
21
33
|
|
|
22
|
-
|
|
23
|
-
let s = signal(0),
|
|
24
|
-
i = 0;
|
|
34
|
+
write(s, 1);
|
|
25
35
|
|
|
26
|
-
effect(() => {
|
|
27
36
|
read(s);
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
write(s, ++i);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
bench('write + read cycle', () => {
|
|
34
|
-
let s = signal(0);
|
|
35
|
-
|
|
36
|
-
write(s, 1);
|
|
37
|
-
|
|
38
|
-
read(s);
|
|
39
|
-
});
|
|
37
|
+
})
|
|
38
|
+
);
|
|
40
39
|
});
|
|
41
40
|
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
bench(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
computed(() => read(s));
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
bench('read computed', () => {
|
|
51
|
-
let s = signal(0),
|
|
52
|
-
c = computed(() => read(s));
|
|
53
|
-
|
|
54
|
-
read(c);
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
bench('computed chain (depth 5)', () => {
|
|
58
|
-
let s = signal(0),
|
|
59
|
-
c1 = computed(() => read(s) + 1),
|
|
60
|
-
c2 = computed(() => read(c1) + 1),
|
|
61
|
-
c3 = computed(() => read(c2) + 1),
|
|
62
|
-
c4 = computed(() => read(c3) + 1),
|
|
63
|
-
c5 = computed(() => read(c4) + 1);
|
|
42
|
+
test('computed', async ({ bench }) => {
|
|
43
|
+
await bench.compare(
|
|
44
|
+
bench('create computed', () => {
|
|
45
|
+
let s = signal(0);
|
|
64
46
|
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
computed(() => read(s));
|
|
48
|
+
}),
|
|
49
|
+
bench('read computed', () => {
|
|
50
|
+
let s = signal(0),
|
|
51
|
+
c = computed(() => read(s));
|
|
67
52
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
53
|
+
read(c);
|
|
54
|
+
}),
|
|
55
|
+
bench('computed chain (depth 5)', () => {
|
|
56
|
+
let s = signal(0),
|
|
57
|
+
c1 = computed(() => read(s) + 1),
|
|
58
|
+
c2 = computed(() => read(c1) + 1),
|
|
59
|
+
c3 = computed(() => read(c2) + 1),
|
|
60
|
+
c4 = computed(() => read(c3) + 1),
|
|
61
|
+
c5 = computed(() => read(c4) + 1);
|
|
62
|
+
|
|
63
|
+
read(c5);
|
|
64
|
+
}),
|
|
65
|
+
bench('computed diamond', () => {
|
|
66
|
+
let s = signal(0),
|
|
67
|
+
a = computed(() => read(s) + 1),
|
|
68
|
+
b = computed(() => read(s) * 2),
|
|
69
|
+
c = computed(() => read(a) + read(b));
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
read(c);
|
|
72
|
+
})
|
|
73
|
+
);
|
|
76
74
|
});
|
|
77
75
|
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
bench(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
test('asyncComputed', async ({ bench }) => {
|
|
78
|
+
await bench.compare(
|
|
79
|
+
bench('create asyncComputed', () => {
|
|
80
|
+
computed(() => Promise.resolve(0));
|
|
81
|
+
}),
|
|
82
|
+
bench('create asyncComputed from signal', () => {
|
|
83
|
+
let s = signal(0);
|
|
86
84
|
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
computed(() => Promise.resolve(read(s)));
|
|
86
|
+
})
|
|
87
|
+
);
|
|
89
88
|
});
|
|
90
89
|
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
bench(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
stop();
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
bench('effect with 1 signal', () => {
|
|
100
|
-
let s = signal(0);
|
|
101
|
-
|
|
102
|
-
let stop = effect(() => {
|
|
103
|
-
read(s);
|
|
104
|
-
});
|
|
91
|
+
test('effect', async ({ bench }) => {
|
|
92
|
+
await bench.compare(
|
|
93
|
+
bench('create + dispose effect', () => {
|
|
94
|
+
let stop = effect(() => {});
|
|
105
95
|
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
stop();
|
|
97
|
+
}),
|
|
98
|
+
bench('effect with 1 signal', () => {
|
|
99
|
+
let s = signal(0);
|
|
108
100
|
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
let stop = effect(() => {
|
|
102
|
+
read(s);
|
|
103
|
+
});
|
|
111
104
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
105
|
+
stop();
|
|
106
|
+
}),
|
|
107
|
+
bench('effect with 10 signals', () => {
|
|
108
|
+
let signals: ReturnType<typeof signal<number>>[] = [];
|
|
115
109
|
|
|
116
|
-
let stop = effect(() => {
|
|
117
110
|
for (let i = 0; i < 10; i++) {
|
|
118
|
-
|
|
111
|
+
signals.push(signal(i));
|
|
119
112
|
}
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
stop();
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
|
|
126
113
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
114
|
+
let stop = effect(() => {
|
|
115
|
+
for (let i = 0; i < 10; i++) {
|
|
116
|
+
read(signals[i]);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
131
119
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
120
|
+
stop();
|
|
121
|
+
})
|
|
122
|
+
);
|
|
123
|
+
});
|
|
135
124
|
|
|
136
|
-
write(s, ++i);
|
|
137
|
-
});
|
|
138
125
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
126
|
+
test('propagation', async ({ bench }) => {
|
|
127
|
+
await bench.compare(
|
|
128
|
+
bench('1 signal → 1 effect (sync write)', () => {
|
|
129
|
+
let s = signal(0),
|
|
130
|
+
i = 0;
|
|
142
131
|
|
|
143
|
-
for (let j = 0; j < 10; j++) {
|
|
144
132
|
effect(() => {
|
|
145
133
|
read(s);
|
|
146
134
|
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
write(s, ++i);
|
|
150
|
-
});
|
|
151
135
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
136
|
+
write(s, ++i);
|
|
137
|
+
}),
|
|
138
|
+
bench('1 signal → 10 effects (sync write)', () => {
|
|
139
|
+
let s = signal(0),
|
|
140
|
+
i = 0;
|
|
155
141
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
142
|
+
for (let j = 0; j < 10; j++) {
|
|
143
|
+
effect(() => {
|
|
144
|
+
read(s);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
159
147
|
|
|
160
|
-
|
|
161
|
-
|
|
148
|
+
write(s, ++i);
|
|
149
|
+
}),
|
|
150
|
+
bench('10 signals → 1 computed → 1 effect', () => {
|
|
151
|
+
let signals: ReturnType<typeof signal<number>>[] = [],
|
|
152
|
+
i = 0;
|
|
162
153
|
|
|
163
154
|
for (let j = 0; j < 10; j++) {
|
|
164
|
-
|
|
155
|
+
signals.push(signal(j));
|
|
165
156
|
}
|
|
166
157
|
|
|
167
|
-
|
|
168
|
-
|
|
158
|
+
let c = computed(() => {
|
|
159
|
+
let sum = 0;
|
|
169
160
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
161
|
+
for (let j = 0; j < 10; j++) {
|
|
162
|
+
sum += read(signals[j]);
|
|
163
|
+
}
|
|
173
164
|
|
|
174
|
-
|
|
175
|
-
|
|
165
|
+
return sum;
|
|
166
|
+
});
|
|
176
167
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
i = 0;
|
|
168
|
+
effect(() => {
|
|
169
|
+
read(c);
|
|
170
|
+
});
|
|
181
171
|
|
|
182
|
-
|
|
172
|
+
write(signals[0], ++i);
|
|
173
|
+
}),
|
|
174
|
+
bench('deep chain (10 computeds)', () => {
|
|
175
|
+
let s = signal(0),
|
|
176
|
+
chain: Computed<number>[] = [],
|
|
177
|
+
i = 0;
|
|
183
178
|
|
|
184
|
-
|
|
185
|
-
let prev = chain[j - 1];
|
|
179
|
+
chain[0] = computed(() => read(s) + 1);
|
|
186
180
|
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
for (let j = 1; j < 10; j++) {
|
|
182
|
+
let prev = chain[j - 1];
|
|
189
183
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
});
|
|
184
|
+
chain[j] = computed(() => read(prev) + 1);
|
|
185
|
+
}
|
|
193
186
|
|
|
194
|
-
|
|
195
|
-
|
|
187
|
+
effect(() => {
|
|
188
|
+
read(chain[9]);
|
|
189
|
+
});
|
|
196
190
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
191
|
+
write(s, ++i);
|
|
192
|
+
}),
|
|
193
|
+
bench('wide fan-out (1 signal → 100 computeds)', () => {
|
|
194
|
+
let s = signal(0),
|
|
195
|
+
i = 0;
|
|
200
196
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
for (let j = 0; j < 100; j++) {
|
|
198
|
+
computed(() => read(s) + j);
|
|
199
|
+
}
|
|
204
200
|
|
|
205
|
-
|
|
206
|
-
|
|
201
|
+
write(s, ++i);
|
|
202
|
+
})
|
|
203
|
+
);
|
|
207
204
|
});
|
|
208
205
|
|
|
209
206
|
|
|
210
|
-
|
|
211
|
-
bench(
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
for (let i = 0; i < 100; i++) {
|
|
215
|
-
computeds.push(computed(() => i));
|
|
216
|
-
}
|
|
207
|
+
test('memory', async ({ bench }) => {
|
|
208
|
+
await bench.compare(
|
|
209
|
+
bench('create + dispose 100 computeds', () => {
|
|
210
|
+
let computeds: ReturnType<typeof computed<number>>[] = [];
|
|
217
211
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
});
|
|
212
|
+
for (let i = 0; i < 100; i++) {
|
|
213
|
+
computeds.push(computed(() => i));
|
|
214
|
+
}
|
|
222
215
|
|
|
223
|
-
|
|
224
|
-
|
|
216
|
+
for (let i = 0; i < 100; i++) {
|
|
217
|
+
dispose(computeds[i]);
|
|
218
|
+
}
|
|
219
|
+
}),
|
|
220
|
+
bench('link pool (create + dispose cycle)', () => {
|
|
221
|
+
let s = signal(0);
|
|
225
222
|
|
|
226
|
-
|
|
227
|
-
|
|
223
|
+
for (let i = 0; i < 100; i++) {
|
|
224
|
+
let c = computed(() => read(s));
|
|
228
225
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
let s = signal(0);
|
|
226
|
+
read(c);
|
|
227
|
+
dispose(c);
|
|
228
|
+
}
|
|
229
|
+
}),
|
|
230
|
+
bench('root scope create + dispose', () => {
|
|
231
|
+
root((dispose) => {
|
|
232
|
+
let s = signal(0);
|
|
237
233
|
|
|
238
|
-
|
|
234
|
+
computed(() => read(s));
|
|
239
235
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
236
|
+
dispose();
|
|
237
|
+
});
|
|
238
|
+
})
|
|
239
|
+
);
|
|
243
240
|
});
|
|
244
241
|
|
|
245
242
|
|
|
246
|
-
|
|
247
|
-
bench('create + dispose 1000 effects (pool recycling)', () => {
|
|
243
|
+
test('effect stress', async ({ bench }) => {
|
|
244
|
+
await bench('create + dispose 1000 effects (pool recycling)', () => {
|
|
248
245
|
for (let i = 0; i < 1000; i++) {
|
|
249
246
|
let stop = effect(() => {});
|
|
250
247
|
|
|
251
248
|
stop();
|
|
252
249
|
}
|
|
253
|
-
});
|
|
250
|
+
}).run();
|
|
254
251
|
});
|
|
255
252
|
|
|
256
253
|
|
|
257
|
-
|
|
258
|
-
bench(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
254
|
+
test('deep propagation', async ({ bench }) => {
|
|
255
|
+
await bench.compare(
|
|
256
|
+
bench('deep chain (50 computeds)', () => {
|
|
257
|
+
let s = signal(0),
|
|
258
|
+
chain: Computed<number>[] = [],
|
|
259
|
+
i = 0;
|
|
262
260
|
|
|
263
|
-
|
|
261
|
+
chain[0] = computed(() => read(s) + 1);
|
|
264
262
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
chain[j] = computed(() => read(prev) + 1);
|
|
269
|
-
}
|
|
263
|
+
for (let j = 1; j < 50; j++) {
|
|
264
|
+
let prev = chain[j - 1];
|
|
270
265
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
});
|
|
266
|
+
chain[j] = computed(() => read(prev) + 1);
|
|
267
|
+
}
|
|
274
268
|
|
|
275
|
-
|
|
276
|
-
|
|
269
|
+
effect(() => {
|
|
270
|
+
read(chain[49]);
|
|
271
|
+
});
|
|
277
272
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
273
|
+
write(s, ++i);
|
|
274
|
+
}),
|
|
275
|
+
bench('deep chain (100 computeds)', () => {
|
|
276
|
+
let s = signal(0),
|
|
277
|
+
chain: Computed<number>[] = [],
|
|
278
|
+
i = 0;
|
|
282
279
|
|
|
283
|
-
|
|
280
|
+
chain[0] = computed(() => read(s) + 1);
|
|
284
281
|
|
|
285
|
-
|
|
286
|
-
|
|
282
|
+
for (let j = 1; j < 100; j++) {
|
|
283
|
+
let prev = chain[j - 1];
|
|
287
284
|
|
|
288
|
-
|
|
289
|
-
|
|
285
|
+
chain[j] = computed(() => read(prev) + 1);
|
|
286
|
+
}
|
|
290
287
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
288
|
+
effect(() => {
|
|
289
|
+
read(chain[99]);
|
|
290
|
+
});
|
|
294
291
|
|
|
295
|
-
|
|
296
|
-
|
|
292
|
+
write(s, ++i);
|
|
293
|
+
})
|
|
294
|
+
);
|
|
297
295
|
});
|
|
298
296
|
|
|
299
297
|
|
|
300
|
-
|
|
301
|
-
bench(
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
298
|
+
test('stabilization', async ({ bench }) => {
|
|
299
|
+
await bench.compare(
|
|
300
|
+
bench('write during stabilization (reschedule path)', () => {
|
|
301
|
+
let a = signal(0),
|
|
302
|
+
b = signal(0),
|
|
303
|
+
i = 0;
|
|
305
304
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
if (val > 0) {
|
|
310
|
-
write(b, val * 10);
|
|
311
|
-
}
|
|
312
|
-
});
|
|
305
|
+
effect(() => {
|
|
306
|
+
let val = read(a);
|
|
313
307
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
308
|
+
if (val > 0) {
|
|
309
|
+
write(b, val * 10);
|
|
310
|
+
}
|
|
311
|
+
});
|
|
317
312
|
|
|
318
|
-
|
|
319
|
-
|
|
313
|
+
effect(() => {
|
|
314
|
+
read(b);
|
|
315
|
+
});
|
|
320
316
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
317
|
+
write(a, ++i);
|
|
318
|
+
}),
|
|
319
|
+
bench('read computed during stabilization', () => {
|
|
320
|
+
let a = signal(0),
|
|
321
|
+
b = signal(0),
|
|
322
|
+
c = computed(() => read(b) * 2),
|
|
323
|
+
i = 0;
|
|
326
324
|
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
effect(() => {
|
|
326
|
+
let val = read(a);
|
|
329
327
|
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
328
|
+
if (val > 0) {
|
|
329
|
+
write(b, val * 10);
|
|
330
|
+
}
|
|
331
|
+
});
|
|
334
332
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
333
|
+
effect(() => {
|
|
334
|
+
read(c);
|
|
335
|
+
});
|
|
338
336
|
|
|
339
|
-
|
|
340
|
-
|
|
337
|
+
write(a, ++i);
|
|
338
|
+
})
|
|
339
|
+
);
|
|
341
340
|
});
|
|
342
341
|
|
|
343
342
|
|
|
344
|
-
|
|
345
|
-
bench('root scope creation + disposal', () => {
|
|
343
|
+
test('root', async ({ bench }) => {
|
|
344
|
+
await bench('root scope creation + disposal', () => {
|
|
346
345
|
root((dispose) => {
|
|
347
346
|
dispose();
|
|
348
347
|
});
|
|
349
|
-
});
|
|
348
|
+
}).run();
|
|
350
349
|
});
|
|
351
350
|
|
|
352
351
|
|
|
353
|
-
|
|
354
|
-
bench(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
});
|
|
359
|
-
});
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
bench('register 10 cleanups', () => {
|
|
363
|
-
root(() => {
|
|
364
|
-
effect(() => {
|
|
365
|
-
for (let i = 0; i < 10; i++) {
|
|
352
|
+
test('onCleanup', async ({ bench }) => {
|
|
353
|
+
await bench.compare(
|
|
354
|
+
bench('register 1 cleanup', () => {
|
|
355
|
+
root(() => {
|
|
356
|
+
effect(() => {
|
|
366
357
|
onCleanup(() => {});
|
|
367
|
-
}
|
|
358
|
+
});
|
|
368
359
|
});
|
|
369
|
-
})
|
|
370
|
-
|
|
360
|
+
}),
|
|
361
|
+
bench('register 10 cleanups', () => {
|
|
362
|
+
root(() => {
|
|
363
|
+
effect(() => {
|
|
364
|
+
for (let i = 0; i < 10; i++) {
|
|
365
|
+
onCleanup(() => {});
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
})
|
|
370
|
+
);
|
|
371
371
|
});
|