import * as yargs from 'yargs'; export type YargsArguments = T extends yargs.Argv ? R : any; export type Argv = yargs.Argv; /** Convert literal string types like 'foo-bar' to 'FooBar' */ type PascalCase = string extends S ? string : S extends `${infer T}-${infer U}` ? `${Capitalize}${PascalCase}` : Capitalize; /** Convert literal string types like 'foo-bar' to 'fooBar' */ type CamelCase = string extends S ? string : S extends `${infer T}-${infer U}` ? `${T}${PascalCase}` : S; /** Convert literal string types like 'foo-bar' to 'fooBar', allowing all `PropertyKey` types */ type CamelCaseKey = K extends string ? Exclude, ''> : K; /** Arguments type, with camelcased keys */ export type ArgumentsCamelCase = { [key in keyof T as key | CamelCaseKey]: T[key]; } & { /** Non-option arguments */ _: Array; /** The script name or node command */ $0: string; /** All remaining options */ [argName: string]: unknown; }; export {};