ForOfStatement.js — svelte Source File
Architecture documentation for ForOfStatement.js, a javascript file in the svelte codebase. 3 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR c483921f_8d5a_f23d_b357_6347f76261cc["ForOfStatement.js"] 62f818c8_e890_17ed_5ec1_92f953d4a7a6["state.js"] c483921f_8d5a_f23d_b357_6347f76261cc --> 62f818c8_e890_17ed_5ec1_92f953d4a7a6 7a7783f8_ffa6_0cc3_61b0_031882649535["is_ignored"] c483921f_8d5a_f23d_b357_6347f76261cc --> 7a7783f8_ffa6_0cc3_61b0_031882649535 95c28355_f14c_c3cd_5a03_d5a53ca255bc["builders"] c483921f_8d5a_f23d_b357_6347f76261cc --> 95c28355_f14c_c3cd_5a03_d5a53ca255bc 7665e008_f37d_b860_a594_f2539a66af4e["transform-client.js"] 7665e008_f37d_b860_a594_f2539a66af4e --> c483921f_8d5a_f23d_b357_6347f76261cc style c483921f_8d5a_f23d_b357_6347f76261cc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
/** @import { Expression, ForOfStatement, Pattern, Statement, VariableDeclaration } from 'estree' */
/** @import { ComponentContext } from '../types' */
import * as b from '#compiler/builders';
import { dev, is_ignored } from '../../../../state.js';
/**
* @param {ForOfStatement} node
* @param {ComponentContext} context
*/
export function ForOfStatement(node, context) {
if (
node.await &&
dev &&
!is_ignored(node, 'await_reactivity_loss') &&
context.state.options.experimental.async
) {
const left = /** @type {VariableDeclaration | Pattern} */ (context.visit(node.left));
const argument = /** @type {Expression} */ (context.visit(node.right));
const body = /** @type {Statement} */ (context.visit(node.body));
const right = b.call('$.for_await_track_reactivity_loss', argument);
return b.for_of(left, right, body, true);
}
context.next();
}
Domain
Subdomains
Functions
Dependencies
- builders
- is_ignored
- state.js
Source
Frequently Asked Questions
What does ForOfStatement.js do?
ForOfStatement.js is a source file in the svelte codebase, written in javascript. It belongs to the Compiler domain, Migrator subdomain.
What functions are defined in ForOfStatement.js?
ForOfStatement.js defines 1 function(s): ForOfStatement.
What does ForOfStatement.js depend on?
ForOfStatement.js imports 3 module(s): builders, is_ignored, state.js.
What files import ForOfStatement.js?
ForOfStatement.js is imported by 1 file(s): transform-client.js.
Where is ForOfStatement.js in the architecture?
ForOfStatement.js is located at packages/svelte/src/compiler/phases/3-transform/client/visitors/ForOfStatement.js (domain: Compiler, subdomain: Migrator, 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