Home / Class/ Foo Class — svelte Architecture

Foo Class — svelte Architecture

Architecture documentation for the Foo class in index.svelte.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  cb1bf762_e9a8_43d8_e250_aefd2b075ae7["Foo"]
  51baf22a_65f4_51ba_b957_04be9b625632["index.svelte.js"]
  cb1bf762_e9a8_43d8_e250_aefd2b075ae7 -->|defined in| 51baf22a_65f4_51ba_b957_04be9b625632
  f480d6f0_848e_40a0_5152_8bba1c2b04a2["foo()"]
  cb1bf762_e9a8_43d8_e250_aefd2b075ae7 -->|method| f480d6f0_848e_40a0_5152_8bba1c2b04a2
  d06da861_f4d9_6174_1e41_ed301df1d3b5["bar()"]
  cb1bf762_e9a8_43d8_e250_aefd2b075ae7 -->|method| d06da861_f4d9_6174_1e41_ed301df1d3b5
  d8cb55eb_eb2c_fa6a_e3fb_437574e40434["constructor()"]
  cb1bf762_e9a8_43d8_e250_aefd2b075ae7 -->|method| d8cb55eb_eb2c_fa6a_e3fb_437574e40434

Relationship Graph

Source Code

packages/svelte/tests/snapshot/samples/class-state-field-constructor-assignment/_expected/server/index.svelte.js lines 5–34

		class Foo {
			a = 0;
			#b;
			#foo = $.derived(() => ({ bar: this.a * 2 }));

			get foo() {
				return this.#foo();
			}

			set foo($$value) {
				return this.#foo($$value);
			}

			#bar = $.derived(() => ({ baz: this.foo }));

			get bar() {
				return this.#bar();
			}

			set bar($$value) {
				return this.#bar($$value);
			}

			constructor() {
				this.a = 1;
				this.#b = 2;
				this.foo.bar = 3;
				this.bar = 4;
			}
		}

Frequently Asked Questions

What is the Foo class?
Foo is a class in the svelte codebase, defined in packages/svelte/tests/snapshot/samples/class-state-field-constructor-assignment/_expected/server/index.svelte.js.
Where is Foo defined?
Foo is defined in packages/svelte/tests/snapshot/samples/class-state-field-constructor-assignment/_expected/server/index.svelte.js at line 5.

Analyze Your Own Codebase

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

Try Supermodel Free