import { URL } from 'node:url'; import { Arg, ArgDefinition } from './interfaces/parser'; /** * Create a custom arg. * * @example * type Id = string * type IdOpts = { startsWith: string; length: number }; * * export const myArg = custom({ * parse: async (input, opts) => { * if (input.startsWith(opts.startsWith) && input.length === opts.length) { * return input * } * * throw new Error('Invalid id') * }, * }) */ export declare function custom>(_defaults: Partial>): ArgDefinition; export declare const boolean: ArgDefinition>; export declare const integer: ArgDefinition; export declare const directory: ArgDefinition; export declare const file: ArgDefinition; /** * Initializes a string as a URL. Throws an error * if the string is not a valid URL. */ export declare const url: ArgDefinition>; declare const stringArg: ArgDefinition>; export { stringArg as string };