@vegajs/vortex-devtools
Version:
Vortex devtools
27 lines (25 loc) • 639 B
TypeScript
type Action = 'update' | 'subscribe' | 'unsubscribe' | 'reset' | 'error' | 'init';
type ActionPayload<T> = {
action: Action;
newData: T;
oldData: T;
storeName: string;
timestamp: string;
};
type DevToolsGlobal = {
initializedStores: string[];
events: ActionPayload<unknown>[];
initialized: boolean;
enable: boolean;
};
declare global {
interface Window {
__VORTEX_DEVTOOLS__: DevToolsGlobal;
myFunction(): boolean;
myVariable: number;
}
}
declare function initDevtools({ enableDevTools, }?: {
enableDevTools?: boolean | undefined;
}): void;
export { initDevtools };