/** * Converts a numeric value to Spanish 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 {('masculine'|'feminine')} [options.gender='masculine'] - Grammatical gender * @returns {string} The number in Spanish words * @throws {TypeError} If value is not a valid numeric type * @throws {Error} If value is not a valid number format * * @example * toCardinal(21) // 'veintiuno' * toCardinal(21, {gender: 'feminine'}) // 'veintiuna' * toCardinal(1000000) // 'un millón' */ export function toCardinal(value: number | string | bigint, options?: { gender?: "masculine" | "feminine" | undefined; }): string; /** * Converts a numeric value to Spanish ordinal words. * * Spanish ordinals agree in gender with the noun they modify. * Only positive integers are valid for ordinals. * * @param {number | string | bigint} value - The positive integer to convert * @param {Object} [options] - Optional configuration * @param {('masculine'|'feminine')} [options.gender='masculine'] - Grammatical gender * @returns {string} The number in Spanish ordinal words * @throws {TypeError} If value is not a valid numeric type * @throws {Error} If value is not a positive integer * * @example * toOrdinal(1) // 'primero' * toOrdinal(1, { gender: 'feminine' }) // 'primera' * toOrdinal(21) // 'vigésimo primero' * toOrdinal(100) // 'centésimo' */ export function toOrdinal(value: number | string | bigint, options?: { gender?: "masculine" | "feminine" | undefined; }): string; /** * Converts a numeric value to Spanish Euro currency words. * * Spanish currency uses masculine gender for euros (el euro) * and masculine for céntimos (el céntimo). * * @param {number | string | bigint} value - The currency amount to convert * @param {Object} [options] - Optional configuration * @param {boolean} [options.and=true] - Use "con" between euros and cents * @returns {string} The amount in Spanish 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) // 'cuarenta y dos euros con cincuenta céntimos' * toCurrency(1) // 'un euro' * toCurrency(0.99) // 'noventa y nueve céntimos' * toCurrency(42.50, { and: false }) // 'cuarenta y dos euros cincuenta céntimos' */ export function toCurrency(value: number | string | bigint, options?: { and?: boolean | undefined; }): string;