Update all dependencies

This commit is contained in:
hensm
2019-07-28 03:22:02 +01:00
parent 9e196465e5
commit 36b391606a
8 changed files with 4384 additions and 3003 deletions

View File

@@ -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);
}
});
}

View File

@@ -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;
}