add Intl.supportedValuesOf (#53511)

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
Khafra
2023-04-12 15:18:49 -04:00
committed by GitHub
parent a26175bffb
commit fd6f61ea6b
5 changed files with 63 additions and 0 deletions

View File

@@ -88,4 +88,13 @@ declare namespace Intl {
*/
supportedLocalesOf(locales: BCP47LanguageTag | BCP47LanguageTag[], options?: Pick<SegmenterOptions, "localeMatcher">): BCP47LanguageTag[];
};
/**
* Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation.
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf)
*
* @param key A string indicating the category of values to return.
* @returns A sorted array of the supported values.
*/
function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[];
}