From 8b5185fa059d2ca0f53aaaaf8ff9f1429d51e48d Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Fri, 12 May 2023 17:35:50 +0200 Subject: [PATCH] Lint and format src/compiler/compile/nodes/Action.js --- src/compiler/compile/nodes/Action.js | 71 +++++++++++++--------------- 1 file changed, 33 insertions(+), 38 deletions(-) diff --git a/src/compiler/compile/nodes/Action.js b/src/compiler/compile/nodes/Action.js index 2072c0b9df..aa0a5d98db 100644 --- a/src/compiler/compile/nodes/Action.js +++ b/src/compiler/compile/nodes/Action.js @@ -3,42 +3,37 @@ import Expression from './shared/Expression.js'; /** @extends Node */ export default class Action extends Node { - - /** @type {'Action'} */ - type; - - /** @type {string} */ - name; - - /** @type {import('./shared/Expression.js').default} */ - expression; - - /** @type {boolean} */ - uses_context; - - /** @type {import('./shared/TemplateScope.js').default} */ - template_scope; - - /** - * @param {import('../Component.js').default} component * - * @param {import('./shared/Node.js').default} parent * - * @param {import('./shared/TemplateScope.js').default} scope * - * @param {import('../../interfaces.js').Directive} info undefined - */ - constructor(component, parent, scope, info) { - super(component, parent, scope, info); - const object = info.name.split('.')[0]; - component.warn_if_undefined(object, info, scope); - this.name = info.name; - component.add_reference(/** @type {any} */ (this), object); - this.expression = info.expression - ? new Expression(component, this, scope, info.expression) - : null; - this.template_scope = scope; - this.uses_context = this.expression && this.expression.uses_context; - } + /** @type {'Action'} */ + type; + + /** @type {string} */ + name; + + /** @type {import('./shared/Expression.js').default} */ + expression; + + /** @type {boolean} */ + uses_context; + + /** @type {import('./shared/TemplateScope.js').default} */ + template_scope; + + /** + * @param {import('../Component.js').default} component * + * @param {import('./shared/Node.js').default} parent * + * @param {import('./shared/TemplateScope.js').default} scope * + * @param {import('../../interfaces.js').Directive} info undefined + */ + constructor(component, parent, scope, info) { + super(component, parent, scope, info); + const object = info.name.split('.')[0]; + component.warn_if_undefined(object, info, scope); + this.name = info.name; + component.add_reference(/** @type {any} */ (this), object); + this.expression = info.expression + ? new Expression(component, this, scope, info.expression) + : null; + this.template_scope = scope; + this.uses_context = this.expression && this.expression.uses_context; + } } - - - -