mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-20 23:54:26 +08:00
24 lines
518 B
TypeScript
24 lines
518 B
TypeScript
import { ElectronAPI } from '@electron-toolkit/preload'
|
|
|
|
export interface AppApi {
|
|
request: (payload: {
|
|
method: string
|
|
path: string
|
|
headers?: Record<string, string>
|
|
body?: unknown
|
|
}) => Promise<{ status: number; headers: Record<string, string>; bodyText: string }>
|
|
call: <T = unknown>(payload: {
|
|
method: string
|
|
path: string
|
|
headers?: Record<string, string>
|
|
body?: unknown
|
|
}) => Promise<T>
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
electron: ElectronAPI
|
|
api: AppApi
|
|
}
|
|
}
|