mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix: add Intl.getCanonicalLocales type definition (#56079)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
co-authored by
Nathan Shively-Sanders
parent
fd0936755b
commit
09fc67bd48
@@ -175,6 +175,7 @@ const libEntries: [string, string][] = [
|
||||
["es2015.symbol", "lib.es2015.symbol.d.ts"],
|
||||
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
|
||||
["es2016.array.include", "lib.es2016.array.include.d.ts"],
|
||||
["es2016.intl", "lib.es2016.intl.d.ts"],
|
||||
["es2017.date", "lib.es2017.date.d.ts"],
|
||||
["es2017.object", "lib.es2017.object.d.ts"],
|
||||
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
|
||||
|
||||
Vendored
+1
@@ -1,2 +1,3 @@
|
||||
/// <reference lib="es2015" />
|
||||
/// <reference lib="es2016.array.include" />
|
||||
/// <reference lib="es2016.intl" />
|
||||
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
declare namespace Intl {
|
||||
/**
|
||||
* The `Intl.getCanonicalLocales()` method returns an array containing
|
||||
* the canonical locale names. Duplicates will be omitted and elements
|
||||
* will be validated as structurally valid language tags.
|
||||
*
|
||||
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales)
|
||||
*
|
||||
* @param locale A list of String values for which to get the canonical locale names
|
||||
* @returns An array containing the canonical and validated locale names.
|
||||
*/
|
||||
function getCanonicalLocales(locale?: string | string[]): string[];
|
||||
}
|
||||
@@ -30,6 +30,7 @@
|
||||
"es2015.symbol",
|
||||
"es2015.symbol.wellknown",
|
||||
"es2016.array.include",
|
||||
"es2016.intl",
|
||||
"es2017.date",
|
||||
"es2017.object",
|
||||
"es2017.sharedmemory",
|
||||
|
||||
Reference in New Issue
Block a user