/** * OClif flag pass everything you pass to its constructor down, we just don't have the type definition * This file is where we can add custom type definition such as max/min so we can use it */ import { flags as OclifFlags } from '@oclif/command'; import { Default, Definition, IOptionFlag as OClifIOptionFlag } from '@oclif/parser/lib/flags'; /** * Extension of the flag({}) options by adding min/max for type string */ export interface SizeIOptionFlag extends OClifIOptionFlag { min?: number; max?: number; } export interface AliasIOptionFlag extends OClifIOptionFlag { alias?: string; } export declare type IOptionFlag = SizeIOptionFlag & AliasIOptionFlag; /** * Taken from https://github.com/oclif/parser/blob/master/src/flags.ts#L47 * But replaces {@link IOptionFlag} with {@link SizeIOptionFlag} */ interface StringDefinition extends Definition { (options: { multiple: true; } & Partial>): IOptionFlag; (options: ({ required: true; } | { default: Default; }) & Partial>): IOptionFlag; (options?: Partial>): IOptionFlag; } declare const string: StringDefinition; export { string }; export declare const boolean: typeof OclifFlags.boolean; declare const _enum: (opts: import("@oclif/parser/lib/flags").EnumFlagOptions) => OclifFlags.IOptionFlag; export { _enum as enum };