export type Scale = 'long' | 'short' export interface ConvertOptions { scale?: Scale } export interface StreamOptions { encoding?: BufferEncoding } type NumberDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 type StringDigit = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' export type Digit = NumberDigit | StringDigit export type ReadStreamOptions = ConvertOptions & StreamOptions export type GetKiloCount = (hundreds: Digit, tens: Digit, ones: Digit) => string export type GetKiloName = (thousandPower: bigint) => string export type JoinKilo = (kiloCount: string, kiloName?: string) => string export interface NumberSystem { getKiloCount: GetKiloCount getKiloName: { short?: GetKiloName long?: GetKiloName europeanLong?: GetKiloName } joinKilo: JoinKilo } interface DigitString { [0]: string [1]: string [2]: string [3]: string [4]: string [5]: string [6]: string [7]: string [8]: string [9]: string ['0']: string ['1']: string ['2']: string ['3']: string ['4']: string ['5']: string ['6']: string ['7']: string ['8']: string ['9']: string } export interface NumberSystemNameTable { units: DigitString tenPlus: DigitString tenTimes: DigitString hundred: string thousand: string kiloSpecialUnits: DigitString kiloUnits: DigitString kiloTens: DigitString kiloHundreds: DigitString kiloThousand: string kiloEvenSuffix: string kiloOddSuffix: string and: string }