1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

Add missing types

This commit is contained in:
Daniel James Smith
2021-10-19 14:15:15 +02:00
parent b8676cf398
commit 86e3b9e423

View File

@@ -18,19 +18,19 @@ export default class CommandsBackground {
async init() {
if (this.isVivaldi) {
BrowserApi.messageListener('commands.background', async (msg: any, sender: any, sendResponse: any) => {
BrowserApi.messageListener('commands.background', async (msg: any, sender: chrome.runtime.MessageSender, sendResponse: any) => {
if (msg.command === 'keyboardShortcutTriggered' && msg.shortcut) {
await this.processCommand(msg.shortcut, sender);
}
});
} else if (chrome && chrome.commands) {
chrome.commands.onCommand.addListener(async (command: any) => {
chrome.commands.onCommand.addListener(async (command: string) => {
await this.processCommand(command);
});
}
}
private async processCommand(command: string, sender?: any) {
private async processCommand(command: string, sender?: chrome.runtime.MessageSender) {
switch (command) {
case 'generate_password':
await this.generatePasswordToClipboard();
@@ -56,7 +56,7 @@ export default class CommandsBackground {
this.passwordGenerationService.addHistory(password);
}
private async autoFillLogin(tab?: any) {
private async autoFillLogin(tab?: chrome.tabs.Tab) {
if (await this.vaultTimeoutService.isLocked()) {
return;
}