更新 Electron API 类型声明,添加身份证监听相关方法,并修改 Window 接口以确保 electronAPI 不可选
This commit is contained in:
11
src/vite-env.d.ts
vendored
11
src/vite-env.d.ts
vendored
@@ -1,12 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface Window {
|
||||
electronAPI: {
|
||||
startIdCardListen: () => Promise<any>;
|
||||
stopIdCardListen: () => Promise<any>;
|
||||
onIdCardData: (callback: (data: any) => void) => void;
|
||||
onIdCardError: (callback: (error: any) => void) => void;
|
||||
log: (level: string, message: any) => void;
|
||||
removeIdCardListeners: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user