From 999032835b90ebfa29d7ef2dea3b69518fc7d6ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksander=20Szo=C5=82owicz?= Date: Mon, 12 Jul 2021 16:56:20 +0200 Subject: [PATCH] fix typos, use shorthanded imports (#5993) * fix(typo): existance -> existence * fix(typo): seperate -> separate * refactor(imports): use shorthand for periscopic --- src/compiler/compile/css/Selector.ts | 4 ++-- src/compiler/compile/render_dom/index.ts | 2 +- src/compiler/compile/render_dom/invalidate.ts | 4 ++-- src/runtime/internal/dev.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts index 42e9b1fe6b..8dfb135c3a 100644 --- a/src/compiler/compile/css/Selector.ts +++ b/src/compiler/compile/css/Selector.ts @@ -545,11 +545,11 @@ function has_definite_elements(result: Map): boolean { function add_to_map(from: Map, to: Map) { from.forEach((exist, element) => { - to.set(element, higher_existance(exist, to.get(element))); + to.set(element, higher_existence(exist, to.get(element))); }); } -function higher_existance(exist1: NodeExist | null, exist2: NodeExist | null): NodeExist { +function higher_existence(exist1: NodeExist | null, exist2: NodeExist | null): NodeExist { if (exist1 === undefined || exist2 === undefined) return exist1 || exist2; return exist1 > exist2 ? exist1 : exist2; } diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts index fc9c5b87dd..74c0769d09 100644 --- a/src/compiler/compile/render_dom/index.ts +++ b/src/compiler/compile/render_dom/index.ts @@ -3,7 +3,7 @@ import Component from '../Component'; import Renderer from './Renderer'; import { CompileOptions, CssResult } from '../../interfaces'; import { walk } from 'estree-walker'; -import { extract_names, Scope } from '../utils/scope'; +import { extract_names, Scope } from 'periscopic'; import { invalidate } from './invalidate'; import Block from './Block'; import { ClassDeclaration, FunctionExpression, Node, Statement, ObjectExpression, Expression } from 'estree'; diff --git a/src/compiler/compile/render_dom/invalidate.ts b/src/compiler/compile/render_dom/invalidate.ts index 46ffe48284..7eeb34a894 100644 --- a/src/compiler/compile/render_dom/invalidate.ts +++ b/src/compiler/compile/render_dom/invalidate.ts @@ -1,5 +1,5 @@ import { nodes_match } from '../../utils/nodes_match'; -import { Scope } from '../utils/scope'; +import { Scope } from 'periscopic'; import { x } from 'code-red'; import { Node, Expression } from 'estree'; import Renderer from './Renderer'; @@ -52,7 +52,7 @@ export function invalidate(renderer: Renderer, scope: Scope, node: Node, names: if (is_store_value) { return x`@set_store_value(${head.name.slice(1)}, ${node}, ${head.name}, ${extra_args})`; } - + let invalidate; if (!main_execution_context) { const pass_value = ( diff --git a/src/runtime/internal/dev.ts b/src/runtime/internal/dev.ts index 4e4e5326f9..73fd32bf19 100644 --- a/src/runtime/internal/dev.ts +++ b/src/runtime/internal/dev.ts @@ -203,7 +203,7 @@ export interface SvelteComponentTyped< * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {} * const component: typeof SvelteComponent = ASubclassOfSvelteComponent; * ``` - * will throw a type error, so we need to seperate the more strictly typed class. + * will throw a type error, so we need to separate the more strictly typed class. */ export class SvelteComponentTyped< Props extends Record = any,