File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 11import { createReactiveSystem , type ReactiveFlags , type ReactiveNode } from './system.js' ;
22
3- interface EffectScope extends ReactiveNode { }
4-
53interface 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
167165export 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 ) ;
You can’t perform that action at this time.
0 commit comments