mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 17:19:59 +00:00
Update all dependencies
This commit is contained in:
@@ -6,7 +6,7 @@ import { Message } from "../types";
|
||||
const WEBSOCKET_DAEMON_URL = "ws://localhost:9556";
|
||||
|
||||
|
||||
type DisconnectListener = () => void;
|
||||
type DisconnectListener = (port: browser.runtime.Port) => void;;
|
||||
type MessageListener = (message: any) => void;
|
||||
|
||||
function connectNative (application: string) {
|
||||
@@ -126,7 +126,7 @@ function connectNative (application: string) {
|
||||
}
|
||||
|
||||
for (const listener of onDisconnectListeners) {
|
||||
listener();
|
||||
listener(portObject);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface Options {
|
||||
userAgentWhitelistEnabled: boolean;
|
||||
userAgentWhitelist: string[];
|
||||
|
||||
[key: string]: Options[keyof Options];
|
||||
[key: string]: Options[keyof Options]
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ export default new class extends TypedEventTarget<EventMap> {
|
||||
}
|
||||
|
||||
this.dispatchEvent(new CustomEvent("changed", {
|
||||
detail: changedKeys
|
||||
detail: changedKeys as Array<keyof Options>
|
||||
}));
|
||||
}
|
||||
});
|
||||
@@ -88,8 +88,8 @@ export default new class extends TypedEventTarget<EventMap> {
|
||||
* Options interface type.
|
||||
*/
|
||||
public async getAll (): Promise<Options> {
|
||||
const { options }: { options: Options } =
|
||||
await browser.storage.sync.get("options");
|
||||
const { options } = await browser.storage.sync.get(
|
||||
"options") as { options: Options };
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user