From e59d40f885ed61c826c997b4f0d48d0b878b731c Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Fri, 15 Mar 2019 21:34:14 -0400 Subject: [PATCH] remove support for logic-less components with vars --- src/compile/Component.ts | 12 +----------- src/interfaces.ts | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 004ecb32ca..f2b6d25121 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -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; diff --git a/src/interfaces.ts b/src/interfaces.ts index 4ec258c94a..b3e778a48b 100644 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -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;