Home / File/ ExportDefaultDeclaration.js — svelte Source File

ExportDefaultDeclaration.js — svelte Source File

Architecture documentation for ExportDefaultDeclaration.js, a javascript file in the svelte codebase. 4 imports, 1 dependents.

File javascript Compiler Transformer 4 imports 1 dependents 1 functions

Entity Profile

Dependency Diagram

graph LR
  2de262bb_452c_183e_9ae9_527a722ba4f5["ExportDefaultDeclaration.js"]
  495501a4_a342_6a4d_ac11_e3e2fee8b218["errors.js"]
  2de262bb_452c_183e_9ae9_527a722ba4f5 --> 495501a4_a342_6a4d_ac11_e3e2fee8b218
  a146f6ac_0088_8736_b6ce_318f9f115170["e"]
  2de262bb_452c_183e_9ae9_527a722ba4f5 --> a146f6ac_0088_8736_b6ce_318f9f115170
  bf0d8f1b_17da_970d_bf44_fbcf099d5371["utils.js"]
  2de262bb_452c_183e_9ae9_527a722ba4f5 --> bf0d8f1b_17da_970d_bf44_fbcf099d5371
  cc0c7132_9605_cd69_23b0_b710d67b19c8["validate_export"]
  2de262bb_452c_183e_9ae9_527a722ba4f5 --> cc0c7132_9605_cd69_23b0_b710d67b19c8
  4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"]
  4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 2de262bb_452c_183e_9ae9_527a722ba4f5
  style 2de262bb_452c_183e_9ae9_527a722ba4f5 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

/** @import { ExportDefaultDeclaration } from 'estree' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
import { validate_export } from './shared/utils.js';

/**
 * @param {ExportDefaultDeclaration} node
 * @param {Context} context
 */
export function ExportDefaultDeclaration(node, context) {
	if (!context.state.ast_type /* .svelte.js module */) {
		if (node.declaration.type === 'Identifier') {
			validate_export(node, context.state.scope, node.declaration.name);
		}
	} else {
		e.module_illegal_default_export(node);
	}

	context.next();
}

Domain

Subdomains

Frequently Asked Questions

What does ExportDefaultDeclaration.js do?
ExportDefaultDeclaration.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Transformer subdomain.
What functions are defined in ExportDefaultDeclaration.js?
ExportDefaultDeclaration.js defines 1 function(s): ExportDefaultDeclaration.
What does ExportDefaultDeclaration.js depend on?
ExportDefaultDeclaration.js imports 4 module(s): e, errors.js, utils.js, validate_export.
What files import ExportDefaultDeclaration.js?
ExportDefaultDeclaration.js is imported by 1 file(s): index.js.
Where is ExportDefaultDeclaration.js in the architecture?
ExportDefaultDeclaration.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/ExportDefaultDeclaration.js (domain: Compiler, subdomain: Transformer, 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