is_class_property_assignment_at_constructor_root() — svelte Function Reference
Architecture documentation for the is_class_property_assignment_at_constructor_root() function in CallExpression.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 212cc445_9365_40b4_e753_24b51dad0068["is_class_property_assignment_at_constructor_root()"] 3f0209c9_7af2_542f_1c9c_3be0eb046971["CallExpression.js"] 212cc445_9365_40b4_e753_24b51dad0068 -->|defined in| 3f0209c9_7af2_542f_1c9c_3be0eb046971 f847bd70_7e16_ed37_5fde_c34cd0ce1d43["CallExpression()"] f847bd70_7e16_ed37_5fde_c34cd0ce1d43 -->|calls| 212cc445_9365_40b4_e753_24b51dad0068 68a38b3b_6f0f_ed43_404f_3d00302677a2["get_parent()"] 212cc445_9365_40b4_e753_24b51dad0068 -->|calls| 68a38b3b_6f0f_ed43_404f_3d00302677a2 style 212cc445_9365_40b4_e753_24b51dad0068 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js lines 323–339
function is_class_property_assignment_at_constructor_root(node, context) {
if (
node.type === 'AssignmentExpression' &&
node.operator === '=' &&
node.left.type === 'MemberExpression' &&
node.left.object.type === 'ThisExpression' &&
((node.left.property.type === 'Identifier' && !node.left.computed) ||
node.left.property.type === 'PrivateIdentifier' ||
node.left.property.type === 'Literal')
) {
// MethodDefinition (-5) -> FunctionExpression (-4) -> BlockStatement (-3) -> ExpressionStatement (-2) -> AssignmentExpression (-1)
const parent = get_parent(context.path, -5);
return parent?.type === 'MethodDefinition' && parent.kind === 'constructor';
}
return false;
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does is_class_property_assignment_at_constructor_root() do?
is_class_property_assignment_at_constructor_root() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js.
Where is is_class_property_assignment_at_constructor_root() defined?
is_class_property_assignment_at_constructor_root() is defined in packages/svelte/src/compiler/phases/2-analyze/visitors/CallExpression.js at line 323.
What does is_class_property_assignment_at_constructor_root() call?
is_class_property_assignment_at_constructor_root() calls 1 function(s): get_parent.
What calls is_class_property_assignment_at_constructor_root()?
is_class_property_assignment_at_constructor_root() is called by 1 function(s): CallExpression.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free