SvelteSelf.js — svelte Source File
Architecture documentation for SvelteSelf.js, a javascript file in the svelte codebase. 7 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 6ee51e41_ae2d_bb6f_2e37_01a904669bc2["SvelteSelf.js"] 057ad110_57ab_942c_4f8d_5c2f711bef54["component.js"] 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 --> 057ad110_57ab_942c_4f8d_5c2f711bef54 c2e078e7_8b02_06d2_5983_59b1af376889["visit_component"] 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 --> c2e078e7_8b02_06d2_5983_59b1af376889 495501a4_a342_6a4d_ac11_e3e2fee8b218["errors.js"] 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 --> 495501a4_a342_6a4d_ac11_e3e2fee8b218 a146f6ac_0088_8736_b6ce_318f9f115170["e"] 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 --> a146f6ac_0088_8736_b6ce_318f9f115170 56a689f9_11c0_cc76_bd60_41bb6dc96475["warnings.js"] 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 --> 56a689f9_11c0_cc76_bd60_41bb6dc96475 3246e0bc_b9fc_f638_5e35_41e8c39a2408["w"] 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 --> 3246e0bc_b9fc_f638_5e35_41e8c39a2408 62f818c8_e890_17ed_5ec1_92f953d4a7a6["state.js"] 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 --> 62f818c8_e890_17ed_5ec1_92f953d4a7a6 4aa8a188_84d4_0274_ed83_cac0ab1d3572["index.js"] 4aa8a188_84d4_0274_ed83_cac0ab1d3572 --> 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 style 6ee51e41_ae2d_bb6f_2e37_01a904669bc2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { AST } from '#compiler' */
/** @import { Context } from '../types' */
import { visit_component } from './shared/component.js';
import * as e from '../../../errors.js';
import * as w from '../../../warnings.js';
import { filename, UNKNOWN_FILENAME } from '../../../state.js';
/**
* @param {AST.SvelteSelf} node
* @param {Context} context
*/
export function SvelteSelf(node, context) {
const valid = context.path.some(
(node) =>
node.type === 'IfBlock' ||
node.type === 'EachBlock' ||
node.type === 'Component' ||
node.type === 'SnippetBlock'
);
if (!valid) {
e.svelte_self_invalid_placement(node);
}
if (context.state.analysis.runes) {
const name = filename === UNKNOWN_FILENAME ? 'Self' : context.state.analysis.name;
const basename =
filename === UNKNOWN_FILENAME
? 'Self.svelte'
: /** @type {string} */ (filename.split(/[/\\]/).pop());
w.svelte_self_deprecated(node, name, basename);
}
visit_component(node, context);
}
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does SvelteSelf.js do?
SvelteSelf.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 SvelteSelf.js?
SvelteSelf.js defines 1 function(s): SvelteSelf.
What does SvelteSelf.js depend on?
SvelteSelf.js imports 7 module(s): component.js, e, errors.js, state.js, visit_component, w, warnings.js.
What files import SvelteSelf.js?
SvelteSelf.js is imported by 1 file(s): index.js.
Where is SvelteSelf.js in the architecture?
SvelteSelf.js is located at packages/svelte/src/compiler/phases/2-analyze/visitors/SvelteSelf.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