diff --git a/src/main/tray.ts b/src/main/tray.ts index 494b437..270dc43 100644 --- a/src/main/tray.ts +++ b/src/main/tray.ts @@ -1,9 +1,10 @@ import electron from 'electron'; +import type { Tray as TrayType } from 'electron'; const { app, Tray, Menu, nativeImage } = electron; -let tray: Tray | null = null; +let tray: TrayType | null = null; -export function createTray(showInbox: () => void, showCapture: () => void): Tray { +export function createTray(showInbox: () => void, showCapture: () => void): TrayType { const icon = nativeImage.createEmpty(); tray = new Tray(icon); tray.setToolTip('Inkling'); diff --git a/src/main/windows/inboxWindow.ts b/src/main/windows/inboxWindow.ts index 976b5ad..5329121 100644 --- a/src/main/windows/inboxWindow.ts +++ b/src/main/windows/inboxWindow.ts @@ -1,16 +1,17 @@ import electron from 'electron'; +import type { BrowserWindow as BrowserWindowType } from 'electron'; const { BrowserWindow, app } = electron; import { join } from 'node:path'; import { fileURLToPath } from 'node:url'; -let inboxWindow: BrowserWindow | null = null; +let inboxWindow: BrowserWindowType | null = null; const __dirname = fileURLToPath(new URL('.', import.meta.url)); -export function getInboxWindow(): BrowserWindow | null { +export function getInboxWindow(): BrowserWindowType | null { return inboxWindow; } -export function createInboxWindow(): BrowserWindow { +export function createInboxWindow(): BrowserWindowType { if (inboxWindow && !inboxWindow.isDestroyed()) { inboxWindow.show(); inboxWindow.focus(); diff --git a/src/main/windows/quickCaptureWindow.ts b/src/main/windows/quickCaptureWindow.ts index 18c9cca..1cf8cee 100644 --- a/src/main/windows/quickCaptureWindow.ts +++ b/src/main/windows/quickCaptureWindow.ts @@ -1,14 +1,15 @@ import electron from 'electron'; +import type { BrowserWindow as BrowserWindowType } from 'electron'; const { BrowserWindow, screen } = electron; import { join } from 'node:path'; import { fileURLToPath } from 'node:url'; -let win: BrowserWindow | null = null; +let win: BrowserWindowType | null = null; const __dirname = fileURLToPath(new URL('.', import.meta.url)); -export function getQuickCaptureWindow(): BrowserWindow | null { return win; } +export function getQuickCaptureWindow(): BrowserWindowType | null { return win; } -export function createQuickCaptureWindow(): BrowserWindow { +export function createQuickCaptureWindow(): BrowserWindowType { if (win && !win.isDestroyed()) return win; const primary = screen.getPrimaryDisplay(); const W = 640, H = 280;