DebugTag.js — svelte Source File
Architecture documentation for DebugTag.js, a javascript file in the svelte codebase. 1 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR 99f4258f_995e_45a4_cd10_76de9e869540["DebugTag.js"] 95c28355_f14c_c3cd_5a03_d5a53ca255bc["builders"] 99f4258f_995e_45a4_cd10_76de9e869540 --> 95c28355_f14c_c3cd_5a03_d5a53ca255bc 7665e008_f37d_b860_a594_f2539a66af4e["transform-client.js"] 7665e008_f37d_b860_a594_f2539a66af4e --> 99f4258f_995e_45a4_cd10_76de9e869540 style 99f4258f_995e_45a4_cd10_76de9e869540 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { Expression} from 'estree' */
/** @import { AST } from '#compiler' */
/** @import { ComponentContext } from '../types' */
import * as b from '#compiler/builders';
/**
* @param {AST.DebugTag} node
* @param {ComponentContext} context
*/
export function DebugTag(node, context) {
const object = b.object(
node.identifiers.map((identifier) => {
const visited = b.call('$.snapshot', /** @type {Expression} */ (context.visit(identifier)));
return b.prop(
'init',
identifier,
context.state.analysis.runes ? visited : b.call('$.untrack', b.thunk(visited))
);
})
);
const call = b.call('console.log', object);
context.state.init.push(
b.stmt(b.call('$.template_effect', b.thunk(b.block([b.stmt(call), b.debugger]))))
);
}
Domain
Subdomains
Functions
Dependencies
- builders
Source
Frequently Asked Questions
What does DebugTag.js do?
DebugTag.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 DebugTag.js?
DebugTag.js defines 1 function(s): DebugTag.
What does DebugTag.js depend on?
DebugTag.js imports 1 module(s): builders.
What files import DebugTag.js?
DebugTag.js is imported by 1 file(s): transform-client.js.
Where is DebugTag.js in the architecture?
DebugTag.js is located at packages/svelte/src/compiler/phases/3-transform/client/visitors/DebugTag.js (domain: Compiler, subdomain: Transformer, directory: packages/svelte/src/compiler/phases/3-transform/client/visitors).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free