Home / Function/ constructor() — svelte Function Reference

constructor() — svelte Function Reference

Architecture documentation for the constructor() function in compile_diagnostic.js from the svelte codebase.

Function javascript Compiler Transformer calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  1ebd1167_7ae9_a3fc_392d_71c76041a208["constructor()"]
  fca2e303_5d6d_304a_d0fc_14ab13a1ecb7["CompileDiagnostic"]
  1ebd1167_7ae9_a3fc_392d_71c76041a208 -->|defined in| fca2e303_5d6d_304a_d0fc_14ab13a1ecb7
  c16a81c5_56e2_1ecd_2a57_14f0095ebae7["constructor()"]
  c16a81c5_56e2_1ecd_2a57_14f0095ebae7 -->|calls| 1ebd1167_7ae9_a3fc_392d_71c76041a208
  98f9ca91_97dd_163d_af3c_189f641e307f["constructor()"]
  98f9ca91_97dd_163d_af3c_189f641e307f -->|calls| 1ebd1167_7ae9_a3fc_392d_71c76041a208
  f609be53_8034_fe8d_2190_bf30d43e4262["get_code_frame()"]
  1ebd1167_7ae9_a3fc_392d_71c76041a208 -->|calls| f609be53_8034_fe8d_2190_bf30d43e4262
  style 1ebd1167_7ae9_a3fc_392d_71c76041a208 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/utils/compile_diagnostic.js lines 60–76

	constructor(code, message, position) {
		this.code = code;
		this.message = message;

		if (state.filename !== state.UNKNOWN_FILENAME) {
			this.filename = state.filename;
		}

		if (position) {
			this.position = position;
			this.start = state.locator(position[0]);
			this.end = state.locator(position[1]);
			if (this.start && this.end) {
				this.frame = get_code_frame(state.source, this.start.line - 1, this.end.column);
			}
		}
	}

Domain

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the svelte codebase, defined in packages/svelte/src/compiler/utils/compile_diagnostic.js.
Where is constructor() defined?
constructor() is defined in packages/svelte/src/compiler/utils/compile_diagnostic.js at line 60.
What does constructor() call?
constructor() calls 1 function(s): get_code_frame.
What calls constructor()?
constructor() is called by 2 function(s): constructor, constructor.

Analyze Your Own Codebase

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

Try Supermodel Free