typescript 5.7.0-dev.20240927 → 5.7.0-dev.20240928
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_tsc.js +580 -223
- package/lib/lib.dom.d.ts +1115 -219
- package/lib/lib.es2016.intl.d.ts +1 -1
- package/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/lib/lib.es2017.d.ts +3 -2
- package/lib/lib.es2017.sharedmemory.d.ts +2 -2
- package/lib/lib.es2020.bigint.d.ts +1 -1
- package/lib/lib.es2020.intl.d.ts +36 -36
- package/lib/lib.es2020.sharedmemory.d.ts +2 -0
- package/lib/lib.es2020.string.d.ts +2 -0
- package/lib/lib.es2021.intl.d.ts +17 -17
- package/lib/lib.es2021.weakref.d.ts +2 -0
- package/lib/lib.es2022.d.ts +1 -2
- package/lib/lib.es2022.error.d.ts +2 -0
- package/lib/lib.es2022.intl.d.ts +9 -9
- package/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/lib/lib.es2024.collection.d.ts +29 -0
- package/lib/lib.es2024.d.ts +26 -0
- package/lib/lib.es2024.full.d.ts +24 -0
- package/lib/{lib.es2022.sharedmemory.d.ts → lib.es2024.sharedmemory.d.ts} +29 -0
- package/lib/lib.es5.d.ts +1 -1
- package/lib/lib.esnext.collection.d.ts +1 -11
- package/lib/lib.esnext.d.ts +1 -5
- package/lib/lib.webworker.d.ts +311 -34
- package/lib/typescript.d.ts +7 -1
- package/lib/typescript.js +603 -230
- package/package.json +2 -2
- /package/lib/{lib.esnext.object.d.ts → lib.es2024.object.d.ts} +0 -0
- /package/lib/{lib.esnext.promise.d.ts → lib.es2024.promise.d.ts} +0 -0
- /package/lib/{lib.esnext.regexp.d.ts → lib.es2024.regexp.d.ts} +0 -0
- /package/lib/{lib.esnext.string.d.ts → lib.es2024.string.d.ts} +0 -0
package/lib/lib.es2016.intl.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ declare namespace Intl {
|
|
|
22
22
|
* the canonical locale names. Duplicates will be omitted and elements
|
|
23
23
|
* will be validated as structurally valid language tags.
|
|
24
24
|
*
|
|
25
|
-
* [MDN](https://developer.mozilla.org/
|
|
25
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales)
|
|
26
26
|
*
|
|
27
27
|
* @param locale A list of String values for which to get the canonical locale names
|
|
28
28
|
* @returns An array containing the canonical and validated locale names.
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface ArrayBufferConstructor {
|
|
20
|
+
new (): ArrayBuffer;
|
|
21
|
+
}
|
package/lib/lib.es2017.d.ts
CHANGED
|
@@ -17,9 +17,10 @@ and limitations under the License.
|
|
|
17
17
|
/// <reference no-default-lib="true"/>
|
|
18
18
|
|
|
19
19
|
/// <reference lib="es2016" />
|
|
20
|
+
/// <reference lib="es2017.arraybuffer" />
|
|
21
|
+
/// <reference lib="es2017.date" />
|
|
22
|
+
/// <reference lib="es2017.intl" />
|
|
20
23
|
/// <reference lib="es2017.object" />
|
|
21
24
|
/// <reference lib="es2017.sharedmemory" />
|
|
22
25
|
/// <reference lib="es2017.string" />
|
|
23
|
-
/// <reference lib="es2017.intl" />
|
|
24
26
|
/// <reference lib="es2017.typedarrays" />
|
|
25
|
-
/// <reference lib="es2017.date" />
|
|
@@ -28,14 +28,14 @@ interface SharedArrayBuffer {
|
|
|
28
28
|
/**
|
|
29
29
|
* Returns a section of an SharedArrayBuffer.
|
|
30
30
|
*/
|
|
31
|
-
slice(begin
|
|
31
|
+
slice(begin?: number, end?: number): SharedArrayBuffer;
|
|
32
32
|
readonly [Symbol.species]: SharedArrayBuffer;
|
|
33
33
|
readonly [Symbol.toStringTag]: "SharedArrayBuffer";
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
interface SharedArrayBufferConstructor {
|
|
37
37
|
readonly prototype: SharedArrayBuffer;
|
|
38
|
-
new (byteLength
|
|
38
|
+
new (byteLength?: number): SharedArrayBuffer;
|
|
39
39
|
}
|
|
40
40
|
declare var SharedArrayBuffer: SharedArrayBufferConstructor;
|
|
41
41
|
|
|
@@ -20,7 +20,7 @@ and limitations under the License.
|
|
|
20
20
|
|
|
21
21
|
interface BigIntToLocaleStringOptions {
|
|
22
22
|
/**
|
|
23
|
-
* The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/
|
|
23
|
+
* The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}.
|
|
24
24
|
*/
|
|
25
25
|
localeMatcher?: string;
|
|
26
26
|
/**
|
package/lib/lib.es2020.intl.d.ts
CHANGED
|
@@ -23,14 +23,14 @@ declare namespace Intl {
|
|
|
23
23
|
*
|
|
24
24
|
* For example: "fa", "es-MX", "zh-Hant-TW".
|
|
25
25
|
*
|
|
26
|
-
* See [MDN - Intl - locales argument](https://developer.mozilla.org/
|
|
26
|
+
* See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
|
27
27
|
*/
|
|
28
28
|
type UnicodeBCP47LocaleIdentifier = string;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Unit to use in the relative time internationalized message.
|
|
32
32
|
*
|
|
33
|
-
* [MDN](https://developer.mozilla.org/
|
|
33
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters).
|
|
34
34
|
*/
|
|
35
35
|
type RelativeTimeFormatUnit =
|
|
36
36
|
| "year"
|
|
@@ -57,7 +57,7 @@ declare namespace Intl {
|
|
|
57
57
|
* but `formatToParts` only outputs singular (e.g. "day") not plural (e.g.
|
|
58
58
|
* "days").
|
|
59
59
|
*
|
|
60
|
-
* [MDN](https://developer.mozilla.org/
|
|
60
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
|
61
61
|
*/
|
|
62
62
|
type RelativeTimeFormatUnitSingular =
|
|
63
63
|
| "year"
|
|
@@ -79,21 +79,21 @@ declare namespace Intl {
|
|
|
79
79
|
/**
|
|
80
80
|
* The format of output message.
|
|
81
81
|
*
|
|
82
|
-
* [MDN](https://developer.mozilla.org/
|
|
82
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
|
83
83
|
*/
|
|
84
84
|
type RelativeTimeFormatNumeric = "always" | "auto";
|
|
85
85
|
|
|
86
86
|
/**
|
|
87
87
|
* The length of the internationalized message.
|
|
88
88
|
*
|
|
89
|
-
* [MDN](https://developer.mozilla.org/
|
|
89
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
|
90
90
|
*/
|
|
91
91
|
type RelativeTimeFormatStyle = "long" | "short" | "narrow";
|
|
92
92
|
|
|
93
93
|
/**
|
|
94
94
|
* The locale or locales to use
|
|
95
95
|
*
|
|
96
|
-
* See [MDN - Intl - locales argument](https://developer.mozilla.org/
|
|
96
|
+
* See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
|
97
97
|
*/
|
|
98
98
|
type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;
|
|
99
99
|
|
|
@@ -101,7 +101,7 @@ declare namespace Intl {
|
|
|
101
101
|
* An object with some or all of properties of `options` parameter
|
|
102
102
|
* of `Intl.RelativeTimeFormat` constructor.
|
|
103
103
|
*
|
|
104
|
-
* [MDN](https://developer.mozilla.org/
|
|
104
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
|
105
105
|
*/
|
|
106
106
|
interface RelativeTimeFormatOptions {
|
|
107
107
|
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
@@ -117,7 +117,7 @@ declare namespace Intl {
|
|
|
117
117
|
* and formatting options computed during initialization
|
|
118
118
|
* of the `Intl.RelativeTimeFormat` object
|
|
119
119
|
*
|
|
120
|
-
* [MDN](https://developer.mozilla.org/
|
|
120
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description).
|
|
121
121
|
*/
|
|
122
122
|
interface ResolvedRelativeTimeFormatOptions {
|
|
123
123
|
locale: UnicodeBCP47LocaleIdentifier;
|
|
@@ -130,7 +130,7 @@ declare namespace Intl {
|
|
|
130
130
|
* An object representing the relative time format in parts
|
|
131
131
|
* that can be used for custom locale-aware formatting.
|
|
132
132
|
*
|
|
133
|
-
* [MDN](https://developer.mozilla.org/
|
|
133
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
|
134
134
|
*/
|
|
135
135
|
type RelativeTimeFormatPart =
|
|
136
136
|
| {
|
|
@@ -166,7 +166,7 @@ declare namespace Intl {
|
|
|
166
166
|
*
|
|
167
167
|
* @returns {string} Internationalized relative time message as string
|
|
168
168
|
*
|
|
169
|
-
* [MDN](https://developer.mozilla.org/
|
|
169
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format).
|
|
170
170
|
*/
|
|
171
171
|
format(value: number, unit: RelativeTimeFormatUnit): string;
|
|
172
172
|
|
|
@@ -179,14 +179,14 @@ declare namespace Intl {
|
|
|
179
179
|
*
|
|
180
180
|
* @throws `RangeError` if `unit` was given something other than `unit` possible values
|
|
181
181
|
*
|
|
182
|
-
* [MDN](https://developer.mozilla.org/
|
|
182
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts).
|
|
183
183
|
*/
|
|
184
184
|
formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[];
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object.
|
|
188
188
|
*
|
|
189
|
-
* [MDN](https://developer.mozilla.org/
|
|
189
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions).
|
|
190
190
|
*/
|
|
191
191
|
resolvedOptions(): ResolvedRelativeTimeFormatOptions;
|
|
192
192
|
}
|
|
@@ -195,22 +195,22 @@ declare namespace Intl {
|
|
|
195
195
|
* The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
|
|
196
196
|
* object is a constructor for objects that enable language-sensitive relative time formatting.
|
|
197
197
|
*
|
|
198
|
-
* [Compatibility](https://developer.mozilla.org/
|
|
198
|
+
* [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility).
|
|
199
199
|
*/
|
|
200
200
|
const RelativeTimeFormat: {
|
|
201
201
|
/**
|
|
202
|
-
* Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/
|
|
202
|
+
* Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects
|
|
203
203
|
*
|
|
204
204
|
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
205
205
|
* For the general form and interpretation of the locales argument,
|
|
206
|
-
* see the [`Intl` page](https://developer.mozilla.org/
|
|
206
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
207
207
|
*
|
|
208
|
-
* @param options - An [object](https://developer.mozilla.org/
|
|
208
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
|
|
209
209
|
* with some or all of options of `RelativeTimeFormatOptions`.
|
|
210
210
|
*
|
|
211
|
-
* @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/
|
|
211
|
+
* @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object.
|
|
212
212
|
*
|
|
213
|
-
* [MDN](https://developer.mozilla.org/
|
|
213
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
|
|
214
214
|
*/
|
|
215
215
|
new (
|
|
216
216
|
locales?: LocalesArgument,
|
|
@@ -224,16 +224,16 @@ declare namespace Intl {
|
|
|
224
224
|
*
|
|
225
225
|
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
226
226
|
* For the general form and interpretation of the locales argument,
|
|
227
|
-
* see the [`Intl` page](https://developer.mozilla.org/
|
|
227
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
228
228
|
*
|
|
229
|
-
* @param options - An [object](https://developer.mozilla.org/
|
|
229
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
|
|
230
230
|
* with some or all of options of the formatting.
|
|
231
231
|
*
|
|
232
232
|
* @returns An array containing those of the provided locales
|
|
233
233
|
* that are supported in date and time formatting
|
|
234
234
|
* without having to fall back to the runtime's default locale.
|
|
235
235
|
*
|
|
236
|
-
* [MDN](https://developer.mozilla.org/
|
|
236
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf).
|
|
237
237
|
*/
|
|
238
238
|
supportedLocalesOf(
|
|
239
239
|
locales?: LocalesArgument,
|
|
@@ -336,18 +336,18 @@ declare namespace Intl {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
/**
|
|
339
|
-
* Constructor creates [Intl.Locale](https://developer.mozilla.org/
|
|
339
|
+
* Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale)
|
|
340
340
|
* objects
|
|
341
341
|
*
|
|
342
342
|
* @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646).
|
|
343
343
|
* For the general form and interpretation of the locales argument,
|
|
344
|
-
* see the [`Intl` page](https://developer.mozilla.org/
|
|
344
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
345
345
|
*
|
|
346
|
-
* @param options - An [object](https://developer.mozilla.org/
|
|
346
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale.
|
|
347
347
|
*
|
|
348
|
-
* @returns [Intl.Locale](https://developer.mozilla.org/
|
|
348
|
+
* @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object.
|
|
349
349
|
*
|
|
350
|
-
* [MDN](https://developer.mozilla.org/
|
|
350
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale).
|
|
351
351
|
*/
|
|
352
352
|
const Locale: {
|
|
353
353
|
new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale;
|
|
@@ -388,7 +388,7 @@ declare namespace Intl {
|
|
|
388
388
|
interface DisplayNames {
|
|
389
389
|
/**
|
|
390
390
|
* Receives a code and returns a string based on the locale and options provided when instantiating
|
|
391
|
-
* [`Intl.DisplayNames()`](https://developer.mozilla.org/
|
|
391
|
+
* [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames)
|
|
392
392
|
*
|
|
393
393
|
* @param code The `code` to provide depends on the `type` passed to display name during creation:
|
|
394
394
|
* - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html),
|
|
@@ -399,35 +399,35 @@ declare namespace Intl {
|
|
|
399
399
|
* `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code.
|
|
400
400
|
* - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html).
|
|
401
401
|
*
|
|
402
|
-
* [MDN](https://developer.mozilla.org/
|
|
402
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of).
|
|
403
403
|
*/
|
|
404
404
|
of(code: string): string | undefined;
|
|
405
405
|
/**
|
|
406
406
|
* Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current
|
|
407
|
-
* [`Intl/DisplayNames`](https://developer.mozilla.org/
|
|
407
|
+
* [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object.
|
|
408
408
|
*
|
|
409
|
-
* [MDN](https://developer.mozilla.org/
|
|
409
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions).
|
|
410
410
|
*/
|
|
411
411
|
resolvedOptions(): ResolvedDisplayNamesOptions;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
|
-
* The [`Intl.DisplayNames()`](https://developer.mozilla.org/
|
|
415
|
+
* The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames)
|
|
416
416
|
* object enables the consistent translation of language, region and script display names.
|
|
417
417
|
*
|
|
418
|
-
* [Compatibility](https://developer.mozilla.org/
|
|
418
|
+
* [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility).
|
|
419
419
|
*/
|
|
420
420
|
const DisplayNames: {
|
|
421
421
|
prototype: DisplayNames;
|
|
422
422
|
|
|
423
423
|
/**
|
|
424
424
|
* @param locales A string with a BCP 47 language tag, or an array of such strings.
|
|
425
|
-
* For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/
|
|
425
|
+
* For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation)
|
|
426
426
|
* page.
|
|
427
427
|
*
|
|
428
428
|
* @param options An object for setting up a display name.
|
|
429
429
|
*
|
|
430
|
-
* [MDN](https://developer.mozilla.org/
|
|
430
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames).
|
|
431
431
|
*/
|
|
432
432
|
new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;
|
|
433
433
|
|
|
@@ -435,14 +435,14 @@ declare namespace Intl {
|
|
|
435
435
|
* Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale.
|
|
436
436
|
*
|
|
437
437
|
* @param locales A string with a BCP 47 language tag, or an array of such strings.
|
|
438
|
-
* For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/
|
|
438
|
+
* For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation)
|
|
439
439
|
* page.
|
|
440
440
|
*
|
|
441
441
|
* @param options An object with a locale matcher.
|
|
442
442
|
*
|
|
443
443
|
* @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale.
|
|
444
444
|
*
|
|
445
|
-
* [MDN](https://developer.mozilla.org/
|
|
445
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
|
|
446
446
|
*/
|
|
447
447
|
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[];
|
|
448
448
|
};
|
package/lib/lib.es2021.intl.d.ts
CHANGED
|
@@ -50,28 +50,28 @@ declare namespace Intl {
|
|
|
50
50
|
/**
|
|
51
51
|
* The locale matching algorithm to use.
|
|
52
52
|
*
|
|
53
|
-
* [MDN](https://developer.mozilla.org/
|
|
53
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
54
54
|
*/
|
|
55
55
|
type ListFormatLocaleMatcher = "lookup" | "best fit";
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* The format of output message.
|
|
59
59
|
*
|
|
60
|
-
* [MDN](https://developer.mozilla.org/
|
|
60
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
61
61
|
*/
|
|
62
62
|
type ListFormatType = "conjunction" | "disjunction" | "unit";
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* The length of the formatted message.
|
|
66
66
|
*
|
|
67
|
-
* [MDN](https://developer.mozilla.org/
|
|
67
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
68
68
|
*/
|
|
69
69
|
type ListFormatStyle = "long" | "short" | "narrow";
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter.
|
|
73
73
|
*
|
|
74
|
-
* [MDN](https://developer.mozilla.org/
|
|
74
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
75
75
|
*/
|
|
76
76
|
interface ListFormatOptions {
|
|
77
77
|
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
@@ -92,26 +92,26 @@ declare namespace Intl {
|
|
|
92
92
|
/**
|
|
93
93
|
* Returns a string with a language-specific representation of the list.
|
|
94
94
|
*
|
|
95
|
-
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/
|
|
95
|
+
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array).
|
|
96
96
|
*
|
|
97
97
|
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
98
98
|
*
|
|
99
99
|
* @returns {string} A language-specific formatted string representing the elements of the list.
|
|
100
100
|
*
|
|
101
|
-
* [MDN](https://developer.mozilla.org/
|
|
101
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format).
|
|
102
102
|
*/
|
|
103
103
|
format(list: Iterable<string>): string;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
|
|
107
107
|
*
|
|
108
|
-
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/
|
|
108
|
+
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale.
|
|
109
109
|
*
|
|
110
110
|
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
111
111
|
*
|
|
112
112
|
* @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list.
|
|
113
113
|
*
|
|
114
|
-
* [MDN](https://developer.mozilla.org/
|
|
114
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
|
|
115
115
|
*/
|
|
116
116
|
formatToParts(list: Iterable<string>): { type: "element" | "literal"; value: string; }[];
|
|
117
117
|
|
|
@@ -120,7 +120,7 @@ declare namespace Intl {
|
|
|
120
120
|
* formatting options computed during the construction of the current
|
|
121
121
|
* `Intl.ListFormat` object.
|
|
122
122
|
*
|
|
123
|
-
* [MDN](https://developer.mozilla.org/
|
|
123
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions).
|
|
124
124
|
*/
|
|
125
125
|
resolvedOptions(): ResolvedListFormatOptions;
|
|
126
126
|
}
|
|
@@ -129,19 +129,19 @@ declare namespace Intl {
|
|
|
129
129
|
prototype: ListFormat;
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
|
-
* Creates [Intl.ListFormat](https://developer.mozilla.org/
|
|
132
|
+
* Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that
|
|
133
133
|
* enable language-sensitive list formatting.
|
|
134
134
|
*
|
|
135
135
|
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
136
136
|
* For the general form and interpretation of the `locales` argument,
|
|
137
|
-
* see the [`Intl` page](https://developer.mozilla.org/
|
|
137
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
138
138
|
*
|
|
139
|
-
* @param options - An [object](https://developer.mozilla.org/
|
|
139
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters)
|
|
140
140
|
* with some or all options of `ListFormatOptions`.
|
|
141
141
|
*
|
|
142
|
-
* @returns [Intl.ListFormatOptions](https://developer.mozilla.org/
|
|
142
|
+
* @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object.
|
|
143
143
|
*
|
|
144
|
-
* [MDN](https://developer.mozilla.org/
|
|
144
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
|
|
145
145
|
*/
|
|
146
146
|
new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat;
|
|
147
147
|
|
|
@@ -151,15 +151,15 @@ declare namespace Intl {
|
|
|
151
151
|
*
|
|
152
152
|
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
153
153
|
* For the general form and interpretation of the `locales` argument,
|
|
154
|
-
* see the [`Intl` page](https://developer.mozilla.org/
|
|
154
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
155
155
|
*
|
|
156
|
-
* @param options - An [object](https://developer.mozilla.org/
|
|
156
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters).
|
|
157
157
|
* with some or all possible options.
|
|
158
158
|
*
|
|
159
159
|
* @returns An array of strings representing a subset of the given locale tags that are supported in list
|
|
160
160
|
* formatting without having to fall back to the runtime's default locale.
|
|
161
161
|
*
|
|
162
|
-
* [MDN](https://developer.mozilla.org/
|
|
162
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf).
|
|
163
163
|
*/
|
|
164
164
|
supportedLocalesOf(locales: LocalesArgument, options?: Pick<ListFormatOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
|
|
165
165
|
};
|
package/lib/lib.es2022.d.ts
CHANGED
|
@@ -21,6 +21,5 @@ and limitations under the License.
|
|
|
21
21
|
/// <reference lib="es2022.error" />
|
|
22
22
|
/// <reference lib="es2022.intl" />
|
|
23
23
|
/// <reference lib="es2022.object" />
|
|
24
|
-
/// <reference lib="es2022.sharedmemory" />
|
|
25
|
-
/// <reference lib="es2022.string" />
|
|
26
24
|
/// <reference lib="es2022.regexp" />
|
|
25
|
+
/// <reference lib="es2022.string" />
|
package/lib/lib.es2022.intl.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ declare namespace Intl {
|
|
|
20
20
|
/**
|
|
21
21
|
* An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
|
|
22
22
|
*
|
|
23
|
-
* [MDN](https://developer.mozilla.org/
|
|
23
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
|
24
24
|
*/
|
|
25
25
|
interface SegmenterOptions {
|
|
26
26
|
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
@@ -84,14 +84,14 @@ declare namespace Intl {
|
|
|
84
84
|
*
|
|
85
85
|
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
86
86
|
* For the general form and interpretation of the `locales` argument,
|
|
87
|
-
* see the [`Intl` page](https://developer.mozilla.org/
|
|
87
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
88
88
|
*
|
|
89
|
-
* @param options - An [object](https://developer.mozilla.org/
|
|
89
|
+
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
|
90
90
|
* with some or all options of `SegmenterOptions`.
|
|
91
91
|
*
|
|
92
|
-
* @returns [Intl.Segmenter](https://developer.mozilla.org/
|
|
92
|
+
* @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object.
|
|
93
93
|
*
|
|
94
|
-
* [MDN](https://developer.mozilla.org/
|
|
94
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
|
|
95
95
|
*/
|
|
96
96
|
new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter;
|
|
97
97
|
|
|
@@ -100,19 +100,19 @@ declare namespace Intl {
|
|
|
100
100
|
*
|
|
101
101
|
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
102
102
|
* For the general form and interpretation of the `locales` argument,
|
|
103
|
-
* see the [`Intl` page](https://developer.mozilla.org/
|
|
103
|
+
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
104
104
|
*
|
|
105
|
-
* @param options An [object](https://developer.mozilla.org/
|
|
105
|
+
* @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters).
|
|
106
106
|
* with some or all possible options.
|
|
107
107
|
*
|
|
108
|
-
* [MDN](https://developer.mozilla.org/
|
|
108
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
|
|
109
109
|
*/
|
|
110
110
|
supportedLocalesOf(locales: LocalesArgument, options?: Pick<SegmenterOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
114
|
* Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation.
|
|
115
|
-
* [MDN](https://developer.mozilla.org/
|
|
115
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf)
|
|
116
116
|
*
|
|
117
117
|
* @param key A string indicating the category of values to return.
|
|
118
118
|
* @returns A sorted array of the supported values.
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/// <reference no-default-lib="true"/>
|
|
18
|
+
|
|
19
|
+
interface ArrayBuffer {
|
|
20
|
+
/**
|
|
21
|
+
* If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not.
|
|
22
|
+
*
|
|
23
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength)
|
|
24
|
+
*/
|
|
25
|
+
get maxByteLength(): number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Returns true if this ArrayBuffer can be resized.
|
|
29
|
+
*
|
|
30
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable)
|
|
31
|
+
*/
|
|
32
|
+
get resizable(): boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Resizes the ArrayBuffer to the specified size (in bytes).
|
|
36
|
+
*
|
|
37
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize)
|
|
38
|
+
*/
|
|
39
|
+
resize(newByteLength?: number): void;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns a boolean indicating whether or not this buffer has been detached (transferred).
|
|
43
|
+
*
|
|
44
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached)
|
|
45
|
+
*/
|
|
46
|
+
get detached(): boolean;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer.
|
|
50
|
+
*
|
|
51
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer)
|
|
52
|
+
*/
|
|
53
|
+
transfer(newByteLength?: number): ArrayBuffer;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer.
|
|
57
|
+
*
|
|
58
|
+
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength)
|
|
59
|
+
*/
|
|
60
|
+
transferToFixedLength(newByteLength?: number): ArrayBuffer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
interface ArrayBufferConstructor {
|
|
64
|
+
new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer;
|
|
65
|
+
}
|