From bcf0d2fa3c65dcba17df5569939edf84fcfe35ad Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Fri, 12 May 2023 17:28:58 +0200 Subject: [PATCH] Lint and format src/compiler/compile/nodes/shared/Tag.js --- src/compiler/compile/nodes/shared/Tag.js | 73 ++++++++++++------------ 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/src/compiler/compile/nodes/shared/Tag.js b/src/compiler/compile/nodes/shared/Tag.js index f1251367e6..4209ace674 100644 --- a/src/compiler/compile/nodes/shared/Tag.js +++ b/src/compiler/compile/nodes/shared/Tag.js @@ -3,42 +3,39 @@ import Expression from './Expression.js'; /** @extends Node */ export default class Tag extends Node { - - /** @type {'MustacheTag' | 'RawMustacheTag'} */ - type; - - /** @type {import('./Expression.js').default} */ - expression; - - /** @type {boolean} */ - should_cache; - - /** - * @param {any} component * - * @param {any} parent * - * @param {any} scope * - * @param {any} info undefined - */ - constructor(component, parent, scope, info) { - super(component, parent, scope, info); - component.tags.push(this); - this.cannot_use_innerhtml(); - this.expression = new Expression(component, this, scope, info.expression); - this.should_cache = - info.expression.type !== 'Identifier' || - (this.expression.dependencies.size && scope.names.has(info.expression.name)); - } - is_dependencies_static() { - return (this.expression.dynamic_contextual_dependencies().length === 0 && - this.expression.dynamic_dependencies().length === 0); - } - check_if_content_dynamic() { - if (!this.is_dependencies_static()) { - this.not_static_content(); - } - } + /** @type {'MustacheTag' | 'RawMustacheTag'} */ + type; + + /** @type {import('./Expression.js').default} */ + expression; + + /** @type {boolean} */ + should_cache; + + /** + * @param {any} component * + * @param {any} parent * + * @param {any} scope * + * @param {any} info undefined + */ + constructor(component, parent, scope, info) { + super(component, parent, scope, info); + component.tags.push(this); + this.cannot_use_innerhtml(); + this.expression = new Expression(component, this, scope, info.expression); + this.should_cache = + info.expression.type !== 'Identifier' || + (this.expression.dependencies.size && scope.names.has(info.expression.name)); + } + is_dependencies_static() { + return ( + this.expression.dynamic_contextual_dependencies().length === 0 && + this.expression.dynamic_dependencies().length === 0 + ); + } + check_if_content_dynamic() { + if (!this.is_dependencies_static()) { + this.not_static_content(); + } + } } - - - -