SvelteFragment.js — svelte Source File
Architecture documentation for SvelteFragment.js, a javascript file in the svelte codebase. 4 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR f2ad80e0_97e0_ac48_aec8_8b70c646ca26["SvelteFragment.js"] 495501a4_a342_6a4d_ac11_e3e2fee8b218["errors.js"] f2ad80e0_97e0_ac48_aec8_8b70c646ca26 --> 495501a4_a342_6a4d_ac11_e3e2fee8b218 a146f6ac_0088_8736_b6ce_318f9f115170["e"] f2ad80e0_97e0_ac48_aec8_8b70c646ca26 --> a146f6ac_0088_8736_b6ce_318f9f115170 32df1fa2_adf7_5122_0b02_c399ea508ae0["attribute.js"] f2ad80e0_97e0_ac48_aec8_8b70c646ca26 --> 32df1fa2_adf7_5122_0b02_c399ea508ae0 c3969ef3_0f9b_1699_e3b6_75b4a9916c7d["validate_slot_attribute"] f2ad80e0_97e0_ac48_aec8_8b70c646ca26 --> c3969ef3_0f9b_1699_e3b6_75b4a9916c7d 4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"] 4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> f2ad80e0_97e0_ac48_aec8_8b70c646ca26 style f2ad80e0_97e0_ac48_aec8_8b70c646ca26 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import * as e from '../../../errors.js';
import { validate_slot_attribute } from './shared/attribute.js';
/**
* @param {AST.SvelteFragment} node
* @param {Context} context
*/
export function SvelteFragment(node, context) {
const parent = context.path.at(-2);
if (parent?.type !== 'Component' && parent?.type !== 'SvelteComponent') {
e.svelte_fragment_invalid_placement(node);
}
for (const attribute of node.attributes) {
if (attribute.type === 'Attribute') {
if (attribute.name === 'slot') {
validate_slot_attribute(context, attribute);
}
} else if (attribute.type !== 'LetDirective') {
e.svelte_fragment_invalid_attribute(attribute);
}
}
context.next({ ...context.state, parent_element: null });
}
Domain
Subdomains
Functions
Dependencies
Source
Frequently Asked Questions
What does SvelteFragment.js do?
SvelteFragment.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 SvelteFragment.js?
SvelteFragment.js defines 1 function(s): SvelteFragment.
What does SvelteFragment.js depend on?
SvelteFragment.js imports 4 module(s): attribute.js, e, errors.js, validate_slot_attribute.
What files import SvelteFragment.js?
SvelteFragment.js is imported by 1 file(s): index.js.
Where is SvelteFragment.js in the architecture?
SvelteFragment.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteFragment.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