aboutsummaryrefslogtreecommitdiff
path: root/src/background/completion
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/background/completion
parent0340c82bc82738a63c8a374930cf39cbed5c7c8c (diff)
Complete properties on set command
Diffstat (limited to 'src/background/completion')
-rw-r--r--src/background/completion/PropertyCompletionUseCase.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/background/completion/PropertyCompletionUseCase.ts b/src/background/completion/PropertyCompletionUseCase.ts
new file mode 100644
index 0000000..049cfb8
--- /dev/null
+++ b/src/background/completion/PropertyCompletionUseCase.ts
@@ -0,0 +1,16 @@
+import { injectable } from "tsyringe";
+import Properties from "../../shared/settings/Properties";
+
+type Property = {
+ name: string;
+ type: 'string' | 'boolean' | 'number';
+}
+@injectable()
+export default class PropertyCompletionUseCase {
+ async getProperties(): Promise<Property[]> {
+ return Properties.defs().map(def => ({
+ name: def.name,
+ type: def.type,
+ }));
+ }
+} \ No newline at end of file