visitors.ImportDeclaration() — svelte Function Reference
Architecture documentation for the visitors.ImportDeclaration() function in remove_typescript_nodes.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 8ce6e744_072b_142f_99c8_cf74421ba647["visitors.ImportDeclaration()"] 0e67864d_62c6_024e_3588_da959afe5b23["remove_typescript_nodes.js"] 8ce6e744_072b_142f_99c8_cf74421ba647 -->|defined in| 0e67864d_62c6_024e_3588_da959afe5b23 style 8ce6e744_072b_142f_99c8_cf74421ba647 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/phases/1-parse/remove_typescript_nodes.js lines 37–48
ImportDeclaration(node) {
if (node.importKind === 'type') return b.empty;
if (node.specifiers?.length > 0) {
const specifiers = node.specifiers.filter((/** @type {any} */ s) => s.importKind !== 'type');
if (specifiers.length === 0) return b.empty;
return { ...node, specifiers };
}
return node;
},
Domain
Subdomains
Source
Frequently Asked Questions
What does visitors.ImportDeclaration() do?
visitors.ImportDeclaration() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/1-parse/remove_typescript_nodes.js.
Where is visitors.ImportDeclaration() defined?
visitors.ImportDeclaration() is defined in packages/svelte/src/compiler/phases/1-parse/remove_typescript_nodes.js at line 37.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free