constructor() — svelte Function Reference
Architecture documentation for the constructor() function in errors.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 3ecb5b47_d511_bb01_c0f7_d11a5d6c4820["constructor()"] 1ebf37af_b1be_3936_6ec5_9fba7627e309["InternalCompileError"] 3ecb5b47_d511_bb01_c0f7_d11a5d6c4820 -->|defined in| 1ebf37af_b1be_3936_6ec5_9fba7627e309 47d1f6b6_b8bc_7dee_a372_2ce3692cfbef["constructor()"] 47d1f6b6_b8bc_7dee_a372_2ce3692cfbef -->|calls| 3ecb5b47_d511_bb01_c0f7_d11a5d6c4820 70bfc5be_f190_fa1e_3660_a05e54fe4e82["constructor()"] 3ecb5b47_d511_bb01_c0f7_d11a5d6c4820 -->|calls| 70bfc5be_f190_fa1e_3660_a05e54fe4e82 style 3ecb5b47_d511_bb01_c0f7_d11a5d6c4820 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/errors.js lines 15–26
constructor(code, message, position) {
super(message);
this.stack = ''; // avoid unnecessary noise; don't set it as a class property or it becomes enumerable
// We want to extend from Error so that various bundler plugins properly handle it.
// But we also want to share the same object shape with that of warnings, therefore
// we create an instance of the shared class an copy over its properties.
this.#diagnostic = new CompileDiagnostic(code, message, position);
Object.assign(this, this.#diagnostic);
this.name = 'CompileError';
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does constructor() do?
constructor() is a function in the svelte codebase, defined in packages/svelte/src/compiler/errors.js.
Where is constructor() defined?
constructor() is defined in packages/svelte/src/compiler/errors.js at line 15.
What does constructor() call?
constructor() calls 1 function(s): constructor.
What calls constructor()?
constructor() is called by 1 function(s): constructor.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free