mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-24 14:42:13 +00:00
CLI: Move OptionDescription to utils/options so types agree (#612)
This commit is contained in:
parent
5269a6b9c4
commit
3ed76a97f0
1
NOTICE
1
NOTICE
@ -13,6 +13,7 @@ under the licensing terms detailed in LICENSE:
|
||||
* Joshua Tenner <tenner.joshua@gmail.com>
|
||||
* Nidin Vinayakan <01@01alchemist.com>
|
||||
* Aaron Turner <aaron@aaronthedev.com>
|
||||
* Willem Wyndham <willem@cs.umd.edu>
|
||||
|
||||
Portions of this software are derived from third-party works licensed under
|
||||
the following terms:
|
||||
|
13
cli/asc.d.ts
vendored
13
cli/asc.d.ts
vendored
@ -1,3 +1,6 @@
|
||||
import { OptionDescription } from "./util/options";
|
||||
export { OptionDescription };
|
||||
|
||||
/** Whether this is a webpack bundle or not. */
|
||||
export const isBundle: boolean;
|
||||
|
||||
@ -7,16 +10,6 @@ export const isDev: boolean;
|
||||
/** AssemblyScript version. */
|
||||
export const version: string;
|
||||
|
||||
/** Command line option description. */
|
||||
export interface OptionDescription {
|
||||
/** Textual description. */
|
||||
description: string | string[];
|
||||
/** Option type, e.g. `string`. */
|
||||
type: string;
|
||||
/** Option aliases, if any. */
|
||||
aliases?: string[];
|
||||
}
|
||||
|
||||
/** Available CLI options. */
|
||||
export const options: { [key: string]: OptionDescription };
|
||||
|
||||
|
23
cli/util/options.d.ts
vendored
23
cli/util/options.d.ts
vendored
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user