fix ts problem
This commit is contained in:
4
src/preload/index.d.ts
vendored
4
src/preload/index.d.ts
vendored
@@ -27,11 +27,11 @@ import type { Version } from "@shared/types/version";
|
||||
declare global {
|
||||
interface Window {
|
||||
electron: ElectronAPI;
|
||||
api: ElectronAPI;
|
||||
api: SelfAPI;
|
||||
}
|
||||
}
|
||||
|
||||
export interface ElectronAPI {
|
||||
export interface SelfAPI {
|
||||
// Platform detection
|
||||
platform: NodeJS.Platform;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { contextBridge, ipcRenderer } from "electron";
|
||||
import { electronAPI } from "@electron-toolkit/preload";
|
||||
import type { ElectronAPI } from "./index.d";
|
||||
import type { SelfAPI } from "./index.d";
|
||||
|
||||
// Custom APIs for renderer - bridges to IPC handlers
|
||||
const api: ElectronAPI = {
|
||||
const api: SelfAPI = {
|
||||
// Platform detection
|
||||
platform: process.platform,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user