示例工程 55-installers-and-channels

55-installers-and-channels/app/src/api.d.ts

typescript · 0.7 KB

import type { Snapshot } from "../shared/ipc";

declare global {
  interface Window {
    api: {
      channels: {
        snapshot: () => Promise<Snapshot>;
        refresh: () => Promise<Snapshot>;
        onEvent: (callback: (event: { at: number }) => void) => () => void;
      };
    };
    __demo?: () => Promise<{
      score: number;
      checks: number;
      passed: number;
      channels: number;
      installers: number;
      storeOff: boolean;
      directOn: boolean;
      enterpriseArtifact: string;
      personalChannel: string;
      storeMac: string;
      storeLinux: string;
      decisions: number;
    }>;
    __prepareShots?: (
      stage: "channels" | "installers" | "decisions",
    ) => Promise<void>;
  }
}

export {};