diff --git a/src/compile/Component.ts b/src/compile/Component.ts index 22e8a6ac1e..7a98eec6cb 100644 --- a/src/compile/Component.ts +++ b/src/compile/Component.ts @@ -68,7 +68,6 @@ export default class Component { module_script: Node; imports: Node[] = []; - hasComponents: boolean; module_javascript: string; javascript: string; @@ -90,18 +89,18 @@ export default class Component { file: string; locate: (c: number) => { line: number, column: number }; + // TODO this does the same as component.locate! remove one or the other + locator: (search: number, startIndex?: number) => { + line: number, + column: number + }; + stylesheet: Stylesheet; userVars: Set = new Set(); templateVars: Map = new Map(); aliases: Map = new Map(); usedNames: Set = new Set(); - init_uses_self = false; - - locator: (search: number, startIndex?: number) => { - line: number, - column: number - }; constructor( ast: Ast, diff --git a/src/compile/nodes/EventHandler.ts b/src/compile/nodes/EventHandler.ts index c561cedbeb..923f0e5f41 100644 --- a/src/compile/nodes/EventHandler.ts +++ b/src/compile/nodes/EventHandler.ts @@ -28,8 +28,6 @@ export default class EventHandler extends Node { this.expression = new Expression(component, this, template_scope, info.expression); this.usesContext = this.expression.usesContext; } else { - component.init_uses_self = true; - const name = component.getUniqueName(`${this.name}_handler`); component.declarations.push(name); diff --git a/src/compile/nodes/InlineComponent.ts b/src/compile/nodes/InlineComponent.ts index 017b28afd1..8380ff43cf 100644 --- a/src/compile/nodes/InlineComponent.ts +++ b/src/compile/nodes/InlineComponent.ts @@ -25,8 +25,6 @@ export default class InlineComponent extends Node { component.template_references.add(info.name); } - component.hasComponents = true; - this.name = info.name; this.expression = this.name === 'svelte:component' diff --git a/src/compile/render-dom/wrappers/Element/Binding.ts b/src/compile/render-dom/wrappers/Element/Binding.ts index ad3a7fd74d..b7adb6488e 100644 --- a/src/compile/render-dom/wrappers/Element/Binding.ts +++ b/src/compile/render-dom/wrappers/Element/Binding.ts @@ -272,7 +272,6 @@ function getValueFromDom( if (name === 'group') { const bindingGroup = getBindingGroup(renderer, binding.node.expression.node); if (type === 'checkbox') { - renderer.component.init_uses_self = true; return `@getBindingGroupValue($$self.$$.binding_groups[${bindingGroup}])`; }