@muban/muban
Version:
Writing components for server-rendered HTML
26 lines (25 loc) • 1.23 kB
TypeScript
import type { InternalComponentInstance, InternalNodeInstance } from '../Component.types';
import type { App } from '../api/apiCreateApp';
interface AppRecord {
id: number;
app: App;
version: string;
types: Record<string, string | symbol>;
}
interface DevtoolsHook {
emit: (event: string, ...payload: Array<any>) => void;
on: (event: string, handler: Function) => void;
once: (event: string, handler: Function) => void;
off: (event: string, handler: Function) => void;
appRecords: Array<AppRecord>;
}
export declare let devtools: DevtoolsHook;
export declare function setDevtoolsHook(hook: DevtoolsHook): void;
export declare function devtoolsInitApp(app: App, version: string): void;
export declare function devtoolsUnmountApp(app: App): void;
export declare const devtoolsComponentAdded: (component: InternalNodeInstance) => void;
export declare const devtoolsComponentUpdated: (component: InternalNodeInstance) => void;
export declare const devtoolsComponentRemoved: (component: InternalNodeInstance) => void;
export declare function devtoolsComponentEmit(component: InternalComponentInstance, event: string, parameters: Array<any>): void;
export declare function initDev(): void;
export {};