Home / Type/ Effect Type — svelte Architecture

Effect Type — svelte Architecture

Architecture documentation for the Effect type/interface in types.d.ts from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  bb1d541e_68a6_14c1_8148_7e262162af04["Effect"]
  b54d747e_876e_6ce7_1b09_d738a162f64b["types.d.ts"]
  bb1d541e_68a6_14c1_8148_7e262162af04 -->|defined in| b54d747e_876e_6ce7_1b09_d738a162f64b
  style bb1d541e_68a6_14c1_8148_7e262162af04 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/internal/client/reactivity/types.d.ts lines 73–101

export interface Effect extends Reaction {
	/**
	 * Branch effects store their start/end nodes so that they can be
	 * removed when the effect is destroyed, or moved when an `each`
	 * block is reconciled. In the case of a single text/element node,
	 * `start` and `end` will be the same.
	 */
	nodes: null | EffectNodes;
	/** The effect function */
	fn: null | (() => void | (() => void));
	/** The teardown function returned from the effect function */
	teardown: null | (() => void);
	/** Next sibling child effect created inside the parent signal */
	prev: null | Effect;
	/** Next sibling child effect created inside the parent signal */
	next: null | Effect;
	/** First child effect created inside this signal */
	first: null | Effect;
	/** Last child effect created inside this signal */
	last: null | Effect;
	/** Parent effect */
	parent: Effect | null;
	/** The boundary this effect belongs to */
	b: Boundary | null;
	/** Dev only */
	component_function?: any;
	/** Dev only. Only set for certain block effects. Contains a reference to the stack that represents the render tree */
	dev_stack?: DevStackEntry | null;
}

Frequently Asked Questions

What is the Effect type?
Effect is a type/interface in the svelte codebase, defined in packages/svelte/src/internal/client/reactivity/types.d.ts.
Where is Effect defined?
Effect is defined in packages/svelte/src/internal/client/reactivity/types.d.ts at line 73.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free