component_api_invalid_new() — svelte Function Reference
Architecture documentation for the component_api_invalid_new() function in errors.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 99f67de4_b8c4_424a_7e3e_e380741e9fda["component_api_invalid_new()"] ff387d97_d6d2_81e0_e731_656552709d27["errors.js"] 99f67de4_b8c4_424a_7e3e_e380741e9fda -->|defined in| ff387d97_d6d2_81e0_e731_656552709d27 b1d739a8_c774_2c7f_18da_8b746bbd7b91["check_target()"] b1d739a8_c774_2c7f_18da_8b746bbd7b91 -->|calls| 99f67de4_b8c4_424a_7e3e_e380741e9fda style 99f67de4_b8c4_424a_7e3e_e380741e9fda fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/internal/client/errors.js lines 101–111
export function component_api_invalid_new(component, name) {
if (DEV) {
const error = new Error(`component_api_invalid_new\nAttempted to instantiate ${component} with \`new ${name}\`, which is no longer valid in Svelte 5. If this component is not under your control, set the \`compatibility.componentApi\` compiler option to \`4\` to keep it working.\nhttps://svelte.dev/e/component_api_invalid_new`);
error.name = 'Svelte error';
throw error;
} else {
throw new Error(`https://svelte.dev/e/component_api_invalid_new`);
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does component_api_invalid_new() do?
component_api_invalid_new() is a function in the svelte codebase, defined in packages/svelte/src/internal/client/errors.js.
Where is component_api_invalid_new() defined?
component_api_invalid_new() is defined in packages/svelte/src/internal/client/errors.js at line 101.
What calls component_api_invalid_new()?
component_api_invalid_new() is called by 1 function(s): check_target.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free