Types on src/share

This commit is contained in:
Shin'ya Ueoka 2019-04-30 21:50:46 +09:00
parent 2b8c37e57f
commit 0cffb09e24
11 changed files with 88 additions and 54 deletions

View file

@ -2,20 +2,20 @@
// mystr: 'string',
// mynum: 'number',
// mybool: 'boolean',
const types = {
const types: { [key: string]: string } = {
hintchars: 'string',
smoothscroll: 'boolean',
complete: 'string',
};
// describe default values of a property
const defaults = {
const defaults: { [key: string]: string | number | boolean } = {
hintchars: 'abcdefghijklmnopqrstuvwxyz',
smoothscroll: false,
complete: 'sbh',
};
const docs = {
const docs: { [key: string]: string } = {
hintchars: 'hint characters on follow mode',
smoothscroll: 'smooth scroll',
complete: 'which are completed at the open page',