/** * Converts a numeric value to American English words. * * This is the main public API. It accepts any valid numeric input * (number, string, or bigint) and handles parsing internally. * * @param {number | string | bigint} value - The numeric value to convert * @param {Object} [options] - Optional configuration * @param {boolean} [options.hundredPairing=false] - Use hundred-pairing for 1100-9999 (e.g., "fifteen hundred" instead of "one thousand five hundred") * @param {boolean} [options.and=false] - Use "and" after hundreds and before final small numbers (e.g., "one hundred and one" instead of "one hundred one") * @returns {string} The number in American English words * @throws {TypeError} If value is not a valid numeric type * @throws {Error} If value is not a valid number format * * @example * toCardinal(42) // 'forty-two' * toCardinal(101) // 'one hundred one' * toCardinal(101, { and: true }) // 'one hundred and one' * toCardinal(1500) // 'one thousand five hundred' * toCardinal(1500, { hundredPairing: true }) // 'fifteen hundred' */ export function toCardinal(value: number | string | bigint, options?: { hundredPairing?: boolean | undefined; and?: boolean | undefined; }): string; /** * Converts a numeric value to American English ordinal words. * * @param {number | string | bigint} value - The numeric value to convert (must be a positive integer) * @returns {string} The number as ordinal words (e.g., "first", "forty-second") * @throws {TypeError} If value is not a valid numeric type * @throws {RangeError} If value is negative, zero, or has a decimal part * * @example * toOrdinal(1) // 'first' * toOrdinal(2) // 'second' * toOrdinal(3) // 'third' * toOrdinal(21) // 'twenty-first' * toOrdinal(42) // 'forty-second' * toOrdinal(100) // 'one hundredth' * toOrdinal(101) // 'one hundred first' * toOrdinal(1000) // 'one thousandth' */ export function toOrdinal(value: number | string | bigint): string; /** * Converts a numeric value to American English currency words. * * @param {number | string | bigint} value - The currency amount to convert * @param {Object} [options] - Optional configuration * @param {boolean} [options.and=true] - Use "and" between dollars and cents (e.g., "one dollar and fifty cents") * @returns {string} The amount in American English currency words * @throws {TypeError} If value is not a valid numeric type * @throws {Error} If value is not a valid number format * * @example * toCurrency(42.50) // 'forty-two dollars and fifty cents' * toCurrency(1) // 'one dollar' * toCurrency(0.99) // 'ninety-nine cents' * toCurrency(42.50, { and: false }) // 'forty-two dollars fifty cents' */ export function toCurrency(value: number | string | bigint, options?: { and?: boolean | undefined; }): string;