//#region packages/ecma402-abstract/types/core.d.ts type Locale = string; interface LocaleData { data: T; locale: Locale; } //#endregion //#region packages/ecma402-abstract/types/displaynames.d.ts type LanguageTag = string; type RegionCode = string; type ScriptCode = string; type CurrencyCode = string; type CalendarCode = string; type DateTimeFieldCode = string; interface DisplayNamesData { /** * Note that for style fields, `short` and `narrow` might not exist. * At runtime, the fallback order will be narrow -> short -> long. */ types: { /** * Maps language subtag like `zh-CN` to their display names. */ language: { dialect: { narrow: Record; short: Record; long: Record; }; standard: { narrow: Record; short: Record; long: Record; }; }; region: { narrow: Record; short: Record; long: Record; }; script: { narrow: Record; short: Record; long: Record; }; currency: { narrow: Record; short: Record; long: Record; }; calendar: { narrow: Record; short: Record; long: Record; }; dateTimeField: { narrow: Record; short: Record; long: Record; }; }; /** * Not in spec, but we need this to display both language and region in display name. * e.g. zh-Hans-SG + "{0}({1})" -> 简体中文(新加坡) * Here {0} is replaced by language display name and {1} is replaced by region display name. */ patterns: { locale: string; }; } type DisplayNamesLocaleData = LocaleData; //#endregion //#region packages/intl-displaynames/index.d.ts interface DisplayNamesOptions { localeMatcher?: "lookup" | "best fit"; style?: "narrow" | "short" | "long"; type: "language" | "region" | "script" | "currency" | "calendar" | "dateTimeField"; fallback?: "code" | "none"; languageDisplay?: "dialect" | "standard"; } interface DisplayNamesResolvedOptions { locale: string; style: NonNullable; type: NonNullable; fallback: NonNullable; languageDisplay: NonNullable; } declare class DisplayNames { constructor(locales: string | string[] | undefined, options: DisplayNamesOptions); static supportedLocalesOf(locales?: string | string[], options?: Pick): string[]; static __addLocaleData(...data: DisplayNamesLocaleData[]): void; of(code: string | number | Record): string | undefined; resolvedOptions(): DisplayNamesResolvedOptions; static localeData: Record; private static availableLocales; private static __defaultLocale; private static getDefaultLocale; static readonly polyfilled = true; } //#endregion export { DisplayNames, DisplayNamesOptions, DisplayNamesResolvedOptions }; //# sourceMappingURL=index.d.ts.map