UNPKG

@muban/muban

Version:

Writing components for server-rendered HTML

12 lines (11 loc) 748 B
import type { InternalComponentInstance } from '../Component.types'; export declare enum LifecycleHooks { Mounted = "m", Unmounted = "um" } export declare function injectHook(type: LifecycleHooks, hook: Function & { __weh?: () => void; }, target?: InternalComponentInstance | null, prepend?: boolean): Function | undefined; export declare const createHook: <T extends Function = () => any>(lifecycle: LifecycleHooks) => (hook: T, target?: InternalComponentInstance | null) => Function | undefined; export declare const onMounted: (hook: () => any, target?: InternalComponentInstance | null) => Function | undefined; export declare const onUnmounted: (hook: () => any, target?: InternalComponentInstance | null) => Function | undefined;