typescript 5.5.0-dev.20240418 → 5.5.0-dev.20240420

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.
@@ -0,0 +1,29 @@
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 String {
20
+ /**
21
+ * Returns true if all leading surrogates and trailing surrogates appear paired and in order.
22
+ */
23
+ isWellFormed(): boolean;
24
+
25
+ /**
26
+ * Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD).
27
+ */
28
+ toWellFormed(): string;
29
+ }
@@ -26,3 +26,8 @@ interface FileSystemDirectoryHandle {
26
26
  keys(): AsyncIterableIterator<string>;
27
27
  values(): AsyncIterableIterator<FileSystemHandle>;
28
28
  }
29
+
30
+ interface ReadableStream<R = any> {
31
+ [Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
32
+ values(options?: ReadableStreamIteratorOptions): AsyncIterableIterator<R>;
33
+ }
@@ -550,6 +550,17 @@ interface ReadableStreamGetReaderOptions {
550
550
  mode?: ReadableStreamReaderMode;
551
551
  }
552
552
 
553
+ interface ReadableStreamIteratorOptions {
554
+ /**
555
+ * Asynchronously iterates over the chunks in the stream's internal queue.
556
+ *
557
+ * Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader. The lock will be released if the async iterator's return() method is called, e.g. by breaking out of the loop.
558
+ *
559
+ * By default, calling the async iterator's return() method will also cancel the stream. To prevent this, use the stream's values() method, passing true for the preventCancel option.
560
+ */
561
+ preventCancel?: boolean;
562
+ }
563
+
553
564
  interface ReadableStreamReadDoneResult<T> {
554
565
  done: true;
555
566
  value?: T;
@@ -647,16 +658,16 @@ interface RsaPssParams extends Algorithm {
647
658
  interface SecurityPolicyViolationEventInit extends EventInit {
648
659
  blockedURI?: string;
649
660
  columnNumber?: number;
650
- disposition: SecurityPolicyViolationEventDisposition;
651
- documentURI: string;
652
- effectiveDirective: string;
661
+ disposition?: SecurityPolicyViolationEventDisposition;
662
+ documentURI?: string;
663
+ effectiveDirective?: string;
653
664
  lineNumber?: number;
654
- originalPolicy: string;
665
+ originalPolicy?: string;
655
666
  referrer?: string;
656
667
  sample?: string;
657
668
  sourceFile?: string;
658
- statusCode: number;
659
- violatedDirective: string;
669
+ statusCode?: number;
670
+ violatedDirective?: string;
660
671
  }
661
672
 
662
673
  interface StorageEstimate {
@@ -971,6 +982,8 @@ declare var AbortSignal: {
971
982
  new(): AbortSignal;
972
983
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
973
984
  abort(reason?: any): AbortSignal;
985
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
986
+ any(signals: AbortSignal[]): AbortSignal;
974
987
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
975
988
  timeout(milliseconds: number): AbortSignal;
976
989
  };
@@ -5221,6 +5234,7 @@ interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap {
5221
5234
 
5222
5235
  /**
5223
5236
  * This ServiceWorker API interface represents the global execution context of a service worker.
5237
+ * Available only in secure contexts.
5224
5238
  *
5225
5239
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
5226
5240
  */
@@ -20,6 +20,11 @@ and limitations under the License.
20
20
  /// Worker Iterable APIs
21
21
  /////////////////////////////
22
22
 
23
+ interface AbortSignal {
24
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
25
+ any(signals: Iterable<AbortSignal>): AbortSignal;
26
+ }
27
+
23
28
  interface CSSNumericArray {
24
29
  [Symbol.iterator](): IterableIterator<CSSNumericValue>;
25
30
  entries(): IterableIterator<[number, CSSNumericValue]>;