Improve code and type safety

This commit is contained in:
2025-09-25 22:40:45 +03:00
Unverified
parent 0fbdcd04c9
commit f0925564c6
14 changed files with 156 additions and 99 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { app, BrowserWindow, Notification, ipcMain } from 'electron';
import path from "node:path";
import { NotificationShowOptions } from '../electron';
let mainWindow: BrowserWindow | null = null;
@@ -35,7 +36,7 @@ app.whenReady().then(() => {
});
// Handle showing notifications
ipcMain.handle('show-notification', async (event, options) => {
ipcMain.handle('show-notification', async (event, options: NotificationShowOptions) => {
if (Notification.isSupported()) {
try {
const notification = new Notification({