Skip to content

Commit 4a09832

Browse files
committed
Update index.ts
1 parent 5cfe470 commit 4a09832

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { createReactiveSystem, type ReactiveFlags, type ReactiveNode } from './system.js';
22

3-
interface EffectScope extends ReactiveNode { }
4-
53
interface Effect extends ReactiveNode {
64
fn(): void;
75
}
@@ -59,7 +57,7 @@ const {
5957
queued[insertIndex] = left;
6058
}
6159
},
62-
unwatched(node: Signal | Computed | Effect | EffectScope) {
60+
unwatched(node) {
6361
if (!(node.flags & 1 satisfies ReactiveFlags.Mutable)) {
6462
effectScopeOper.call(node);
6563
} else if (node.depsTail !== undefined) {
@@ -165,7 +163,7 @@ export function effect(fn: () => void): () => void {
165163
}
166164

167165
export function effectScope(fn: () => void): () => void {
168-
const e: EffectScope = {
166+
const e: ReactiveNode = {
169167
deps: undefined,
170168
depsTail: undefined,
171169
subs: undefined,
@@ -310,7 +308,7 @@ function effectOper(this: Effect): void {
310308
effectScopeOper.call(this);
311309
}
312310

313-
function effectScopeOper(this: EffectScope): void {
311+
function effectScopeOper(this: ReactiveNode): void {
314312
this.depsTail = undefined;
315313
this.flags = 0 satisfies ReactiveFlags.None;
316314
purgeDeps(this);

0 commit comments

Comments
 (0)