Skip to content

Commit

Permalink
fix: typed useWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbericoD committed Jan 9, 2024
1 parent 7554ca8 commit 9de4522
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/hooks/useWindow/useWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@ const actions: Behavior[] = [
"bringToFront",
];

export const useWindow = (
type UseWindow = (
name: string,
shouldDisplayLog?: boolean,
listenToWindowStateChanges?: boolean
) => [
(overwolf.windows.WindowInfo & WindowBehavior) | undefined,
overwolf.windows.WindowStateChangedEvent | undefined,
() => Promise<void>
];

export const useWindow: UseWindow = (
name,
shouldDisplayLog = false,
listenToWindowStateChanges = false
) => {
Expand Down

0 comments on commit 9de4522

Please sign in to comment.