ImportDeclaration.js — svelte Source File
Architecture documentation for ImportDeclaration.js, a javascript file in the svelte codebase. 2 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR ad3f1eb5_60da_f3fc_fc67_b547e430ff4d["ImportDeclaration.js"] 5e7e4cac_5219_f814_961b_47de0ad05943["errors.js"] ad3f1eb5_60da_f3fc_fc67_b547e430ff4d --> 5e7e4cac_5219_f814_961b_47de0ad05943 aff7f9d5_2aa0_dcbd_4785_0c91d121e758["e"] ad3f1eb5_60da_f3fc_fc67_b547e430ff4d --> aff7f9d5_2aa0_dcbd_4785_0c91d121e758 586b6dc7_00ca_38f3_8445_82d6a0c4444f["index.js"] 586b6dc7_00ca_38f3_8445_82d6a0c4444f --> ad3f1eb5_60da_f3fc_fc67_b547e430ff4d style ad3f1eb5_60da_f3fc_fc67_b547e430ff4d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { ImportDeclaration } from 'estree' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
/**
* @param {ImportDeclaration} node
* @param {Context} context
*/
export function ImportDeclaration(node, context) {
if (context.state.analysis.runes) {
const source = /** @type {string} */ (node.source.value);
if (source.startsWith('svelte/internal')) {
e.import_svelte_internal_forbidden(node);
}
if (source === 'svelte') {
for (const specifier of node.specifiers) {
if (specifier.type === 'ImportSpecifier') {
if (
specifier.imported.type === 'Identifier' &&
(specifier.imported.name === 'beforeUpdate' ||
specifier.imported.name === 'afterUpdate')
) {
e.runes_mode_invalid_import(specifier, specifier.imported.name);
}
}
}
}
}
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does ImportDeclaration.js do?
ImportDeclaration.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Migrator subdomain.
What functions are defined in ImportDeclaration.js?
ImportDeclaration.js defines 1 function(s): ImportDeclaration.
What does ImportDeclaration.js depend on?
ImportDeclaration.js imports 2 module(s): e, errors.js.
What files import ImportDeclaration.js?
ImportDeclaration.js is imported by 1 file(s): index.js.
Where is ImportDeclaration.js in the architecture?
ImportDeclaration.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/ImportDeclaration.js (domain: Compiler, subdomain: Migrator, directory: packages/svelte/src/compiler/phases/2-analyze/visitors).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free