@stencil/core 2.11.0 → 2.14.0
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/cli/index.cjs +33 -8
- package/cli/index.js +33 -8
- package/cli/package.json +1 -1
- package/compiler/lib.dom.d.ts +2855 -4909
- package/compiler/lib.dom.iterable.d.ts +42 -66
- package/compiler/lib.es2015.core.d.ts +60 -18
- package/compiler/lib.es2015.iterable.d.ts +3 -11
- package/compiler/lib.es2015.promise.d.ts +2 -74
- package/compiler/lib.es2015.symbol.wellknown.d.ts +3 -3
- package/compiler/lib.es2018.intl.d.ts +23 -11
- package/compiler/lib.es2019.string.d.ts +8 -2
- package/compiler/lib.es2020.bigint.d.ts +2 -2
- package/compiler/lib.es2020.intl.d.ts +173 -114
- package/compiler/lib.es2020.promise.d.ts +2 -3
- package/compiler/lib.es2021.d.ts +1 -0
- package/compiler/lib.es2021.intl.d.ts +44 -0
- package/compiler/lib.es2021.promise.d.ts +8 -1
- package/compiler/lib.es5.d.ts +112 -52
- package/compiler/lib.esnext.intl.d.ts +1 -10
- package/compiler/lib.webworker.d.ts +1013 -1267
- package/compiler/lib.webworker.iterable.d.ts +28 -34
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +391 -112
- package/compiler/stencil.min.js +2 -2
- package/dependencies.json +2 -1
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +3 -3
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +16 -5
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +2 -2
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +34 -7
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +5 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/polyfills/css-shim.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/index.js +2 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +1 -1
- package/internal/package.json +1 -1
- package/internal/stencil-public-runtime.d.ts +6 -4
- package/internal/testing/index.js +15 -13
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +33 -3
- package/mock-doc/index.d.ts +4 -3
- package/mock-doc/index.js +33 -3
- package/mock-doc/package.json +1 -1
- package/package.json +7 -7
- package/readme.md +52 -85
- package/screenshot/package.json +1 -1
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/index.js +22 -18
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +430 -402
- package/testing/jest/jest-config.d.ts +11 -0
- package/testing/jest/jest-environment.d.ts +1 -0
- package/testing/jest/jest-preprocessor.d.ts +56 -8
- package/testing/jest/jest-runner.d.ts +4 -0
- package/testing/jest-preset.js +5 -0
- package/testing/package.json +1 -1
|
@@ -19,7 +19,7 @@ and limitations under the License.
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
/////////////////////////////
|
|
22
|
-
///
|
|
22
|
+
/// Window Iterable APIs
|
|
23
23
|
/////////////////////////////
|
|
24
24
|
|
|
25
25
|
interface AudioParam {
|
|
@@ -50,10 +50,6 @@ interface CanvasPathDrawingStyles {
|
|
|
50
50
|
setLineDash(segments: Iterable<number>): void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
interface ClientRectList {
|
|
54
|
-
[Symbol.iterator](): IterableIterator<ClientRect>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
53
|
interface DOMRectList {
|
|
58
54
|
[Symbol.iterator](): IterableIterator<DOMRect>;
|
|
59
55
|
}
|
|
@@ -77,19 +73,16 @@ interface FileList {
|
|
|
77
73
|
[Symbol.iterator](): IterableIterator<File>;
|
|
78
74
|
}
|
|
79
75
|
|
|
76
|
+
interface FontFaceSet extends Set<FontFace> {
|
|
77
|
+
}
|
|
78
|
+
|
|
80
79
|
interface FormData {
|
|
81
80
|
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>;
|
|
82
|
-
/**
|
|
83
|
-
* Returns an array of key, value pairs for every entry in the list.
|
|
84
|
-
*/
|
|
81
|
+
/** Returns an array of key, value pairs for every entry in the list. */
|
|
85
82
|
entries(): IterableIterator<[string, FormDataEntryValue]>;
|
|
86
|
-
/**
|
|
87
|
-
* Returns a list of keys in the list.
|
|
88
|
-
*/
|
|
83
|
+
/** Returns a list of keys in the list. */
|
|
89
84
|
keys(): IterableIterator<string>;
|
|
90
|
-
/**
|
|
91
|
-
* Returns a list of values in the list.
|
|
92
|
-
*/
|
|
85
|
+
/** Returns a list of values in the list. */
|
|
93
86
|
values(): IterableIterator<FormDataEntryValue>;
|
|
94
87
|
}
|
|
95
88
|
|
|
@@ -110,29 +103,21 @@ interface HTMLFormElement {
|
|
|
110
103
|
}
|
|
111
104
|
|
|
112
105
|
interface HTMLSelectElement {
|
|
113
|
-
[Symbol.iterator](): IterableIterator<
|
|
106
|
+
[Symbol.iterator](): IterableIterator<HTMLOptionElement>;
|
|
114
107
|
}
|
|
115
108
|
|
|
116
109
|
interface Headers {
|
|
117
110
|
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
118
|
-
/**
|
|
119
|
-
* Returns an iterator allowing to go through all key/value pairs contained in this object.
|
|
120
|
-
*/
|
|
111
|
+
/** Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
121
112
|
entries(): IterableIterator<[string, string]>;
|
|
122
|
-
/**
|
|
123
|
-
* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object.
|
|
124
|
-
*/
|
|
113
|
+
/** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
125
114
|
keys(): IterableIterator<string>;
|
|
126
|
-
/**
|
|
127
|
-
* Returns an iterator allowing to go through all values of the key/value pairs contained in this object.
|
|
128
|
-
*/
|
|
115
|
+
/** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
129
116
|
values(): IterableIterator<string>;
|
|
130
117
|
}
|
|
131
118
|
|
|
132
119
|
interface IDBDatabase {
|
|
133
|
-
/**
|
|
134
|
-
* Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names.
|
|
135
|
-
*/
|
|
120
|
+
/** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
|
|
136
121
|
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction;
|
|
137
122
|
}
|
|
138
123
|
|
|
@@ -156,6 +141,11 @@ interface MediaList {
|
|
|
156
141
|
[Symbol.iterator](): IterableIterator<string>;
|
|
157
142
|
}
|
|
158
143
|
|
|
144
|
+
interface MessageEvent<T = any> {
|
|
145
|
+
/** @deprecated */
|
|
146
|
+
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
|
|
147
|
+
}
|
|
148
|
+
|
|
159
149
|
interface MimeTypeArray {
|
|
160
150
|
[Symbol.iterator](): IterableIterator<MimeType>;
|
|
161
151
|
}
|
|
@@ -165,38 +155,28 @@ interface NamedNodeMap {
|
|
|
165
155
|
}
|
|
166
156
|
|
|
167
157
|
interface Navigator {
|
|
158
|
+
/** Available only in secure contexts. */
|
|
168
159
|
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
|
|
160
|
+
vibrate(pattern: Iterable<number>): boolean;
|
|
169
161
|
}
|
|
170
162
|
|
|
171
163
|
interface NodeList {
|
|
172
164
|
[Symbol.iterator](): IterableIterator<Node>;
|
|
173
|
-
/**
|
|
174
|
-
* Returns an array of key, value pairs for every entry in the list.
|
|
175
|
-
*/
|
|
165
|
+
/** Returns an array of key, value pairs for every entry in the list. */
|
|
176
166
|
entries(): IterableIterator<[number, Node]>;
|
|
177
|
-
/**
|
|
178
|
-
* Returns an list of keys in the list.
|
|
179
|
-
*/
|
|
167
|
+
/** Returns an list of keys in the list. */
|
|
180
168
|
keys(): IterableIterator<number>;
|
|
181
|
-
/**
|
|
182
|
-
* Returns an list of values in the list.
|
|
183
|
-
*/
|
|
169
|
+
/** Returns an list of values in the list. */
|
|
184
170
|
values(): IterableIterator<Node>;
|
|
185
171
|
}
|
|
186
172
|
|
|
187
173
|
interface NodeListOf<TNode extends Node> {
|
|
188
174
|
[Symbol.iterator](): IterableIterator<TNode>;
|
|
189
|
-
/**
|
|
190
|
-
* Returns an array of key, value pairs for every entry in the list.
|
|
191
|
-
*/
|
|
175
|
+
/** Returns an array of key, value pairs for every entry in the list. */
|
|
192
176
|
entries(): IterableIterator<[number, TNode]>;
|
|
193
|
-
/**
|
|
194
|
-
* Returns an list of keys in the list.
|
|
195
|
-
*/
|
|
177
|
+
/** Returns an list of keys in the list. */
|
|
196
178
|
keys(): IterableIterator<number>;
|
|
197
|
-
/**
|
|
198
|
-
* Returns an list of values in the list.
|
|
199
|
-
*/
|
|
179
|
+
/** Returns an list of values in the list. */
|
|
200
180
|
values(): IterableIterator<TNode>;
|
|
201
181
|
}
|
|
202
182
|
|
|
@@ -208,10 +188,6 @@ interface PluginArray {
|
|
|
208
188
|
[Symbol.iterator](): IterableIterator<Plugin>;
|
|
209
189
|
}
|
|
210
190
|
|
|
211
|
-
interface RTCRtpTransceiver {
|
|
212
|
-
setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
191
|
interface RTCStatsReport extends ReadonlyMap<string, any> {
|
|
216
192
|
}
|
|
217
193
|
|
|
@@ -231,12 +207,12 @@ interface SVGStringList {
|
|
|
231
207
|
[Symbol.iterator](): IterableIterator<string>;
|
|
232
208
|
}
|
|
233
209
|
|
|
234
|
-
interface
|
|
235
|
-
[Symbol.iterator](): IterableIterator<
|
|
210
|
+
interface SVGTransformList {
|
|
211
|
+
[Symbol.iterator](): IterableIterator<SVGTransform>;
|
|
236
212
|
}
|
|
237
213
|
|
|
238
|
-
interface
|
|
239
|
-
[Symbol.iterator](): IterableIterator<
|
|
214
|
+
interface SourceBufferList {
|
|
215
|
+
[Symbol.iterator](): IterableIterator<SourceBuffer>;
|
|
240
216
|
}
|
|
241
217
|
|
|
242
218
|
interface SpeechRecognitionResult {
|
|
@@ -251,6 +227,16 @@ interface StyleSheetList {
|
|
|
251
227
|
[Symbol.iterator](): IterableIterator<CSSStyleSheet>;
|
|
252
228
|
}
|
|
253
229
|
|
|
230
|
+
interface SubtleCrypto {
|
|
231
|
+
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
232
|
+
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
|
|
233
|
+
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
234
|
+
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>;
|
|
235
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
236
|
+
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
237
|
+
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
238
|
+
}
|
|
239
|
+
|
|
254
240
|
interface TextTrackCueList {
|
|
255
241
|
[Symbol.iterator](): IterableIterator<TextTrackCue>;
|
|
256
242
|
}
|
|
@@ -265,24 +251,14 @@ interface TouchList {
|
|
|
265
251
|
|
|
266
252
|
interface URLSearchParams {
|
|
267
253
|
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
268
|
-
/**
|
|
269
|
-
* Returns an array of key, value pairs for every entry in the search params.
|
|
270
|
-
*/
|
|
254
|
+
/** Returns an array of key, value pairs for every entry in the search params. */
|
|
271
255
|
entries(): IterableIterator<[string, string]>;
|
|
272
|
-
/**
|
|
273
|
-
* Returns a list of keys in the search params.
|
|
274
|
-
*/
|
|
256
|
+
/** Returns a list of keys in the search params. */
|
|
275
257
|
keys(): IterableIterator<string>;
|
|
276
|
-
/**
|
|
277
|
-
* Returns a list of values in the search params.
|
|
278
|
-
*/
|
|
258
|
+
/** Returns a list of values in the search params. */
|
|
279
259
|
values(): IterableIterator<string>;
|
|
280
260
|
}
|
|
281
261
|
|
|
282
|
-
interface VRDisplay {
|
|
283
|
-
requestPresent(layers: Iterable<VRLayer>): Promise<void>;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
262
|
interface WEBGL_draw_buffers {
|
|
287
263
|
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
|
|
288
264
|
}
|
|
@@ -43,7 +43,7 @@ interface Array<T> {
|
|
|
43
43
|
findIndex(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): number;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
47
47
|
* @param value value to fill array section with
|
|
48
48
|
* @param start index to start filling the array at. If start is negative, it is treated as
|
|
49
49
|
* length+start where length is the length of the array.
|
|
@@ -455,47 +455,87 @@ interface String {
|
|
|
455
455
|
|
|
456
456
|
/**
|
|
457
457
|
* Returns an `<a>` HTML anchor element and sets the name attribute to the text value
|
|
458
|
+
* @deprecated A legacy feature for browser compatibility
|
|
458
459
|
* @param name
|
|
459
460
|
*/
|
|
460
461
|
anchor(name: string): string;
|
|
461
462
|
|
|
462
|
-
/**
|
|
463
|
+
/**
|
|
464
|
+
* Returns a `<big>` HTML element
|
|
465
|
+
* @deprecated A legacy feature for browser compatibility
|
|
466
|
+
*/
|
|
463
467
|
big(): string;
|
|
464
468
|
|
|
465
|
-
/**
|
|
469
|
+
/**
|
|
470
|
+
* Returns a `<blink>` HTML element
|
|
471
|
+
* @deprecated A legacy feature for browser compatibility
|
|
472
|
+
*/
|
|
466
473
|
blink(): string;
|
|
467
474
|
|
|
468
|
-
/**
|
|
475
|
+
/**
|
|
476
|
+
* Returns a `<b>` HTML element
|
|
477
|
+
* @deprecated A legacy feature for browser compatibility
|
|
478
|
+
*/
|
|
469
479
|
bold(): string;
|
|
470
480
|
|
|
471
|
-
/**
|
|
481
|
+
/**
|
|
482
|
+
* Returns a `<tt>` HTML element
|
|
483
|
+
* @deprecated A legacy feature for browser compatibility
|
|
484
|
+
*/
|
|
472
485
|
fixed(): string;
|
|
473
486
|
|
|
474
|
-
/**
|
|
487
|
+
/**
|
|
488
|
+
* Returns a `<font>` HTML element and sets the color attribute value
|
|
489
|
+
* @deprecated A legacy feature for browser compatibility
|
|
490
|
+
*/
|
|
475
491
|
fontcolor(color: string): string;
|
|
476
492
|
|
|
477
|
-
/**
|
|
493
|
+
/**
|
|
494
|
+
* Returns a `<font>` HTML element and sets the size attribute value
|
|
495
|
+
* @deprecated A legacy feature for browser compatibility
|
|
496
|
+
*/
|
|
478
497
|
fontsize(size: number): string;
|
|
479
498
|
|
|
480
|
-
/**
|
|
499
|
+
/**
|
|
500
|
+
* Returns a `<font>` HTML element and sets the size attribute value
|
|
501
|
+
* @deprecated A legacy feature for browser compatibility
|
|
502
|
+
*/
|
|
481
503
|
fontsize(size: string): string;
|
|
482
504
|
|
|
483
|
-
/**
|
|
505
|
+
/**
|
|
506
|
+
* Returns an `<i>` HTML element
|
|
507
|
+
* @deprecated A legacy feature for browser compatibility
|
|
508
|
+
*/
|
|
484
509
|
italics(): string;
|
|
485
510
|
|
|
486
|
-
/**
|
|
511
|
+
/**
|
|
512
|
+
* Returns an `<a>` HTML element and sets the href attribute value
|
|
513
|
+
* @deprecated A legacy feature for browser compatibility
|
|
514
|
+
*/
|
|
487
515
|
link(url: string): string;
|
|
488
516
|
|
|
489
|
-
/**
|
|
517
|
+
/**
|
|
518
|
+
* Returns a `<small>` HTML element
|
|
519
|
+
* @deprecated A legacy feature for browser compatibility
|
|
520
|
+
*/
|
|
490
521
|
small(): string;
|
|
491
522
|
|
|
492
|
-
/**
|
|
523
|
+
/**
|
|
524
|
+
* Returns a `<strike>` HTML element
|
|
525
|
+
* @deprecated A legacy feature for browser compatibility
|
|
526
|
+
*/
|
|
493
527
|
strike(): string;
|
|
494
528
|
|
|
495
|
-
/**
|
|
529
|
+
/**
|
|
530
|
+
* Returns a `<sub>` HTML element
|
|
531
|
+
* @deprecated A legacy feature for browser compatibility
|
|
532
|
+
*/
|
|
496
533
|
sub(): string;
|
|
497
534
|
|
|
498
|
-
/**
|
|
535
|
+
/**
|
|
536
|
+
* Returns a `<sup>` HTML element
|
|
537
|
+
* @deprecated A legacy feature for browser compatibility
|
|
538
|
+
*/
|
|
499
539
|
sup(): string;
|
|
500
540
|
}
|
|
501
541
|
|
|
@@ -507,11 +547,13 @@ interface StringConstructor {
|
|
|
507
547
|
fromCodePoint(...codePoints: number[]): string;
|
|
508
548
|
|
|
509
549
|
/**
|
|
510
|
-
* String.raw is
|
|
511
|
-
*
|
|
512
|
-
* parameter will contain the substitution values.
|
|
550
|
+
* String.raw is usually used as a tag function of a Tagged Template String. When called as
|
|
551
|
+
* such, the first argument will be a well formed template call site object and the rest
|
|
552
|
+
* parameter will contain the substitution values. It can also be called directly, for example,
|
|
553
|
+
* to interleave strings and values from your own tag function, and in this case the only thing
|
|
554
|
+
* it needs from the first argument is the raw property.
|
|
513
555
|
* @param template A well-formed template string call site representation.
|
|
514
556
|
* @param substitutions A set of substitution values.
|
|
515
557
|
*/
|
|
516
|
-
raw(template:
|
|
558
|
+
raw(template: { raw: readonly string[] | ArrayLike<string>}, ...substitutions: any[]): string;
|
|
517
559
|
}
|
|
@@ -163,7 +163,7 @@ interface MapConstructor {
|
|
|
163
163
|
interface WeakMap<K extends object, V> { }
|
|
164
164
|
|
|
165
165
|
interface WeakMapConstructor {
|
|
166
|
-
new <K extends object, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
|
|
166
|
+
new <K extends object, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
interface Set<T> {
|
|
@@ -223,7 +223,7 @@ interface PromiseConstructor {
|
|
|
223
223
|
* @param values An iterable of Promises.
|
|
224
224
|
* @returns A new Promise.
|
|
225
225
|
*/
|
|
226
|
-
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
|
|
226
|
+
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
|
|
227
227
|
|
|
228
228
|
/**
|
|
229
229
|
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
|
@@ -231,15 +231,7 @@ interface PromiseConstructor {
|
|
|
231
231
|
* @param values An iterable of Promises.
|
|
232
232
|
* @returns A new Promise.
|
|
233
233
|
*/
|
|
234
|
-
race<T>(values: Iterable<T
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
|
|
238
|
-
* or rejected.
|
|
239
|
-
* @param values An iterable of Promises.
|
|
240
|
-
* @returns A new Promise.
|
|
241
|
-
*/
|
|
242
|
-
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
|
|
234
|
+
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
|
|
243
235
|
}
|
|
244
236
|
|
|
245
237
|
interface String {
|
|
@@ -38,79 +38,7 @@ interface PromiseConstructor {
|
|
|
38
38
|
* @param values An array of Promises.
|
|
39
39
|
* @returns A new Promise.
|
|
40
40
|
*/
|
|
41
|
-
all<
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
45
|
-
* resolve, or rejected when any Promise is rejected.
|
|
46
|
-
* @param values An array of Promises.
|
|
47
|
-
* @returns A new Promise.
|
|
48
|
-
*/
|
|
49
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
53
|
-
* resolve, or rejected when any Promise is rejected.
|
|
54
|
-
* @param values An array of Promises.
|
|
55
|
-
* @returns A new Promise.
|
|
56
|
-
*/
|
|
57
|
-
all<T1, T2, T3, T4, T5, T6, T7, T8>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
61
|
-
* resolve, or rejected when any Promise is rejected.
|
|
62
|
-
* @param values An array of Promises.
|
|
63
|
-
* @returns A new Promise.
|
|
64
|
-
*/
|
|
65
|
-
all<T1, T2, T3, T4, T5, T6, T7>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
69
|
-
* resolve, or rejected when any Promise is rejected.
|
|
70
|
-
* @param values An array of Promises.
|
|
71
|
-
* @returns A new Promise.
|
|
72
|
-
*/
|
|
73
|
-
all<T1, T2, T3, T4, T5, T6>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
77
|
-
* resolve, or rejected when any Promise is rejected.
|
|
78
|
-
* @param values An array of Promises.
|
|
79
|
-
* @returns A new Promise.
|
|
80
|
-
*/
|
|
81
|
-
all<T1, T2, T3, T4, T5>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
85
|
-
* resolve, or rejected when any Promise is rejected.
|
|
86
|
-
* @param values An array of Promises.
|
|
87
|
-
* @returns A new Promise.
|
|
88
|
-
*/
|
|
89
|
-
all<T1, T2, T3, T4>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike<T4>]): Promise<[T1, T2, T3, T4]>;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
93
|
-
* resolve, or rejected when any Promise is rejected.
|
|
94
|
-
* @param values An array of Promises.
|
|
95
|
-
* @returns A new Promise.
|
|
96
|
-
*/
|
|
97
|
-
all<T1, T2, T3>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
101
|
-
* resolve, or rejected when any Promise is rejected.
|
|
102
|
-
* @param values An array of Promises.
|
|
103
|
-
* @returns A new Promise.
|
|
104
|
-
*/
|
|
105
|
-
all<T1, T2>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Creates a Promise that is resolved with an array of results when all of the provided Promises
|
|
109
|
-
* resolve, or rejected when any Promise is rejected.
|
|
110
|
-
* @param values An array of Promises.
|
|
111
|
-
* @returns A new Promise.
|
|
112
|
-
*/
|
|
113
|
-
all<T>(values: readonly (T | PromiseLike<T>)[]): Promise<T[]>;
|
|
41
|
+
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>;
|
|
114
42
|
|
|
115
43
|
// see: lib.es2015.iterable.d.ts
|
|
116
44
|
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<T[]>;
|
|
@@ -121,7 +49,7 @@ interface PromiseConstructor {
|
|
|
121
49
|
* @param values An array of Promises.
|
|
122
50
|
* @returns A new Promise.
|
|
123
51
|
*/
|
|
124
|
-
race<T>(values:
|
|
52
|
+
race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
|
|
125
53
|
|
|
126
54
|
// see: lib.es2015.iterable.d.ts
|
|
127
55
|
// race<T>(values: Iterable<T>): Promise<T extends PromiseLike<infer U> ? U : T>;
|
|
@@ -239,9 +239,9 @@ interface String {
|
|
|
239
239
|
match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
|
-
* Replaces
|
|
243
|
-
* @param searchValue A
|
|
244
|
-
* @param replaceValue A string containing the text to replace for
|
|
242
|
+
* Replaces first match with string or all matches with RegExp.
|
|
243
|
+
* @param searchValue A string or RegExp search value.
|
|
244
|
+
* @param replaceValue A string containing the text to replace for match.
|
|
245
245
|
*/
|
|
246
246
|
replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
|
|
247
247
|
|
|
@@ -25,13 +25,13 @@ declare namespace Intl {
|
|
|
25
25
|
type PluralRuleType = "cardinal" | "ordinal";
|
|
26
26
|
|
|
27
27
|
interface PluralRulesOptions {
|
|
28
|
-
localeMatcher?: "lookup" | "best fit";
|
|
29
|
-
type?: PluralRuleType;
|
|
30
|
-
minimumIntegerDigits?: number;
|
|
31
|
-
minimumFractionDigits?: number;
|
|
32
|
-
maximumFractionDigits?: number;
|
|
33
|
-
minimumSignificantDigits?: number;
|
|
34
|
-
maximumSignificantDigits?: number;
|
|
28
|
+
localeMatcher?: "lookup" | "best fit" | undefined;
|
|
29
|
+
type?: PluralRuleType | undefined;
|
|
30
|
+
minimumIntegerDigits?: number | undefined;
|
|
31
|
+
minimumFractionDigits?: number | undefined;
|
|
32
|
+
maximumFractionDigits?: number | undefined;
|
|
33
|
+
minimumSignificantDigits?: number | undefined;
|
|
34
|
+
maximumSignificantDigits?: number | undefined;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
interface ResolvedPluralRulesOptions {
|
|
@@ -53,9 +53,21 @@ declare namespace Intl {
|
|
|
53
53
|
const PluralRules: {
|
|
54
54
|
new (locales?: string | string[], options?: PluralRulesOptions): PluralRules;
|
|
55
55
|
(locales?: string | string[], options?: PluralRulesOptions): PluralRules;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
options?: PluralRulesOptions,
|
|
59
|
-
): string[];
|
|
56
|
+
|
|
57
|
+
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[];
|
|
60
58
|
};
|
|
59
|
+
|
|
60
|
+
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
|
|
61
|
+
type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name";
|
|
62
|
+
type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown";
|
|
63
|
+
type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType;
|
|
64
|
+
|
|
65
|
+
interface NumberFormatPart {
|
|
66
|
+
type: NumberFormatPartTypes;
|
|
67
|
+
value: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
interface NumberFormat {
|
|
71
|
+
formatToParts(number?: number | bigint): NumberFormatPart[];
|
|
72
|
+
}
|
|
61
73
|
}
|
|
@@ -25,9 +25,15 @@ interface String {
|
|
|
25
25
|
/** Removes the leading white space and line terminator characters from a string. */
|
|
26
26
|
trimStart(): string;
|
|
27
27
|
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Removes the leading white space and line terminator characters from a string.
|
|
30
|
+
* @deprecated A legacy feature for browser compatibility. Use `trimStart` instead
|
|
31
|
+
*/
|
|
29
32
|
trimLeft(): string;
|
|
30
33
|
|
|
31
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Removes the trailing white space and line terminator characters from a string.
|
|
36
|
+
* @deprecated A legacy feature for browser compatibility. Use `trimEnd` instead
|
|
37
|
+
*/
|
|
32
38
|
trimRight(): string;
|
|
33
39
|
}
|
|
@@ -184,7 +184,7 @@ interface BigInt64Array {
|
|
|
184
184
|
every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean;
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
|
-
*
|
|
187
|
+
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
188
188
|
* @param value value to fill array section with
|
|
189
189
|
* @param start index to start filling the array at. If start is negative, it is treated as
|
|
190
190
|
* length+start where length is the length of the array.
|
|
@@ -456,7 +456,7 @@ interface BigUint64Array {
|
|
|
456
456
|
every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean;
|
|
457
457
|
|
|
458
458
|
/**
|
|
459
|
-
*
|
|
459
|
+
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array
|
|
460
460
|
* @param value value to fill array section with
|
|
461
461
|
* @param start index to start filling the array at. If start is negative, it is treated as
|
|
462
462
|
* length+start where length is the length of the array.
|