spell-vn-number
Version:
Vietnamese number speller
26 lines • 1.25 kB
TypeScript
import { InputNumber, SpellerConfig } from './types';
/**
* Main function to spell a Vietnamese number
* @param config SpellerConfig instance
* @param input Number to spell
* @returns Vietnamese spelling of the number
*/
export declare function spellVnNumber(config: SpellerConfig, input: InputNumber): string;
/**
* Convenience function to spell a Vietnamese number with default config
* @param input Number to spell
* @returns Vietnamese spelling of the number
*/
export declare function spell(input: InputNumber): string;
/**
* Convenience function to spell a Vietnamese number with default value on error
* @param input Number to spell
* @param subConfig Partial<SpellerConfig> to override default configuration
* @param defaultOnError Default value to return when an error occurs. If undefined, the error will be thrown.
* @returns Vietnamese spelling of the number or defaultOnError if an error occurs
* @throws InvalidFormatError when input format is invalid
* @throws InvalidNumberError when number is invalid
* @throws Error for other unexpected errors
*/
export declare function spellOrDefault(input: InputNumber, subConfig?: Partial<SpellerConfig>, defaultOnError?: string): string;
//# sourceMappingURL=speller.d.ts.map