Home / Function/ instance_script.ExportNamedDeclaration() — svelte Function Reference

instance_script.ExportNamedDeclaration() — svelte Function Reference

Architecture documentation for the instance_script.ExportNamedDeclaration() function in index.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  cee4ef4e_1ad8_af33_9b2a_c4cc823bad95["instance_script.ExportNamedDeclaration()"]
  cab41022_1b55_3b7a_06c6_b90763bbea47["index.js"]
  cee4ef4e_1ad8_af33_9b2a_c4cc823bad95 -->|defined in| cab41022_1b55_3b7a_06c6_b90763bbea47
  627dc2f8_4dbc_5bb1_8f54_cee503e17098["get()"]
  cee4ef4e_1ad8_af33_9b2a_c4cc823bad95 -->|calls| 627dc2f8_4dbc_5bb1_8f54_cee503e17098
  style cee4ef4e_1ad8_af33_9b2a_c4cc823bad95 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/migrate/index.js lines 542–564

	ExportNamedDeclaration(node, { state, next }) {
		if (node.declaration) {
			next();
			return;
		}

		let count_removed = 0;
		for (const specifier of node.specifiers) {
			if (specifier.local.type !== 'Identifier') continue;

			const binding = state.scope.get(specifier.local.name);
			if (binding?.kind === 'bindable_prop') {
				state.str.remove(
					/** @type {number} */ (specifier.start),
					/** @type {number} */ (specifier.end)
				);
				count_removed++;
			}
		}
		if (count_removed === node.specifiers.length) {
			state.str.remove(/** @type {number} */ (node.start), /** @type {number} */ (node.end));
		}
	},

Domain

Subdomains

Calls

Frequently Asked Questions

What does instance_script.ExportNamedDeclaration() do?
instance_script.ExportNamedDeclaration() is a function in the svelte codebase, defined in packages/svelte/src/compiler/migrate/index.js.
Where is instance_script.ExportNamedDeclaration() defined?
instance_script.ExportNamedDeclaration() is defined in packages/svelte/src/compiler/migrate/index.js at line 542.
What does instance_script.ExportNamedDeclaration() call?
instance_script.ExportNamedDeclaration() calls 1 function(s): get.

Analyze Your Own Codebase

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

Try Supermodel Free