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