/** * Canadian English language converter * * CLDR: en-CA | English as used in Canada * * Exports: * - toCardinal(value, options?) - Cardinal numbers: 42 → "forty-two" * - toOrdinal(value) - Ordinal numbers: 42 → "forty-second" * - toCurrency(value, options?) - Currency: 42.50 → "forty-two dollars and fifty cents" * * Canadian English conventions: * - Follows British English style for number words * - "and" after hundreds: "one hundred and twenty-three" (default) * - "and" before final segment: "one million and one" (default) * - Hyphenated tens-ones: "twenty-one", "forty-two" * - Western numbering system (short scale: billion = 10^9) * - Optional hundred-pairing: 1500 → "fifteen hundred" (colloquial) * - Optional "and" omission: 101 → "one hundred one" (American style) * - Currency: Canadian Dollar (CAD) - dollar/dollars, cent/cents */ export declare const cardinalMax: bigint; export declare const ordinalMax: bigint; export declare const currencyMax: bigint; export type CardinalOptions = { /** * - Use hundred-pairing for 1100-9999 (e.g., "fifteen hundred" instead of "one thousand five hundred") */ hundredPairing?: boolean; /** * - Use "and" after hundreds and before final small numbers (default: true, Canadian/British style) */ and?: boolean; }; /** * @typedef {object} CardinalOptions * @property {boolean} [hundredPairing] - Use hundred-pairing for 1100-9999 (e.g., "fifteen hundred" instead of "one thousand five hundred") * @property {boolean} [and] - Use "and" after hundreds and before final small numbers (default: true, Canadian/British style) */ /** @type {Required} */ export declare const cardinalDefaults: Required; /** * Converts a numeric value to Canadian 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 {CardinalOptions} [options] - Optional configuration * @returns {string} The number in Canadian 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 and one' * toCardinal(101, { and: false }) // 'one hundred one' * toCardinal(1500) // 'one thousand five hundred' * toCardinal(1500, { hundredPairing: true }) // 'fifteen hundred' */ declare function toCardinal(value: number | string | bigint, options?: CardinalOptions): string; /** * Converts a numeric value to Canadian 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' */ declare function toOrdinal(value: number | string | bigint): string; export type CurrencyOptions = { /** * - Use "and" between dollars and cents (e.g., "one dollar and fifty cents") */ and?: boolean; }; /** * @typedef {object} CurrencyOptions * @property {boolean} [and] - Use "and" between dollars and cents (e.g., "one dollar and fifty cents") */ /** @type {Required} */ export declare const currencyDefaults: Required; /** * Converts a numeric value to Canadian English currency words. * @param {number | string | bigint} value - The currency amount to convert * @param {CurrencyOptions} [options] - Optional configuration * @returns {string} The amount in Canadian 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' */ declare function toCurrency(value: number | string | bigint, options?: CurrencyOptions): string; export { toCardinal, toOrdinal, toCurrency };