wujie.d.ts
544 Bytes
/** wujie 注入到子应用 iframe 的全局对象(与 system 子应用一致)。 */
export {};
declare global {
interface WujieBus {
$on: (event: string, handler: (...args: unknown[]) => void) => void;
$off: (event: string, handler: (...args: unknown[]) => void) => void;
$emit: (event: string, ...args: unknown[]) => void;
}
interface Window {
$wujie?: { bus: WujieBus; props?: Record<string, unknown> };
__POWERED_BY_WUJIE__?: boolean;
__WUJIE_MOUNT?: () => void;
__WUJIE_UNMOUNT?: () => void;
}
}