CLI: Move OptionDescription to utils/options so types agree (#612)

This commit is contained in:
Willem Wyndham
2019-06-04 00:37:01 -04:00
committed by Daniel Wirtz
parent 5269a6b9c4
commit 3ed76a97f0
3 changed files with 17 additions and 20 deletions

23
cli/util/options.d.ts vendored
View File

@ -1,15 +1,18 @@
/** Command line option description. */
export interface OptionDescription {
/** Textual description. */
description?: string | string[],
/** Data type. One of (b)oolean [default], (i)nteger, (f)loat or (s)tring. Uppercase means multiple values. */
type?: "b" | "i" | "f" | "s" | "I" | "F" | "S",
/** Substituted options, if any. */
value?: { [key: string]: number | string },
/** Short alias, if any. */
alias?: string
}
/** Configuration object. */
interface Config {
[key: string]: {
/** Textual description. */
description?: string | string[],
/** Data type. One of (b)oolean [default], (i)nteger, (f)loat or (s)tring. Uppercase means multiple values. */
type?: "b" | "i" | "f" | "s", "I", "F", "S",
/** Substituted options, if any. */
value?: { [key: string]: number | string },
/** Short alias, if any. */
alias?: string
};
[key: string]: OptionDescription;
}
/** Parsing result. */