chore: ignore style for lib folder
This commit is contained in:
parent
87e7f2f40b
commit
aed7477085
3 changed files with 22 additions and 26 deletions
2
.eslintignore
Normal file
2
.eslintignore
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
/*
|
||||||
|
!/src
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -3,13 +3,12 @@
|
||||||
# editors
|
# editors
|
||||||
!/.vscode
|
!/.vscode
|
||||||
|
|
||||||
# git
|
|
||||||
!/.gitignore
|
|
||||||
|
|
||||||
# makefile
|
# makefile
|
||||||
!/makefile
|
!/makefile
|
||||||
|
|
||||||
# config
|
# config
|
||||||
|
!/.gitignore
|
||||||
|
!/.eslintignore
|
||||||
!/.eslintrc.yml
|
!/.eslintrc.yml
|
||||||
!/tsconfig.json
|
!/tsconfig.json
|
||||||
|
|
||||||
|
|
41
lib/nodes.d.ts
vendored
41
lib/nodes.d.ts
vendored
|
@ -1,31 +1,26 @@
|
||||||
import { Nil, Nilable } from "./lang.js";
|
import { Nil, Nilable } from "./lang.js";
|
||||||
export declare type AnyNode = TextNode | Elem | Frag | Nil | false;
|
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 function F(...children: AnyNode[]): Frag;
|
||||||
export declare class Frag {
|
export declare class Frag {
|
||||||
#private;
|
#private;
|
||||||
constructor();
|
constructor();
|
||||||
get children(): Nilable<AnyNode[]>;
|
get children(): Nilable<AnyNode[]>;
|
||||||
withText(text: string): this;
|
withText(text: string): this;
|
||||||
addText(text: string): void;
|
addText(text: string): void;
|
||||||
withChildren(...nodes: AnyNode[]): this;
|
withChildren(...nodes: AnyNode[]): this;
|
||||||
addChild(node: AnyNode): void;
|
addChild(node: AnyNode): void;
|
||||||
}
|
}
|
||||||
export declare function E(
|
export declare function E(tagName: string, attrs: ElemAttrs, ...children: AnyNode[]): Elem;
|
||||||
tagName: string,
|
|
||||||
attrs: ElemAttrs,
|
|
||||||
...children: AnyNode[]
|
|
||||||
): Elem;
|
|
||||||
export declare type ElemAttrs = Record<string, unknown>;
|
export declare type ElemAttrs = Record<string, unknown>;
|
||||||
export declare class Elem extends Frag {
|
export declare class Elem extends Frag {
|
||||||
#private;
|
#private;
|
||||||
constructor(tagName: string);
|
constructor(tagName: string);
|
||||||
get tagName(): string;
|
get tagName(): string;
|
||||||
get attrs(): Record<string, unknown>;
|
get attrs(): Record<string, unknown>;
|
||||||
withAttrs(attrs: Record<string, unknown>): Elem;
|
withAttrs(attrs: Record<string, unknown>): Elem;
|
||||||
withAttr(name: string, value: unknown): Elem;
|
withAttr(name: string, value: unknown): Elem;
|
||||||
addAttr(name: string, value: unknown): void;
|
addAttr(name: string, value: unknown): void;
|
||||||
addChild(node: AnyNode): void;
|
addChild(node: AnyNode): void;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue