aboutsummaryrefslogtreecommitdiff
path: root/src/console/clients
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-03-29 21:47:09 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2020-03-29 21:47:09 +0900
commitc3be3dde555d1f51f696f4bfbe181e7bad6d3563 (patch)
treec42d2b9115f3aca5fd90d7a72baa6990ae388c21 /src/console/clients
parent0340c82bc82738a63c8a374930cf39cbed5c7c8c (diff)
Complete properties on set command
Diffstat (limited to 'src/console/clients')
-rw-r--r--src/console/clients/CompletionClient.ts14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/console/clients/CompletionClient.ts b/src/console/clients/CompletionClient.ts
index 19b4d99..56dc665 100644
--- a/src/console/clients/CompletionClient.ts
+++ b/src/console/clients/CompletionClient.ts
@@ -1,6 +1,6 @@
import * as messages from "../../shared/messages";
import {
- ConsoleGetCompletionTypesResponse,
+ ConsoleGetCompletionTypesResponse, ConsoleGetPropertiesResponse,
ConsoleRequestBookmarksResponse,
ConsoleRequestHistoryResponse, ConsoleRequestSearchEnginesResponse, ConsoleRequesttabsResponse
} from "../../shared/messages";
@@ -29,6 +29,11 @@ export type TabItem = {
faviconUrl?: string
}
+export type Property = {
+ name: string
+ type: 'string' | 'boolean' | 'number';
+}
+
export default class CompletionClient {
async getCompletionTypes(): Promise<CompletionType[]> {
const resp = await browser.runtime.sendMessage({
@@ -69,4 +74,11 @@ export default class CompletionClient {
}) as ConsoleRequesttabsResponse;
return resp;
}
+
+ async getProperties(): Promise<Property[]> {
+ const resp = await browser.runtime.sendMessage({
+ type: messages.CONSOLE_GET_PROPERTIES,
+ }) as ConsoleGetPropertiesResponse;
+ return resp;
+ }
}