aboutsummaryrefslogtreecommitdiff
path: root/src/background/infrastructures
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/infrastructures')
-rw-r--r--src/background/infrastructures/ConsoleClient.ts2
-rw-r--r--src/background/infrastructures/ContentMessageClient.ts2
-rw-r--r--src/background/infrastructures/ContentMessageListener.ts6
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);