aboutsummaryrefslogtreecommitdiff
path: root/src/shared/settings/Properties.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/shared/settings/Properties.ts
parent685f2b7b69218b06b5bb676069e35f79c5048c9b (diff)
parent75abd90ecb8201ad845b266f96220d8adfe19b2d (diff)
Merge pull request #749 from ueokande/qa-0.28
QA 0.28
Diffstat (limited to 'src/shared/settings/Properties.ts')
-rw-r--r--src/shared/settings/Properties.ts47
1 files changed, 24 insertions, 23 deletions
diff --git a/src/shared/settings/Properties.ts b/src/shared/settings/Properties.ts
index 27fb62e..cf10d61 100644
--- a/src/shared/settings/Properties.ts
+++ b/src/shared/settings/Properties.ts
@@ -1,4 +1,3 @@
-
export type PropertiesJSON = {
hintchars?: string;
smoothscroll?: boolean;
@@ -11,38 +10,40 @@ export type PropertyTypes = {
complete: string;
};
-type PropertyName = 'hintchars' | 'smoothscroll' | 'complete';
+type PropertyName = "hintchars" | "smoothscroll" | "complete";
type PropertyDef = {
name: PropertyName;
description: string;
defaultValue: string | number | boolean;
- type: 'string' | 'number' | 'boolean';
+ type: "string" | "number" | "boolean";
};
const defs: PropertyDef[] = [
{
- name: 'hintchars',
- description: 'hint characters on follow mode',
- defaultValue: 'abcdefghijklmnopqrstuvwxyz',
- type: 'string',
- }, {
- name: 'smoothscroll',
- description: 'smooth scroll',
+ name: "hintchars",
+ description: "hint characters on follow mode",
+ defaultValue: "abcdefghijklmnopqrstuvwxyz",
+ type: "string",
+ },
+ {
+ name: "smoothscroll",
+ description: "smooth scroll",
defaultValue: false,
- type: 'boolean',
- }, {
- name: 'complete',
- description: 'which are completed at the open page',
- defaultValue: 'sbh',
- type: 'string',
- }
+ type: "boolean",
+ },
+ {
+ name: "complete",
+ description: "which are completed at the open page",
+ defaultValue: "sbh",
+ type: "string",
+ },
];
const defaultValues = {
- hintchars: 'abcdefghijklmnopqrstuvwxyz',
+ hintchars: "abcdefghijklmnopqrstuvwxyz",
smoothscroll: false,
- complete: 'sbh',
+ complete: "sbh",
};
export default class Properties {
@@ -72,14 +73,14 @@ export default class Properties {
static types(): PropertyTypes {
return {
- hintchars: 'string',
- smoothscroll: 'boolean',
- complete: 'string',
+ hintchars: "string",
+ smoothscroll: "boolean",
+ complete: "string",
};
}
static def(name: string): PropertyDef | undefined {
- return defs.find(p => p.name === name);
+ return defs.find((p) => p.name === name);
}
static defs(): PropertyDef[] {