Skip to content

Commit 3d142fd

Browse files
refactor: remove unused imports and improve type definitions in global keybinds
1 parent 3c37f46 commit 3d142fd

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/plugins/global-keybinds/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { globalShortcut, ipcMain, type MenuItem } from 'electron';
1+
import { globalShortcut, ipcMain } from 'electron';
22
import prompt, { type KeybindOptions } from 'custom-electron-prompt';
33
import { eventRace } from './utils';
44

@@ -7,7 +7,6 @@ import { createPlugin } from '@/utils';
77
import promptOptions from '@/providers/prompt-options';
88
import { onPlayerApiReady } from './renderer';
99
import { t } from '@/i18n';
10-
import { restart } from '@/providers/app-controls';
1110

1211
export type GlobalKeybindsPluginConfig = {
1312
enabled: boolean;

src/plugins/global-keybinds/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function $<E extends Element = Element>(selector: string) {
99

1010
let api: MusicPlayer;
1111

12-
export const onPlayerApiReady = async (
12+
export const onPlayerApiReady = (
1313
playerApi: MusicPlayer,
1414
context: RendererContext<GlobalKeybindsPluginConfig>,
1515
) => {

src/plugins/global-keybinds/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export function eventRace(
2-
{ single, double }: { single: Function; double: Function },
2+
{ single, double }: { single: () => void; double: () => void },
33
time = 200,
44
) {
55
let timeout: NodeJS.Timeout | null = null;

0 commit comments

Comments
 (0)