Home / Function/ ExportSpecifier() — svelte Function Reference

ExportSpecifier() — svelte Function Reference

Architecture documentation for the ExportSpecifier() function in ExportSpecifier.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  91a994d3_a1d6_8e8f_cd3a_55ae08f77785["ExportSpecifier()"]
  cc04e72a_ab02_4e20_9624_dc46c6f2aded["ExportSpecifier.js"]
  91a994d3_a1d6_8e8f_cd3a_55ae08f77785 -->|defined in| cc04e72a_ab02_4e20_9624_dc46c6f2aded
  cc0c7132_9605_cd69_23b0_b710d67b19c8["validate_export()"]
  91a994d3_a1d6_8e8f_cd3a_55ae08f77785 -->|calls| cc0c7132_9605_cd69_23b0_b710d67b19c8
  style 91a994d3_a1d6_8e8f_cd3a_55ae08f77785 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/2-analyze/visitors/ExportSpecifier.js lines 9–30

export function ExportSpecifier(node, context) {
	const local_name =
		node.local.type === 'Identifier' ? node.local.name : /** @type {string} */ (node.local.value);
	const exported_name =
		node.exported.type === 'Identifier'
			? node.exported.name
			: /** @type {string} */ (node.exported.value);

	if (context.state.ast_type === 'instance') {
		if (context.state.analysis.runes) {
			context.state.analysis.exports.push({
				name: local_name,
				alias: exported_name
			});

			const binding = context.state.scope.get(local_name);
			if (binding) binding.reassigned = true;
		}
	} else {
		validate_export(node, context.state.scope, local_name);
	}
}

Domain

Subdomains

Frequently Asked Questions

What does ExportSpecifier() do?
ExportSpecifier() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/2-analyze/visitors/ExportSpecifier.js.
Where is ExportSpecifier() defined?
ExportSpecifier() is defined in packages/svelte/src/compiler/phases/2-analyze/visitors/ExportSpecifier.js at line 9.
What does ExportSpecifier() call?
ExportSpecifier() calls 1 function(s): validate_export.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free