remove support for logic-less components with vars

pull/2230/head
Richard Harris 6 years ago
parent bc04947046
commit 8c61edf2d5

@ -169,15 +169,6 @@ export default class Component {
const variable = this.var_lookup.get(subscribable_name);
variable.subscribable = true;
} else if (!this.ast.instance) {
this.add_var({
name,
export_name: name,
implicit: true,
mutated: false,
referenced: true,
writable: true
});
} else {
this.usedNames.add(name);
}
@ -1140,7 +1131,7 @@ export default class Component {
return `ctx.${name}`;
}
warn_if_undefined(node, template_scope: TemplateScope, allow_implicit?: boolean) {
warn_if_undefined(node, template_scope: TemplateScope) {
let { name } = node;
if (name[0] === '$') {
@ -1148,7 +1139,6 @@ export default class Component {
this.has_reactive_assignments = true;
}
if (allow_implicit && !this.ast.instance && !this.ast.module) return;
if (this.var_lookup.has(name)) return;
if (template_scope && template_scope.names.has(name)) return;
if (globalWhitelist.has(name)) return;

@ -85,7 +85,6 @@ export interface Var {
// used internally, but not exposed
global?: boolean;
implicit?: boolean; // logic-less template references
internal?: boolean; // event handlers, bindings
initialised?: boolean;
hoistable?: boolean;

Loading…
Cancel
Save