fix types and lint

This commit is contained in:
Anton Bracke 2022-02-22 18:15:36 +01:00
parent 6b97cbfc17
commit 07d3ea961e
No known key found for this signature in database
GPG Key ID: B1222603899C6B25
3 changed files with 4 additions and 6 deletions

View File

@ -64,7 +64,7 @@ export default () => {
return true; return true;
}); });
ipcMain.handle("local-app:addServer", async (event, server: Omit<Server, "_id">) => { ipcMain.handle("local-app:addServer", (event, server: Omit<Server, "_id">) => {
const servers = settings.get("servers") || []; const servers = settings.get("servers") || [];
try { try {

View File

@ -1,4 +1,4 @@
import { contextBridge, ipcRenderer, IpcRendererEvent } from "electron"; import { contextBridge, ipcRenderer } from "electron";
import type { WorkAdventureDesktopApi } from "./types"; import type { WorkAdventureDesktopApi } from "./types";
const api: WorkAdventureDesktopApi = { const api: WorkAdventureDesktopApi = {

View File

@ -1,10 +1,8 @@
import type { IpcRendererEvent } from "electron";
export type WorkAdventureDesktopApi = { export type WorkAdventureDesktopApi = {
desktop: boolean; desktop: boolean;
isDevelopment: () => Promise<boolean>; isDevelopment: () => Promise<boolean>;
getVersion: () => Promise<string>; getVersion: () => Promise<string>;
notify: (txt: string) => void; notify: (txt: string) => void;
onMuteToggle: (callback: (event: IpcRendererEvent) => void) => void; onMuteToggle: (callback: () => void) => void;
onCameraToggle: (callback: (event: IpcRendererEvent) => void) => void; onCameraToggle: (callback: () => void) => void;
}; };