|
|
@ -70,11 +70,7 @@ export function ClassBody(node, context) {
|
|
|
|
|
|
|
|
|
|
|
|
if (name[0] === '#') {
|
|
|
|
if (name[0] === '#') {
|
|
|
|
body.push(/** @type {PropertyDefinition} */ (context.visit(definition, child_state)));
|
|
|
|
body.push(/** @type {PropertyDefinition} */ (context.visit(definition, child_state)));
|
|
|
|
} else {
|
|
|
|
} else if (field.node === definition) {
|
|
|
|
if (field.node.type === 'AssignmentExpression') {
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const member = b.member(b.this, field.key);
|
|
|
|
const member = b.member(b.this, field.key);
|
|
|
|
|
|
|
|
|
|
|
|
const should_proxy = field.type === '$state' && true; // TODO
|
|
|
|
const should_proxy = field.type === '$state' && true; // TODO
|
|
|
@ -82,9 +78,7 @@ export function ClassBody(node, context) {
|
|
|
|
body.push(
|
|
|
|
body.push(
|
|
|
|
b.prop_def(
|
|
|
|
b.prop_def(
|
|
|
|
field.key,
|
|
|
|
field.key,
|
|
|
|
/** @type {CallExpression} */ (
|
|
|
|
/** @type {CallExpression} */ (context.visit(field.value, child_state))
|
|
|
|
context.visit(definition.value ?? field.value, child_state)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
|
|
b.method('get', definition.key, [], [b.return(b.call('$.get', member))]),
|
|
|
|
b.method('get', definition.key, [], [b.return(b.call('$.get', member))]),
|
|
|
|