Skip to content

Commit 95cc56c

Browse files
committed
fix: add es2016.intl.d.ts
1 parent 3b22339 commit 95cc56c

15 files changed

+80
-11
lines changed

lib/lib.es2016.intl.d.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*! *****************************************************************************
2+
Copyright (c) Microsoft Corporation. All rights reserved.
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4+
this file except in compliance with the License. You may obtain a copy of the
5+
License at http://www.apache.org/licenses/LICENSE-2.0
6+
7+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10+
MERCHANTABLITY OR NON-INFRINGEMENT.
11+
12+
See the Apache Version 2.0 License for specific language governing permissions
13+
and limitations under the License.
14+
***************************************************************************** */
15+
16+
17+
18+
/// <reference no-default-lib="true"/>
19+
20+
21+
declare namespace Intl {
22+
23+
/**
24+
* [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
25+
*
26+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
27+
*
28+
* [Wikipedia](https://en.wikipedia.org/wiki/IETF_language_tag).
29+
*/
30+
type UnicodeBCP47LocaleIdentifier = string;
31+
32+
/**
33+
* The Intl.getCanonicalLocales() method returns an array containing
34+
* the canonical locale names. Duplicates will be omitted and elements
35+
* will be validated as structurally valid language tags.
36+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales
37+
* @param locale A list of string values for which to get the canonical locale names.
38+
*/
39+
function getCanonicalLocales (locale?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[]): UnicodeBCP47LocaleIdentifier[];
40+
}

lib/tsc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27820,6 +27820,7 @@ var ts;
2782027820
["es2015.symbol", "lib.es2015.symbol.d.ts"],
2782127821
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
2782227822
["es2016.array.include", "lib.es2016.array.include.d.ts"],
27823+
["es2016.intl", "lib.es2016.intl.d.ts"],
2782327824
["es2017.object", "lib.es2017.object.d.ts"],
2782427825
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
2782527826
["es2017.string", "lib.es2017.string.d.ts"],

lib/tsserver.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34511,6 +34511,7 @@ var ts;
3451134511
["es2015.symbol", "lib.es2015.symbol.d.ts"],
3451234512
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
3451334513
["es2016.array.include", "lib.es2016.array.include.d.ts"],
34514+
["es2016.intl", "lib.es2016.intl.d.ts"],
3451434515
["es2017.object", "lib.es2017.object.d.ts"],
3451534516
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
3451634517
["es2017.string", "lib.es2017.string.d.ts"],

lib/tsserverlibrary.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34661,6 +34661,7 @@ var ts;
3466134661
["es2015.symbol", "lib.es2015.symbol.d.ts"],
3466234662
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
3466334663
["es2016.array.include", "lib.es2016.array.include.d.ts"],
34664+
["es2016.intl", "lib.es2016.intl.d.ts"],
3466434665
["es2017.object", "lib.es2017.object.d.ts"],
3466534666
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
3466634667
["es2017.string", "lib.es2017.string.d.ts"],

lib/typescript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34661,6 +34661,7 @@ var ts;
3466134661
["es2015.symbol", "lib.es2015.symbol.d.ts"],
3466234662
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
3466334663
["es2016.array.include", "lib.es2016.array.include.d.ts"],
34664+
["es2016.intl", "lib.es2016.intl.d.ts"],
3466434665
["es2017.object", "lib.es2017.object.d.ts"],
3466534666
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
3466634667
["es2017.string", "lib.es2017.string.d.ts"],

lib/typescriptServices.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34661,6 +34661,7 @@ var ts;
3466134661
["es2015.symbol", "lib.es2015.symbol.d.ts"],
3466234662
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
3466334663
["es2016.array.include", "lib.es2016.array.include.d.ts"],
34664+
["es2016.intl", "lib.es2016.intl.d.ts"],
3466434665
["es2017.object", "lib.es2017.object.d.ts"],
3466534666
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
3466634667
["es2017.string", "lib.es2017.string.d.ts"],

lib/typingsInstaller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34500,6 +34500,7 @@ var ts;
3450034500
["es2015.symbol", "lib.es2015.symbol.d.ts"],
3450134501
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
3450234502
["es2016.array.include", "lib.es2016.array.include.d.ts"],
34503+
["es2016.intl", "lib.es2016.intl.d.ts"],
3450334504
["es2017.object", "lib.es2017.object.d.ts"],
3450434505
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
3450534506
["es2017.string", "lib.es2017.string.d.ts"],

src/compiler/commandLineParser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace ts {
3535
["es2015.symbol", "lib.es2015.symbol.d.ts"],
3636
["es2015.symbol.wellknown", "lib.es2015.symbol.wellknown.d.ts"],
3737
["es2016.array.include", "lib.es2016.array.include.d.ts"],
38+
["es2016.intl", "lib.es2016.intl.d.ts"],
3839
["es2017.object", "lib.es2017.object.d.ts"],
3940
["es2017.sharedmemory", "lib.es2017.sharedmemory.d.ts"],
4041
["es2017.string", "lib.es2017.string.d.ts"],

src/lib/es2016.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/// <reference lib="es2015" />
2-
/// <reference lib="es2016.array.include" />
2+
/// <reference lib="es2016.array.include" />
3+
/// <reference lib="es2016.intl" />

src/lib/es2016.intl.d.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
declare namespace Intl {
2+
3+
/**
4+
* [Unicode BCP 47 Locale Identifiers](https://unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers) definition.
5+
*
6+
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
7+
*
8+
* [Wikipedia](https://en.wikipedia.org/wiki/IETF_language_tag).
9+
*/
10+
type UnicodeBCP47LocaleIdentifier = string;
11+
12+
/**
13+
* The Intl.getCanonicalLocales() method returns an array containing
14+
* the canonical locale names. Duplicates will be omitted and elements
15+
* will be validated as structurally valid language tags.
16+
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales
17+
* @param locale A list of string values for which to get the canonical locale names.
18+
*/
19+
function getCanonicalLocales(locale?: UnicodeBCP47LocaleIdentifier | UnicodeBCP47LocaleIdentifier[]): UnicodeBCP47LocaleIdentifier[];
20+
}

0 commit comments

Comments
 (0)