python-archieve-projects/WechatBot/node_modules/cmd-ts/dist/cjs/positional.d.ts

18 lines
903 B
TypeScript

import { ArgParser } from './argparser';
import { OutputOf } from './from';
import { ProvidesHelp, Descriptive, Displayed } from './helpdoc';
import { Type, HasType } from './type';
declare type PositionalParser<Decoder extends Type<string, any>> = ArgParser<OutputOf<Decoder>> & ProvidesHelp & Partial<Descriptive>;
declare type StringType = Type<string, string>;
/**
* A positional command line argument.
*
* Decodes one argument that is not a flag or an option:
* In `hello --key value world` we have 2 positional arguments — `hello` and `world`.
*
* @param config positional argument config
*/
export declare function positional<Decoder extends Type<string, any>>(config: HasType<Decoder> & Partial<Displayed & Descriptive>): PositionalParser<Decoder>;
export declare function positional(config?: Partial<HasType<never> & Displayed & Descriptive>): PositionalParser<StringType>;
export {};