瀏覽代碼

fix: correct types for dialogOpened and dialogClosed events

Sv443 7 月之前
父節點
當前提交
8e3dc010f1
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      src/interface.ts

+ 8 - 8
src/interface.ts

@@ -66,14 +66,14 @@ export type InterfaceEvents = {
    */
   "bytm:fatalError": string;
 
-  /** Emitted when a dialog was opened - returns the dialog's instance */
-  "bytm:dialogOpened": BytmDialog;
-  /** Emitted when the dialog with the specified ID was opened - returns the dialog's instance - in TS, use `"bytm:dialogOpened:myIdWhatever" as "bytm:dialogOpened:id"` to make the error go away */
-  "bytm:dialogOpened:id": BytmDialog;
-  /** Emitted when a dialog was closed - returns the dialog's instance */
-  "bytm:dialogClosed": BytmDialog;
-  /** Emitted when the dialog with the specified ID was closed - returns the dialog's instance - in TS, use `"bytm:dialogClosed:myIdWhatever" as "bytm:dialogClosed:id"` to make the error go away */
-  "bytm:dialogClosed:id": BytmDialog;
+  /** Emitted when a dialog was opened - returns the dialog's instance (or undefined in the case of the config menu) */
+  "bytm:dialogOpened": BytmDialog | undefined;
+  /** Emitted when the dialog with the specified ID was opened - returns the dialog's instance (or undefined in the case of the config menu) - in TS, use `"bytm:dialogOpened:myIdWhatever" as "bytm:dialogOpened:id"` to make the error go away */
+  "bytm:dialogOpened:id": BytmDialog | undefined;
+  /** Emitted when a dialog was closed - returns the dialog's instance (or undefined in the case of the config menu) */
+  "bytm:dialogClosed": BytmDialog | undefined;
+  /** Emitted when the dialog with the specified ID was closed - returns the dialog's instance (or undefined in the case of the config menu) - in TS, use `"bytm:dialogClosed:myIdWhatever" as "bytm:dialogClosed:id"` to make the error go away */
+  "bytm:dialogClosed:id": BytmDialog | undefined;
 
   /** Emitted whenever the lyrics URL for a song is loaded */
   "bytm:lyricsLoaded": { type: "current" | "queue", artists: string, title: string, url: string };