Taobin-Recipe-Manager/client-electron/electron/electron-env.d.ts

39 lines
1.1 KiB
TypeScript
Raw Normal View History

/* eslint-disable @typescript-eslint/consistent-type-imports */
2024-01-11 15:40:18 +07:00
/// <reference types="vite-plugin-electron/electron-env" />
declare namespace NodeJS {
interface ProcessEnv {
/**
* The built directory structure
*
* ```tree
* dist
* index.html
*
* dist-electron
* main.js
* preload.js
*
* ```
*/
DIST: string
/** /dist/ or /public/ */
VITE_PUBLIC: string
}
}
// Used in Renderer process, expose in `preload.ts`
interface Window {
ipcRenderer: import('electron').IpcRenderer
electronRuntime: boolean
platform: NodeJS.Platform
2024-03-15 14:10:24 +07:00
adbNativeTcpSocket: {
getProp(serial: string, key: string): Promise<string>
getDevices(): Promise<{ name: string; serial: string }[]>
connect(host: string, port: number): Promise<{ name: string; serial: string }>
shell(serial: string, command: string, callback: (chunk: Uint8Array) => void): Promise<void>
spawn(serial: string, command: string, callback: (chunk: Uint8Array) => void): Promise<void>
disconnect(): Promise<void>
}
2024-01-11 15:40:18 +07:00
}