import { Command, CommandOptions } from "./types/commands.js";
import { Arg, CoerceFn, Param, Type, Opts, Args, Params, ValidateFn } from "./types/units.js";
export declare function command(o: CommandOptions): Command;
export declare const asType: >(type: T) => T;
export declare function asTypes>>(coersions: C): { [K in keyof C]: Type>; };
export declare const type: {
string: Type;
number: Type;
integer: Type;
boolean: Type;
};
declare const string: Type, number: Type, integer: Type, boolean: Type;
export { string, number, integer, boolean };
type Ingestion = {
coerce: CoerceFn;
validate: ValidateFn;
};
export declare const ingestors: {
default: ({ validate, coerce }: Ingestion, fallback: string) => (value: string | undefined) => T;
required: ({ validate, coerce }: Ingestion) => (value: string | undefined) => T;
optional: ({ validate, coerce }: Ingestion) => (value: string | undefined) => T | undefined;
};
export declare const param: {
flag(flag: string, o?: {
help?: string;
}): Param;
default: ({ name: type, coerce }: Type, fallback: string, { help, validate }?: Opts) => Param;
required: ({ name: type, coerce }: Type, { help, validate }?: Opts) => Param;
optional: ({ name: type, coerce }: Type, { help, validate }?: Opts) => Param;
};
export declare const arg: (name: N) => {
default: ({ name: type, coerce }: Type, fallback: string, { help, validate }?: Opts) => Arg;
required: ({ name: type, coerce }: Type, { help, validate }?: Opts) => Arg;
optional: ({ name: type, coerce }: Type, { help, validate }?: Opts) => Arg;
};
export declare function choice(allowable: T[], { help }?: {
help?: string;
}): Opts;
export declare function multipleChoice(allowable: T[], { zeroAllowed, help }?: {
zeroAllowed?: boolean;
help?: string;
}): Opts;
export declare function list({ name: type, coerce }: Type, delimiter?: string): Type;