2024-01-14 22:02:03 +07:00
|
|
|
/* 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
|
2024-01-19 17:53:48 +07:00
|
|
|
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
|
|
|
}
|