UNPKG

1.14 kBTypeScriptView Raw
1import { Hooks } from "./hooks";
2import { AttachData } from "./helpers/attachto";
3import { VNodeStyle } from "./modules/style";
4import { On } from "./modules/eventlisteners";
5import { Attrs } from "./modules/attributes";
6import { Classes } from "./modules/class";
7import { Props } from "./modules/props";
8import { Dataset } from "./modules/dataset";
9export declare type Key = string | number | symbol;
10export interface VNode {
11 sel: string | undefined;
12 data: VNodeData | undefined;
13 children: Array<VNode | string> | undefined;
14 elm: Node | undefined;
15 text: string | undefined;
16 key: Key | undefined;
17}
18export interface VNodeData {
19 props?: Props;
20 attrs?: Attrs;
21 class?: Classes;
22 style?: VNodeStyle;
23 dataset?: Dataset;
24 on?: On;
25 attachData?: AttachData;
26 hook?: Hooks;
27 key?: Key;
28 ns?: string;
29 fn?: () => VNode;
30 args?: any[];
31 is?: string;
32 [key: string]: any;
33}
34export declare function vnode(sel: string | undefined, data: any | undefined, children: Array<VNode | string> | undefined, text: string | undefined, elm: Element | DocumentFragment | Text | undefined): VNode;