/** * The options that can be provided to {@link parse}. */ export interface ParseOptions { /** * The current working directory to be used. * * If not specified, `process.cwd()` will be used. */ cwd?: string; /** * The end-of-line character to be used. * * If not specified, `os.EOL` will be used. */ eol?: string; /** * The function used to exit the current process. * * If not specified, `process.exit` will be used. */ exit?: (code: number) => never; /** * The stream to which standard errors may be written. * * If not specified, `process.stderr` will be used. */ stderr?: NodeJS.WritableStream; /** * The stream from which standard input may be read. * * If not specified, `process.stdin` will be used. */ stdin?: NodeJS.ReadableStream; /** * The stream to which standard output may be written. * * If not specified, `process.stdout` will be used. */ stdout?: NodeJS.WritableStream; /** * The version of `node-native2ascii` being used. */ version: string; } /** * Reads the input from STDIN. * * @param options The options to be used. * @return The input read from STDIN. */ export declare const readStdin: (options: Required) => Promise; /** * Writes a message to STDERR indicating that it has failed and then will exit the current process. * * @param error The error responsible for the failure. * @param options The options to be used. */ export declare const fail: (error: unknown, options: ParseOptions) => void; /** * Parses the command line arguments and performs the necessary conversion. * * The primary conversion is to convert a file that is encoded to any character encoding that is supported by Node.js * (which can be controlled via the `encoding` command line option) to a file encoded in ASCII, using Unicode escapes * ("\uxxxx" notation) for all characters that are not part of the ASCII character set. * * This can be useful when dealing with `.properties` files and characters that are not in the ISO-8859-1 character set. * * The `reverse` command line option can be specified to reverse the conversion and instead convert Unicode escapes to * their corresponding Unicode characters. * * If the `output-file` command line argument is not specified, standard output is used for output. Additionally, if the * `input-file` command line argument is not specified, standard input is used for input. * * Additional `options` can be specified for additional control, however, everything other than * {@link ParseOptions#version} is primarily intended for testing purposes only. * * @param argv The command line arguments to be parsed. * @param options The options to be used. */ export declare const parse: (argv: string[], options: ParseOptions) => Promise; //# sourceMappingURL=cli.d.ts.map