- Add GETTING_STARTED.md with quick start guide and development modes - Add INSTALL.sh automated installation script - Add INSTALLATION_CHECKLIST.md, INSTALLATION_SUCCESS.md, and INSTALLATION_SUMMARY.md - Add QUICK_REFERENCE.md for common commands - Add SETUP_GUIDE.md with detailed setup instructions - Update README.md with improved project overview - Add did-wallet app dependencies and node_modules
32 lines
764 B
TypeScript
32 lines
764 B
TypeScript
declare const flagSymbol: unique symbol;
|
|
|
|
declare function arg<T extends arg.Spec>(spec: T, options?: arg.Options): arg.Result<T>;
|
|
|
|
declare namespace arg {
|
|
export function flag<T>(fn: T): T & { [flagSymbol]: true };
|
|
|
|
export const COUNT: Handler<number> & { [flagSymbol]: true };
|
|
|
|
export type Handler <T = any> = (value: string, name: string, previousValue?: T) => T;
|
|
|
|
export interface Spec {
|
|
[key: string]: string | Handler | [Handler];
|
|
}
|
|
|
|
export type Result<T extends Spec> = { _: string[] } & {
|
|
[K in keyof T]?: T[K] extends Handler
|
|
? ReturnType<T[K]>
|
|
: T[K] extends [Handler]
|
|
? Array<ReturnType<T[K][0]>>
|
|
: never
|
|
};
|
|
|
|
export interface Options {
|
|
argv?: string[];
|
|
permissive?: boolean;
|
|
stopAtPositional?: boolean;
|
|
}
|
|
}
|
|
|
|
export = arg;
|