MemberExpression() — svelte Function Reference
Architecture documentation for the MemberExpression() function in MemberExpression.js from the svelte codebase.
Entity Profile
Dependency Diagram
graph TD 7a8765a8_9962_ffbb_6914_8929c18f5184["MemberExpression()"] eec50c08_760b_3295_e273_a5fe00882827["MemberExpression.js"] 7a8765a8_9962_ffbb_6914_8929c18f5184 -->|defined in| eec50c08_760b_3295_e273_a5fe00882827 style 7a8765a8_9962_ffbb_6914_8929c18f5184 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/svelte/src/compiler/phases/3-transform/client/visitors/MemberExpression.js lines 9–23
export function MemberExpression(node, context) {
// rewrite `this.#foo` as `this.#foo.v` inside a constructor
if (node.property.type === 'PrivateIdentifier') {
const field = context.state.state_fields.get('#' + node.property.name);
if (field) {
return context.state.in_constructor &&
(field.type === '$state.raw' || field.type === '$state')
? b.member(node, 'v')
: b.call('$.get', node);
}
}
context.next();
}
Domain
Subdomains
Source
Frequently Asked Questions
What does MemberExpression() do?
MemberExpression() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/3-transform/client/visitors/MemberExpression.js.
Where is MemberExpression() defined?
MemberExpression() is defined in packages/svelte/src/compiler/phases/3-transform/client/visitors/MemberExpression.js at line 9.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free