@phensley/cldr-core
Version:
Core library for @phensley/cldr
39 lines (38 loc) • 1.32 kB
TypeScript
import { NumberSystemCategory, NumberSystemName } from '@phensley/cldr-schema';
import { RoundingModeType } from '../types';
export declare type NumberSystemType = NumberSystemCategory | NumberSystemName;
export interface NumberFormatOptions {
nu?: NumberSystemType;
round?: RoundingModeType;
group?: boolean;
minimumIntegerDigits?: number;
maximumFractionDigits?: number;
minimumFractionDigits?: number;
maximumSignificantDigits?: number;
minimumSignificantDigits?: number;
}
export declare type DecimalFormatStyleType = 'decimal' | 'percent' | 'percent-scaled' | 'permille' | 'permille-scaled' | 'short' | 'long';
export declare type CurrencyFormatStyleType = 'symbol' | 'accounting' | 'code' | 'name' | 'short';
export declare type CurrencySymbolWidthType = 'default' | 'narrow';
/**
* @alpha
*/
export interface DecimalFormatOptions extends NumberFormatOptions {
style?: DecimalFormatStyleType;
}
/**
* @alpha
*/
export interface CurrencyFormatOptions extends NumberFormatOptions {
style?: CurrencyFormatStyleType;
symbolWidth?: CurrencySymbolWidthType;
}
/**
* Information on rounding and number of decimal digits for a given currency.
*/
export interface CurrencyFractions {
digits: number;
rounding: number;
cashDigits: number;
cashRounding: number;
}