示例工程 56-auto-update

56-auto-update/app/src/api.d.ts

typescript · 0.7 KB

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

declare global {
  interface Window {
    api: {
      updates: {
        snapshot: () => Promise<Snapshot>;
        refresh: () => Promise<Snapshot>;
        onEvent: (callback: (event: { at: number }) => void) => () => void;
      };
    };
    __demo?: () => Promise<{
      score: number;
      checks: number;
      passed: number;
      schemes: number;
      feeds: number;
      macStatus: string;
      macLatest: string;
      winStatus: string;
      winLatest: string;
      noneStatus: string;
      invalidStatus: string;
      noInstall: boolean;
    }>;
    __prepareShots?: (
      stage: "schemes" | "available" | "limits",
    ) => Promise<void>;
  }
}

export {};