示例工程 01-what-is-electron
01-what-is-electron/app/.tsc/shared/ipc.d.ts
/**
* 三端唯一来源:通道名、请求/响应类型。
* 本文件同时被 main / preload / renderer 引用,禁止在这里 import electron。
*/
export declare const CH: {
readonly info: "app:info";
readonly setTab: "ui:set-tab";
};
export type TabId = "overview" | "processes" | "security";
export type AppInfo = {
electron: string;
node: string;
chrome: string;
platform: string;
arch: string;
mainPid: number;
rendererPid: number;
memoryMB: number;
};
export type Api = {
info(): Promise<AppInfo>;
};
/** 手写校验:不引入第三方库。 */
export declare function isTabId(value: unknown): value is TabId;
//# sourceMappingURL=ipc.d.ts.map