mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix open CommandDialog (#5818)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
81e4dabf01
commit
ede8a2e91f
13 files changed
+2241
-76
No files matched your search
@@ -7,8 +7,9 @@ import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { Disposer } from "../utils";
|
||||
|
||||
export type AddWindowEventListener = typeof addWindowEventListener;
|
||||
export type WindowEventListener<K extends keyof WindowEventMap> = (this: Window, ev: WindowEventMap[K]) => any;
|
||||
|
||||
function addWindowEventListener<K extends keyof WindowEventMap>(type: K, listener: (this: Window, ev: WindowEventMap[K]) => any, options?: boolean | AddEventListenerOptions): Disposer {
|
||||
function addWindowEventListener<K extends keyof WindowEventMap>(type: K, listener: WindowEventListener<K>, options?: boolean | AddEventListenerOptions): Disposer {
|
||||
window.addEventListener(type, listener, options);
|
||||
|
||||
return () => void window.removeEventListener(type, listener);
|
||||
|
||||
Reference in new issue
Block a user