|
|
|
@ -31,7 +31,7 @@ export function unpack_destructuring({
|
|
|
|
scope,
|
|
|
|
scope,
|
|
|
|
component,
|
|
|
|
component,
|
|
|
|
context_rest_properties,
|
|
|
|
context_rest_properties,
|
|
|
|
number_of_computed_props = 0
|
|
|
|
number_of_computed_props = { n: 0 }
|
|
|
|
}: {
|
|
|
|
}: {
|
|
|
|
contexts: Context[];
|
|
|
|
contexts: Context[];
|
|
|
|
node: Node;
|
|
|
|
node: Node;
|
|
|
|
@ -40,7 +40,7 @@ export function unpack_destructuring({
|
|
|
|
scope: TemplateScope;
|
|
|
|
scope: TemplateScope;
|
|
|
|
component: Component;
|
|
|
|
component: Component;
|
|
|
|
context_rest_properties: Map<string, Node>;
|
|
|
|
context_rest_properties: Map<string, Node>;
|
|
|
|
number_of_computed_props?: number;
|
|
|
|
number_of_computed_props?: { n: number }; // we want to pass this by reference, as a sort of global variable
|
|
|
|
}) {
|
|
|
|
}) {
|
|
|
|
if (!node) return;
|
|
|
|
if (!node) return;
|
|
|
|
|
|
|
|
|
|
|
|
@ -133,8 +133,8 @@ export function unpack_destructuring({
|
|
|
|
|
|
|
|
|
|
|
|
if (property.computed) {
|
|
|
|
if (property.computed) {
|
|
|
|
// e.g { [computedProperty]: ... }
|
|
|
|
// e.g { [computedProperty]: ... }
|
|
|
|
const property_name = `#computed_property_${number_of_computed_props}`;
|
|
|
|
const property_name = `computed_property_${number_of_computed_props.n}`;
|
|
|
|
number_of_computed_props += 1;
|
|
|
|
number_of_computed_props.n += 1;
|
|
|
|
|
|
|
|
|
|
|
|
contexts.push({
|
|
|
|
contexts.push({
|
|
|
|
type: 'ComputedProperty',
|
|
|
|
type: 'ComputedProperty',
|
|
|
|
|