console-app/lib/Option.ts

31 lines
697 B
TypeScript
Raw Normal View History

2020-05-15 16:53:45 +02:00
/*
* 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
*/
2020-05-09 19:51:43 +02:00
import { TypeValidation } from './Types/TypeValidation';
2020-05-09 21:30:37 +02:00
import { OptionType } from './OptionType';
2020-05-09 19:51:43 +02:00
interface Option {
name: string;
type: OptionType;
required?: boolean;
default?: unknown;
alias?: string;
env?: string;
description?: string;
message?: string;
2020-05-18 12:34:44 +02:00
preset?: unknown[];
2020-05-27 15:11:40 +02:00
error?: string;
2020-05-09 19:51:43 +02:00
}
interface OptionProcess extends Option {
filled: boolean;
value?: unknown;
type_validation: TypeValidation;
}
2020-05-09 21:30:37 +02:00
export { Option, OptionProcess };