示例工程 14-react-bootstrap

14-react-bootstrap/app/src/lib/api.ts

typescript · 0.5 KB

import type { Counts, LabInfo } from "../../shared/ipc";

export type TabId = "strict" | "architecture" | "hmr";

declare global {
  interface Window {
    api: {
      reset(): Promise<void>;
      bump(key: string): Promise<number>;
      idem(opId: string): Promise<Counts["idem"]>;
      counts(): Promise<Counts>;
      info(): Promise<LabInfo>;
    };
    __setTab?: (tab: TabId) => void;
    __snapshot?: () => unknown;
    __smoke?: () => Promise<unknown>;
  }
}

export {};