UNPKG

1.18 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';
9import { Hero } from './modules/hero';
10export declare type Key = string | number;
11export interface VNode {
12 sel: string | undefined;
13 data: VNodeData | undefined;
14 children: Array<VNode | string> | undefined;
15 elm: Node | undefined;
16 text: string | undefined;
17 key: Key | undefined;
18}
19export interface VNodeData {
20 props?: Props;
21 attrs?: Attrs;
22 class?: Classes;
23 style?: VNodeStyle;
24 dataset?: Dataset;
25 on?: On;
26 hero?: Hero;
27 attachData?: AttachData;
28 hook?: Hooks;
29 key?: Key;
30 ns?: string;
31 fn?: () => VNode;
32 args?: Array<any>;
33 [key: string]: any;
34}
35export declare function vnode(sel: string | undefined, data: any | undefined, children: Array<VNode | string> | undefined, text: string | undefined, elm: Element | Text | undefined): VNode;
36export default vnode;