From aed74770850c7a398f8463115c924e2b54ceab14 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 18 Mar 2022 22:49:56 +0300 Subject: [PATCH] chore: ignore style for lib folder --- .eslintignore | 2 ++ .gitignore | 5 ++--- lib/nodes.d.ts | 41 ++++++++++++++++++----------------------- 3 files changed, 22 insertions(+), 26 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..4e4b960 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +/* +!/src \ No newline at end of file diff --git a/.gitignore b/.gitignore index f0ccf1b..89e57cd 100644 --- a/.gitignore +++ b/.gitignore @@ -3,13 +3,12 @@ # editors !/.vscode -# git -!/.gitignore - # makefile !/makefile # config +!/.gitignore +!/.eslintignore !/.eslintrc.yml !/tsconfig.json diff --git a/lib/nodes.d.ts b/lib/nodes.d.ts index e2c0b4d..4cd4ce8 100644 --- a/lib/nodes.d.ts +++ b/lib/nodes.d.ts @@ -1,31 +1,26 @@ import { Nil, Nilable } from "./lang.js"; export declare type AnyNode = TextNode | Elem | Frag | Nil | false; - -export declare class TextNode extends String {} - +export declare class TextNode extends String { +} export declare function F(...children: AnyNode[]): Frag; export declare class Frag { - #private; - constructor(); - get children(): Nilable; - withText(text: string): this; - addText(text: string): void; - withChildren(...nodes: AnyNode[]): this; - addChild(node: AnyNode): void; + #private; + constructor(); + get children(): Nilable; + withText(text: string): this; + addText(text: string): void; + withChildren(...nodes: AnyNode[]): this; + addChild(node: AnyNode): void; } -export declare function E( - tagName: string, - attrs: ElemAttrs, - ...children: AnyNode[] -): Elem; +export declare function E(tagName: string, attrs: ElemAttrs, ...children: AnyNode[]): Elem; export declare type ElemAttrs = Record; export declare class Elem extends Frag { - #private; - constructor(tagName: string); - get tagName(): string; - get attrs(): Record; - withAttrs(attrs: Record): Elem; - withAttr(name: string, value: unknown): Elem; - addAttr(name: string, value: unknown): void; - addChild(node: AnyNode): void; + #private; + constructor(tagName: string); + get tagName(): string; + get attrs(): Record; + withAttrs(attrs: Record): Elem; + withAttr(name: string, value: unknown): Elem; + addAttr(name: string, value: unknown): void; + addChild(node: AnyNode): void; }