legacy.js — svelte Source File
Architecture documentation for legacy.js, a javascript file in the svelte codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR e70d565a_b58f_b8a3_6358_70d749ddae50["legacy.js"] ff387d97_d6d2_81e0_e731_656552709d27["errors.js"] e70d565a_b58f_b8a3_6358_70d749ddae50 --> ff387d97_d6d2_81e0_e731_656552709d27 48cf26f8_bf34_fd7a_3d52_cc963051e167["context.js"] e70d565a_b58f_b8a3_6358_70d749ddae50 --> 48cf26f8_bf34_fd7a_3d52_cc963051e167 73865c3c_2786_c9ac_d34f_b51d28b3a29e["constants.js"] e70d565a_b58f_b8a3_6358_70d749ddae50 --> 73865c3c_2786_c9ac_d34f_b51d28b3a29e style e70d565a_b58f_b8a3_6358_70d749ddae50 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import * as e from '../errors.js';
import { component_context } from '../context.js';
import { FILENAME } from '../../../constants.js';
/** @param {Function & { [FILENAME]: string }} target */
export function check_target(target) {
if (target) {
e.component_api_invalid_new(target[FILENAME] ?? 'a component', target.name);
}
}
export function legacy_api() {
const component = component_context?.function;
/** @param {string} method */
function error(method) {
e.component_api_changed(method, component[FILENAME]);
}
return {
$destroy: () => error('$destroy()'),
$on: () => error('$on(...)'),
$set: () => error('$set(...)')
};
}
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does legacy.js do?
legacy.js is a source file in the svelte codebase, written in javascript. It belongs to the ClientRuntime domain, LegacyBridge subdomain.
What functions are defined in legacy.js?
legacy.js defines 2 function(s): check_target, legacy_api.
What does legacy.js depend on?
legacy.js imports 3 module(s): constants.js, context.js, errors.js.
Where is legacy.js in the architecture?
legacy.js is located at packages/svelte/src/internal/client/dev/legacy.js (domain: ClientRuntime, subdomain: LegacyBridge, directory: packages/svelte/src/internal/client/dev).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free