UNPKG

941 BTypeScriptView Raw
1import { VNode } from './vnode';
2export declare type PreHook = () => any;
3export declare type InitHook = (vNode: VNode) => any;
4export declare type CreateHook = (emptyVNode: VNode, vNode: VNode) => any;
5export declare type InsertHook = (vNode: VNode) => any;
6export declare type PrePatchHook = (oldVNode: VNode, vNode: VNode) => any;
7export declare type UpdateHook = (oldVNode: VNode, vNode: VNode) => any;
8export declare type PostPatchHook = (oldVNode: VNode, vNode: VNode) => any;
9export declare type DestroyHook = (vNode: VNode) => any;
10export declare type RemoveHook = (vNode: VNode, removeCallback: () => void) => any;
11export declare type PostHook = () => any;
12export interface Hooks {
13 pre?: PreHook;
14 init?: InitHook;
15 create?: CreateHook;
16 insert?: InsertHook;
17 prepatch?: PrePatchHook;
18 update?: UpdateHook;
19 postpatch?: PostPatchHook;
20 destroy?: DestroyHook;
21 remove?: RemoveHook;
22 post?: PostHook;
23}