console-app/lib/Option.ts

36 lines
664 B
TypeScript

/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of console-app which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, May 2020
*/
interface SourceConfig {
console?: boolean,
configs?: string[],
env?: boolean,
interactive?: boolean,
}
interface Option {
name: string;
required?: boolean;
default?: unknown;
sources?: SourceConfig;
/*
* alias?: string;
* env?: string;
* message?: string;
* preset?: unknown[];
* error?: string;
*/
}
interface OptionValue {
filled: boolean;
value?: unknown;
}
export { Option, OptionValue };