31 lines
697 B
TypeScript
31 lines
697 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
|
|
*/
|
|
|
|
import { TypeValidation } from './Types/TypeValidation';
|
|
import { OptionType } from './OptionType';
|
|
|
|
interface Option {
|
|
name: string;
|
|
type: OptionType;
|
|
required?: boolean;
|
|
default?: unknown;
|
|
alias?: string;
|
|
env?: string;
|
|
description?: string;
|
|
message?: string;
|
|
preset?: unknown[];
|
|
error?: string;
|
|
}
|
|
|
|
interface OptionProcess extends Option {
|
|
filled: boolean;
|
|
value?: unknown;
|
|
type_validation: TypeValidation;
|
|
}
|
|
|
|
export { Option, OptionProcess };
|