diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-02 14:08:51 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-05-05 23:59:59 +0900 |
commit | d01db82c0dca352de2d7644c383d388fc3ec0366 (patch) | |
tree | ff09ebc545ce00192dff9e1119b0c9e2cf92fdef /src/background/infrastructures | |
parent | 992b3ac65d7fe86ac7bc3b560960c8bcf86bec69 (diff) |
Types src/content
Diffstat (limited to 'src/background/infrastructures')
-rw-r--r-- | src/background/infrastructures/ConsoleClient.ts | 2 | ||||
-rw-r--r-- | src/background/infrastructures/ContentMessageClient.ts | 2 | ||||
-rw-r--r-- | src/background/infrastructures/ContentMessageListener.ts | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/background/infrastructures/ConsoleClient.ts b/src/background/infrastructures/ConsoleClient.ts index 7ad5d24..c162634 100644 --- a/src/background/infrastructures/ConsoleClient.ts +++ b/src/background/infrastructures/ConsoleClient.ts @@ -1,4 +1,4 @@ -import messages from '../../shared/messages'; +import * as messages from '../../shared/messages'; export default class ConsoleClient { showCommand(tabId: number, command: string): Promise<any> { diff --git a/src/background/infrastructures/ContentMessageClient.ts b/src/background/infrastructures/ContentMessageClient.ts index 20057c7..d4bc476 100644 --- a/src/background/infrastructures/ContentMessageClient.ts +++ b/src/background/infrastructures/ContentMessageClient.ts @@ -1,4 +1,4 @@ -import messages from '../../shared/messages'; +import * as messages from '../../shared/messages'; export default class ContentMessageClient { async broadcastSettingsChanged(): Promise<void> { diff --git a/src/background/infrastructures/ContentMessageListener.ts b/src/background/infrastructures/ContentMessageListener.ts index 81d3232..1cc2696 100644 --- a/src/background/infrastructures/ContentMessageListener.ts +++ b/src/background/infrastructures/ContentMessageListener.ts @@ -1,4 +1,4 @@ -import messages from '../../shared/messages'; +import * as messages from '../../shared/messages'; import CompletionGroup from '../domains/CompletionGroup'; import CommandController from '../controllers/CommandController'; import SettingController from '../controllers/SettingController'; @@ -68,7 +68,9 @@ export default class ContentMessageListener { browser.runtime.onConnect.addListener(this.onConnected.bind(this)); } - onMessage(message: any, senderTab: browser.tabs.Tab): Promise<any> | any { + onMessage( + message: messages.Message, senderTab: browser.tabs.Tab, + ): Promise<any> | any { switch (message.type) { case messages.CONSOLE_QUERY_COMPLETIONS: return this.onConsoleQueryCompletions(message.text); |