aboutsummaryrefslogtreecommitdiff
path: root/src/background/controllers/CompletionController.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-05-02 17:25:56 +0900
committerGitHub <noreply@github.com>2020-05-02 17:25:56 +0900
commit5df0537bcf65a341e79852b1b30379c73318529c (patch)
treeaee5efe52412855f620cb514a13a2c14373f27b7 /src/background/controllers/CompletionController.ts
parent685f2b7b69218b06b5bb676069e35f79c5048c9b (diff)
parent75abd90ecb8201ad845b266f96220d8adfe19b2d (diff)
Merge pull request #749 from ueokande/qa-0.28
QA 0.28
Diffstat (limited to 'src/background/controllers/CompletionController.ts')
-rw-r--r--src/background/controllers/CompletionController.ts26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/background/controllers/CompletionController.ts b/src/background/controllers/CompletionController.ts
index fb6137c..35538be 100644
--- a/src/background/controllers/CompletionController.ts
+++ b/src/background/controllers/CompletionController.ts
@@ -4,7 +4,7 @@ import {
ConsoleRequestBookmarksResponse,
ConsoleRequestHistoryResponse,
ConsoleRequestSearchEnginesResponse,
- ConsoleRequesttabsResponse
+ ConsoleRequesttabsResponse,
} from "../../shared/messages";
import { injectable } from "tsyringe";
import OpenCompletionUseCase from "../completion/OpenCompletionUseCase";
@@ -16,20 +16,23 @@ export default class CompletionController {
constructor(
private completionUseCase: OpenCompletionUseCase,
private tabCompletionUseCase: TabCompletionUseCase,
- private propertyCompletionUseCase: PropertyCompletionUseCase,
- ) {
- }
+ private propertyCompletionUseCase: PropertyCompletionUseCase
+ ) {}
async getCompletionTypes(): Promise<ConsoleGetCompletionTypesResponse> {
return this.completionUseCase.getCompletionTypes();
}
- async requestSearchEngines(query: string): Promise<ConsoleRequestSearchEnginesResponse> {
+ async requestSearchEngines(
+ query: string
+ ): Promise<ConsoleRequestSearchEnginesResponse> {
const items = await this.completionUseCase.requestSearchEngines(query);
- return items.map(name => ({ title: name }));
+ return items.map((name) => ({ title: name }));
}
- async requestBookmarks(query: string): Promise<ConsoleRequestBookmarksResponse> {
+ async requestBookmarks(
+ query: string
+ ): Promise<ConsoleRequestBookmarksResponse> {
return this.completionUseCase.requestBookmarks(query);
}
@@ -37,11 +40,14 @@ export default class CompletionController {
return this.completionUseCase.requestHistory(query);
}
- async queryTabs(query: string, excludePinned: boolean): Promise<ConsoleRequesttabsResponse> {
+ async queryTabs(
+ query: string,
+ excludePinned: boolean
+ ): Promise<ConsoleRequesttabsResponse> {
return this.tabCompletionUseCase.queryTabs(query, excludePinned);
}
async getProperties(): Promise<ConsoleGetPropertiesResponse> {
- return this.propertyCompletionUseCase.getProperties();
+ return this.propertyCompletionUseCase.getProperties();
}
-} \ No newline at end of file
+}