import { CURRENCY_CODES, CURRENCY_DISPLAYS, DATE_FORMAT_OPTIONS, DATE_LOCALE_PRESETS, DIGITS_INFO_PRESETS } from '../constants/constants'; export type LiteralUnion = T | (string & {}); export type DatePreset = (typeof DATE_LOCALE_PRESETS)[number]; export type KnownDateFormat = (typeof DATE_FORMAT_OPTIONS)[number]; export type DigitsInfoPreset = (typeof DIGITS_INFO_PRESETS)[number]; export type DigitsInfoPattern = `${number}.${number}` | `${number}.${number}-${number}`; export type DigitsInfo = DigitsInfoPreset | DigitsInfoPattern; export type Iso4217CurrencyCode = (typeof CURRENCY_CODES)[number]; export type CurrencyCode = LiteralUnion; export type CurrencyDisplay = (typeof CURRENCY_DISPLAYS)[number]; export type DateFormat = LiteralUnion; export type DateValue = Date | number | string | null | undefined; export type NumberValue = number | string | null | undefined; export interface DateFormatOptions { fallback?: string; locale?: string; } export interface CurrencyFormatOptions { display?: CurrencyDisplay; digitsInfo?: DigitsInfo; fallback?: string; locale?: string; } export interface DecimalFormatOptions { digitsInfo?: DigitsInfo; fallback?: string; locale?: string; } export interface PercentFormatOptions { digitsInfo?: DigitsInfo; fallback?: string; locale?: string; }