示例工程 32-deep-links-file-association
32-deep-links-file-association/app/src/api.d.ts
import type { LinksSnapshot } from "../shared/ipc";
declare global {
interface Window {
api: {
links: {
get: () => Promise<LinksSnapshot>;
simulateUrl: (url: string) => Promise<LinksSnapshot>;
simulateFile: (path: string) => Promise<LinksSnapshot>;
simulateSecond: (url: string) => Promise<LinksSnapshot>;
clear: () => Promise<LinksSnapshot>;
onChange: (callback: (state: LinksSnapshot) => void) => () => void;
};
};
__prepareShots?: (stage: "link" | "reject" | "file") => Promise<void>;
__smoke?: () => Promise<unknown>;
}
}
export {};