From e1dac618a8b8929f601c7ec8aca3842c5ebf9d03 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Mon, 13 Apr 2020 20:37:36 +0900 Subject: Use plugin:prettier/recommended --- src/console/clients/CompletionClient.ts | 65 +++++++++++++++++---------------- 1 file changed, 34 insertions(+), 31 deletions(-) (limited to 'src/console/clients') diff --git a/src/console/clients/CompletionClient.ts b/src/console/clients/CompletionClient.ts index 56dc665..64119e8 100644 --- a/src/console/clients/CompletionClient.ts +++ b/src/console/clients/CompletionClient.ts @@ -1,84 +1,87 @@ import * as messages from "../../shared/messages"; import { - ConsoleGetCompletionTypesResponse, ConsoleGetPropertiesResponse, + ConsoleGetCompletionTypesResponse, + ConsoleGetPropertiesResponse, ConsoleRequestBookmarksResponse, - ConsoleRequestHistoryResponse, ConsoleRequestSearchEnginesResponse, ConsoleRequesttabsResponse + ConsoleRequestHistoryResponse, + ConsoleRequestSearchEnginesResponse, + ConsoleRequesttabsResponse, } from "../../shared/messages"; import CompletionType from "../../shared/CompletionType"; import TabFlag from "../../shared/TabFlag"; export type SearchEngines = { - title: string -} + title: string; +}; export type BookmarkItem = { - title: string - url: string -} + title: string; + url: string; +}; export type HistoryItem = { - title: string - url: string -} + title: string; + url: string; +}; export type TabItem = { - index: number - flag: TabFlag - title: string - url: string - faviconUrl?: string -} + index: number; + flag: TabFlag; + title: string; + url: string; + faviconUrl?: string; +}; export type Property = { - name: string - type: 'string' | 'boolean' | 'number'; -} + name: string; + type: "string" | "boolean" | "number"; +}; export default class CompletionClient { async getCompletionTypes(): Promise { - const resp = await browser.runtime.sendMessage({ + const resp = (await browser.runtime.sendMessage({ type: messages.CONSOLE_GET_COMPLETION_TYPES, - }) as ConsoleGetCompletionTypesResponse; + })) as ConsoleGetCompletionTypesResponse; return resp; } async requestSearchEngines(query: string): Promise { - const resp = await browser.runtime.sendMessage({ + const resp = (await browser.runtime.sendMessage({ type: messages.CONSOLE_REQUEST_SEARCH_ENGINES_MESSAGE, query, - }) as ConsoleRequestSearchEnginesResponse; + })) as ConsoleRequestSearchEnginesResponse; return resp; } async requestBookmarks(query: string): Promise { - const resp = await browser.runtime.sendMessage({ + const resp = (await browser.runtime.sendMessage({ type: messages.CONSOLE_REQUEST_BOOKMARKS, query, - }) as ConsoleRequestBookmarksResponse; + })) as ConsoleRequestBookmarksResponse; return resp; } async requestHistory(query: string): Promise { - const resp = await browser.runtime.sendMessage({ + const resp = (await browser.runtime.sendMessage({ type: messages.CONSOLE_REQUEST_HISTORY, query, - }) as ConsoleRequestHistoryResponse; + })) as ConsoleRequestHistoryResponse; return resp; } async requestTabs(query: string, excludePinned: boolean): Promise { - const resp = await browser.runtime.sendMessage({ + const resp = (await browser.runtime.sendMessage({ type: messages.CONSOLE_REQUEST_TABS, query, excludePinned, - }) as ConsoleRequesttabsResponse; + })) as ConsoleRequesttabsResponse; return resp; } async getProperties(): Promise { - const resp = await browser.runtime.sendMessage({ + const resp = (await browser.runtime.sendMessage({ type: messages.CONSOLE_GET_PROPERTIES, - }) as ConsoleGetPropertiesResponse; + })) as ConsoleGetPropertiesResponse; return resp; } } -- cgit v1.2.3