diff options
Diffstat (limited to 'src/background/infrastructures/ConsoleClient.ts')
-rw-r--r-- | src/background/infrastructures/ConsoleClient.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/background/infrastructures/ConsoleClient.ts b/src/background/infrastructures/ConsoleClient.ts index 8d0af89..2a1df5b 100644 --- a/src/background/infrastructures/ConsoleClient.ts +++ b/src/background/infrastructures/ConsoleClient.ts @@ -1,8 +1,20 @@ import { injectable } from "tsyringe"; import * as messages from "../../shared/messages"; +export default interface ConsoleClient { + showCommand(tabId: number, command: string): Promise<any>; + + showFind(tabId: number): Promise<any>; + + showInfo(tabId: number, message: string): Promise<any>; + + showError(tabId: number, message: string): Promise<any>; + + hide(tabId: number): Promise<any>; +} + @injectable() -export default class ConsoleClient { +export class ConsoleClientImpl implements ConsoleClient { showCommand(tabId: number, command: string): Promise<any> { return browser.tabs.sendMessage(tabId, { type: messages.CONSOLE_SHOW_COMMAND, |