示例工程 32-deep-links-file-association

32-deep-links-file-association/app/.tsc/shared/ipc.d.ts

typescript · 1.2 KB

export declare const CH: {
    readonly get: "links:get";
    readonly simulateUrl: "links:simulate-url";
    readonly simulateFile: "links:simulate-file";
    readonly simulateSecond: "links:simulate-second";
    readonly clear: "links:clear";
    readonly changed: "links:changed";
};
export type LinkResult = {
    ok: boolean;
    kind: "open" | "search" | "none";
    label: string;
    detail: string;
};
export type FileResult = {
    ok: boolean;
    path: string;
    title: string;
    body: string;
    size: number;
    error: string;
};
export type LinkEvent = {
    at: number;
    source: "open-url" | "second-instance" | "open-file" | "simulate" | "system";
    text: string;
};
export type LinksSnapshot = {
    platform: string;
    packaged: boolean;
    protocolRegistered: boolean;
    singleInstance: boolean;
    samplePath: string;
    lastLink: LinkResult | null;
    lastFile: FileResult | null;
    lastError: string;
    events: LinkEvent[];
};
export declare function assertUrlReq(value: unknown): asserts value is {
    url: string;
};
export declare function assertFileReq(value: unknown): asserts value is {
    path: string;
};
//# sourceMappingURL=ipc.d.ts.map