49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
// // src/types/global.d.ts
|
|
// export {};
|
|
//
|
|
// declare global {
|
|
// interface Window {
|
|
// electron: typeof import("@electron-toolkit/preload").electronAPI;
|
|
// api: {
|
|
// xiao: string;
|
|
// };
|
|
// demo_xiao: {
|
|
// demoFun: (data: string) => void;
|
|
// read_file: () => Promise<string>;
|
|
// onBarcodeScanned: (callback: BarcodeCallback) => void;
|
|
// };
|
|
// electronAPI: (callback: (args) => void) => Promise<string>;
|
|
// 向主进程发送消息事件监听器: (msg_data: string) => void;
|
|
// 主进程向渲染进程发消息: (回调函数: (返回的数据: string) => void) => void;
|
|
// }
|
|
// }
|
|
// src/types/global.d.ts
|
|
export {};
|
|
|
|
declare global {
|
|
interface Window {
|
|
/* ===== 你原来的 ===== */
|
|
electron: typeof import("@electron-toolkit/preload").electronAPI;
|
|
//
|
|
// api: {
|
|
// xiao: string;
|
|
// };
|
|
//
|
|
// demo_xiao: {
|
|
// demoFun: (data: string) => void;
|
|
// read_file: () => Promise<string>;
|
|
// onBarcodeScanned: (callback: BarcodeCallback) => void;
|
|
// };
|
|
//
|
|
// electronAPI: (callback: (args: any) => void) => Promise<string>;
|
|
//
|
|
// 向主进程发送消息事件监听器: (msg_data: string) => void;
|
|
// 主进程向渲染进程发消息: (回调函数: (返回的数据: string) => void) => void;
|
|
// on发送登陆状态事件: (回调函数: (推送的值: WeChatUserInfoType) => void) => void;
|
|
/* ===== 新增:微信 PC OpenSDK ===== */
|
|
}
|
|
|
|
|
|
}
|
|
|