Explain why number_of_computed_props takes an object instead of number

pull/8386/head
Nguyen Tran 4 years ago
parent 332b2b249f
commit 8b2ad778f1

@ -40,7 +40,10 @@ 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?: { n: number }; // we want to pass this by reference, as a sort of global variable // we want to pass this by reference, as a sort of global variable, because
// if we pass this by value, we could get computed_property_# variable collisions
// when we deal with nested object destructuring
number_of_computed_props?: { n: number };
}) { }) {
if (!node) return; if (!node) return;

Loading…
Cancel
Save