import { NumberFormat } from './format'; /** * since users almost always make caches, we might as well * support a universal cache. also universal base (named) types. * * note that for this reason, you shouldn't mutate number formats. * mutate copies instead. */ export declare class NumberFormatCache { /** cache instance */ private static cache; /** special case for the "general" formatter for complex numbers only */ private static complex_general; /** * this map is for case-insensitive mapping symbolic names to formats. we * want symbolic names with casing, primarily for interop, but we also want * to support icase matching. * * FIXME: is there a better way to do this, with a pattern or something in * the cache? */ private static symbolc_name_map; /** base types, with default names */ private static base_formats; /** alias types */ private static aliases; /** * we now have (some) overlay styles for complex. if the flag is set * we will check the complex cache first, and * @param format * @param complex * @returns */ static Get(format: string, complex?: boolean): NumberFormat; /** * does anyone use this? (...) */ static Equals(a: string, b: string): boolean; /** * this method is used to translate symbolic formats, * without actually creating a formatter. it's a shortcut * we need for exporting to xlsx. * * if the passed format matches a symbolic format, we return * the string representation. if it doesn't match any symbolic format, * the string is returned as-is. */ static Translate(format: string): string; /** * check if the format (as a number format) matches a local * symbolic name and if so, return that. */ static SymbolicName(format: string): string | null; static InitCache(): void; }