fix typos, use shorthanded imports (#5993)

* fix(typo): existance -> existence

* fix(typo): seperate -> separate

* refactor(imports): use shorthand for periscopic
pull/5262/head
Aleksander Szołowicz 3 years ago committed by GitHub
parent 53e0754d3b
commit 999032835b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -545,11 +545,11 @@ function has_definite_elements(result: Map<Element, NodeExist>): boolean {
function add_to_map(from: Map<Element, NodeExist>, to: Map<Element, NodeExist>) {
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;
}

@ -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';

@ -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 = (

@ -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<string, any> = any,

Loading…
Cancel
Save