mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-21 16:14:28 +08:00
0.0.1
This commit is contained in:
23
src/preload/index.d.ts
vendored
Normal file
23
src/preload/index.d.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user