UpdateExpression() — svelte Function Reference
Architecture documentation for the UpdateExpression() function in UpdateExpression.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 05215418_7b1e_a936_d190_16d901793aae["UpdateExpression()"] f9172498_1705_28e2_3e27_64d084b5e682["UpdateExpression.js"] 05215418_7b1e_a936_d190_16d901793aae -->|defined in| f9172498_1705_28e2_3e27_64d084b5e682 aced5321_4478_4f67_ba8c_e122713c1d9f["calculate_blockers()"] aced5321_4478_4f67_ba8c_e122713c1d9f -->|calls| 05215418_7b1e_a936_d190_16d901793aae 5ebdf508_43c0_4c5b_b633_950058ffd709["validate_assignment()"] 05215418_7b1e_a936_d190_16d901793aae -->|calls| 5ebdf508_43c0_4c5b_b633_950058ffd709 804afe56_25d1_9f41_dafe_adc75e952134["object()"] 05215418_7b1e_a936_d190_16d901793aae -->|calls| 804afe56_25d1_9f41_dafe_adc75e952134 style 05215418_7b1e_a936_d190_16d901793aae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/phases/2-analyze/visitors/UpdateExpression.js lines 10–29
export function UpdateExpression(node, context) {
validate_assignment(node, node.argument, context);
if (context.state.reactive_statement) {
const id = node.argument.type === 'MemberExpression' ? object(node.argument) : node.argument;
if (id?.type === 'Identifier') {
const binding = context.state.scope.get(id.name);
if (binding) {
context.state.reactive_statement.assignments.add(binding);
}
}
}
if (context.state.expression) {
context.state.expression.has_assignment = true;
}
context.next();
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does UpdateExpression() do?
UpdateExpression() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/2-analyze/visitors/UpdateExpression.js.
Where is UpdateExpression() defined?
UpdateExpression() is defined in packages/svelte/src/compiler/phases/2-analyze/visitors/UpdateExpression.js at line 10.
What does UpdateExpression() call?
UpdateExpression() calls 2 function(s): object, validate_assignment.
What calls UpdateExpression()?
UpdateExpression() is called by 1 function(s): calculate_blockers.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free