constructor() — svelte Function Reference
Architecture documentation for the constructor() function in set.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 2f2c0b09_fdf1_e466_679b_e88c5380a219["constructor()"] eea73370_3158_afe8_bb16_b4ffb58d476f["SvelteSet"] 2f2c0b09_fdf1_e466_679b_e88c5380a219 -->|defined in| eea73370_3158_afe8_bb16_b4ffb58d476f 4dfcf957_8573_ff55_bd31_4181227109e3["tag()"] 2f2c0b09_fdf1_e466_679b_e88c5380a219 -->|calls| 4dfcf957_8573_ff55_bd31_4181227109e3 c3ab1fe7_dc0c_4dce_760e_a2afd68ccc68["add()"] 2f2c0b09_fdf1_e466_679b_e88c5380a219 -->|calls| c3ab1fe7_dc0c_4dce_760e_a2afd68ccc68 style 2f2c0b09_fdf1_e466_679b_e88c5380a219 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/reactivity/set.js lines 57–76
constructor(value) {
super();
if (DEV) {
// If the value is invalid then the native exception will fire here
value = new Set(value);
tag(this.#version, 'SvelteSet version');
tag(this.#size, 'SvelteSet.size');
}
if (value) {
for (var element of value) {
super.add(element);
}
this.#size.v = super.size;
}
if (!inited) this.#init();
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does constructor() do?
constructor() is a function in the svelte codebase, defined in packages/svelte/src/reactivity/set.js.
Where is constructor() defined?
constructor() is defined in packages/svelte/src/reactivity/set.js at line 57.
What does constructor() call?
constructor() calls 2 function(s): add, tag.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free