compiler: tag auto-subscribe stores in vars as referenced

Fixes unused variable warnings thrown by ESLint when using
auto-subscribe stores in templates.
pull/4089/head
David A Kondrad 6 years ago
parent 0a6310f7a3
commit f6ba6f234f

@ -203,7 +203,11 @@ export default class Component {
const subscribable_name = name.slice(1);
const variable = this.var_lookup.get(subscribable_name);
if (variable) variable.subscribable = true;
if (variable)
{
variable.referenced = true;
variable.subscribable = true;
}
} else {
this.used_names.add(name);
}

@ -8,7 +8,7 @@ export default {
module: false,
mutated: false,
reassigned: false,
referenced: false,
referenced: true,
referenced_from_script: false,
writable: true
},

Loading…
Cancel
Save