@types/serviceworker 0.0.191 → 0.0.193

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/README.md CHANGED
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
28
28
 
29
29
  ## Deploy Metadata
30
30
 
31
- You can read what changed in version 0.0.191 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.191.
31
+ You can read what changed in version 0.0.193 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.193.
package/index.d.ts CHANGED
@@ -1208,6 +1208,23 @@ interface WebTransportCloseInfo {
1208
1208
  reason?: string;
1209
1209
  }
1210
1210
 
1211
+ interface WebTransportConnectionStats {
1212
+ bytesReceived?: number;
1213
+ datagrams: WebTransportDatagramStats;
1214
+ minRtt?: DOMHighResTimeStamp;
1215
+ packetsLost?: number;
1216
+ packetsReceived?: number;
1217
+ packetsSent?: number;
1218
+ rttVariation?: DOMHighResTimeStamp;
1219
+ smoothedRtt?: DOMHighResTimeStamp;
1220
+ }
1221
+
1222
+ interface WebTransportDatagramStats {
1223
+ droppedIncoming?: number;
1224
+ expiredOutgoing?: number;
1225
+ lostOutgoing?: number;
1226
+ }
1227
+
1211
1228
  interface WebTransportErrorOptions {
1212
1229
  source?: WebTransportErrorSource;
1213
1230
  streamErrorCode?: number | null;
@@ -1226,6 +1243,11 @@ interface WebTransportOptions {
1226
1243
  serverCertificateHashes?: WebTransportHash[];
1227
1244
  }
1228
1245
 
1246
+ interface WebTransportReceiveStreamStats {
1247
+ bytesRead?: number;
1248
+ bytesReceived?: number;
1249
+ }
1250
+
1229
1251
  interface WebTransportSendOptions {
1230
1252
  sendOrder?: number;
1231
1253
  }
@@ -1233,6 +1255,12 @@ interface WebTransportSendOptions {
1233
1255
  interface WebTransportSendStreamOptions extends WebTransportSendOptions {
1234
1256
  }
1235
1257
 
1258
+ interface WebTransportSendStreamStats {
1259
+ bytesAcknowledged?: number;
1260
+ bytesSent?: number;
1261
+ bytesWritten?: number;
1262
+ }
1263
+
1236
1264
  interface WriteParams {
1237
1265
  data?: BufferSource | Blob | string | null;
1238
1266
  position?: number | null;
@@ -7529,6 +7557,12 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7529
7557
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
7530
7558
  */
7531
7559
  readonly decodedBodySize: number;
7560
+ /**
7561
+ * The **`deliveryType`** read-only property is a string indicating how the resource was delivered — for example from the cache or from a navigational prefetch.
7562
+ *
7563
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/deliveryType)
7564
+ */
7565
+ readonly deliveryType: string;
7532
7566
  /**
7533
7567
  * The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
7534
7568
  *
@@ -7553,6 +7587,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7553
7587
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
7554
7588
  */
7555
7589
  readonly fetchStart: DOMHighResTimeStamp;
7590
+ /**
7591
+ * The **`finalResponseHeadersStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the final document response (for example, 200 OK) from the server.
7592
+ *
7593
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart)
7594
+ */
7595
+ readonly finalResponseHeadersStart: DOMHighResTimeStamp;
7596
+ /**
7597
+ * The **`firstInterimResponseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the interim 1xx response (for example, 100 Continue or 103 Early Hints) from the server.
7598
+ *
7599
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/firstInterimResponseStart)
7600
+ */
7601
+ readonly firstInterimResponseStart: DOMHighResTimeStamp;
7556
7602
  /**
7557
7603
  * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
7558
7604
  *
@@ -8156,7 +8202,7 @@ interface ReadableStreamDefaultController<R = any> {
8156
8202
  *
8157
8203
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
8158
8204
  */
8159
- enqueue(chunk?: R): void;
8205
+ enqueue(chunk: R): void;
8160
8206
  /**
8161
8207
  * The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
8162
8208
  *
@@ -12147,6 +12193,12 @@ interface WebTransport {
12147
12193
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed)
12148
12194
  */
12149
12195
  readonly closed: Promise<WebTransportCloseInfo>;
12196
+ /**
12197
+ * The **`congestionControl`** read-only property of the WebTransport interface indicates the application's preference for either high throughput or low-latency when sending data.
12198
+ *
12199
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/congestionControl)
12200
+ */
12201
+ readonly congestionControl: WebTransportCongestionControl;
12150
12202
  /**
12151
12203
  * The **`datagrams`** read-only property of the WebTransport interface returns a WebTransportDatagramDuplexStream instance that can be used to send and receive datagrams — unreliable data transmission.
12152
12204
  *
@@ -12165,12 +12217,19 @@ interface WebTransport {
12165
12217
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams)
12166
12218
  */
12167
12219
  readonly incomingUnidirectionalStreams: ReadableStream;
12220
+ readonly protocol: string;
12168
12221
  /**
12169
12222
  * The **`ready`** read-only property of the WebTransport interface returns a promise that resolves when the transport is ready to use.
12170
12223
  *
12171
12224
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready)
12172
12225
  */
12173
12226
  readonly ready: Promise<void>;
12227
+ /**
12228
+ * The **`reliability`** read-only property of the WebTransport interface indicates whether the connection supports reliable transports only, or whether it also supports unreliable transports (such as UDP).
12229
+ *
12230
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/reliability)
12231
+ */
12232
+ readonly reliability: WebTransportReliabilityMode;
12174
12233
  /**
12175
12234
  * The **`close()`** method of the WebTransport interface closes an ongoing WebTransport session.
12176
12235
  *
@@ -12189,6 +12248,12 @@ interface WebTransport {
12189
12248
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream)
12190
12249
  */
12191
12250
  createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
12251
+ /**
12252
+ * The **`getStats()`** method of the WebTransport interface asynchronously returns an object containing HTTP/3 connection statistics.
12253
+ *
12254
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/getStats)
12255
+ */
12256
+ getStats(): Promise<WebTransportConnectionStats>;
12192
12257
  }
12193
12258
 
12194
12259
  declare var WebTransport: {
@@ -12304,6 +12369,52 @@ declare var WebTransportError: {
12304
12369
  new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
12305
12370
  };
12306
12371
 
12372
+ /**
12373
+ * The **`WebTransportReceiveStream`** interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream.
12374
+ * Available only in secure contexts.
12375
+ *
12376
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream)
12377
+ */
12378
+ interface WebTransportReceiveStream extends ReadableStream {
12379
+ /**
12380
+ * The **`getStats()`** method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.
12381
+ *
12382
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream/getStats)
12383
+ */
12384
+ getStats(): Promise<WebTransportReceiveStreamStats>;
12385
+ }
12386
+
12387
+ declare var WebTransportReceiveStream: {
12388
+ prototype: WebTransportReceiveStream;
12389
+ new(): WebTransportReceiveStream;
12390
+ };
12391
+
12392
+ /**
12393
+ * The **`WebTransportSendStream`** interface of the WebTransport API is a specialized WritableStream that is used to send outbound data in both unidirectional or bidirectional WebTransport streams.
12394
+ * Available only in secure contexts.
12395
+ *
12396
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream)
12397
+ */
12398
+ interface WebTransportSendStream extends WritableStream {
12399
+ /**
12400
+ * The **`sendOrder`** property of the WebTransportSendStream interface indicates the send priority of this stream relative to other streams for which the value has been set.
12401
+ *
12402
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/sendOrder)
12403
+ */
12404
+ sendOrder: number;
12405
+ /**
12406
+ * The **`getStats()`** method of the WebTransportSendStream interface asynchronously returns an object containing statistics for the current stream.
12407
+ *
12408
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/getStats)
12409
+ */
12410
+ getStats(): Promise<WebTransportSendStreamStats>;
12411
+ }
12412
+
12413
+ declare var WebTransportSendStream: {
12414
+ prototype: WebTransportSendStream;
12415
+ new(): WebTransportSendStream;
12416
+ };
12417
+
12307
12418
  /**
12308
12419
  * The **`WindowClient`** interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browsing context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.
12309
12420
  *
@@ -13474,6 +13585,7 @@ type TransferFunction = "hlg" | "pq" | "srgb";
13474
13585
  type WebGLPowerPreference = "default" | "high-performance" | "low-power";
13475
13586
  type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
13476
13587
  type WebTransportErrorSource = "session" | "stream";
13588
+ type WebTransportReliabilityMode = "pending" | "reliable-only" | "supports-unreliable";
13477
13589
  type WorkerType = "classic" | "module";
13478
13590
  type WriteCommandType = "seek" | "truncate" | "write";
13479
13591
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/serviceworker",
3
- "version": "0.0.191",
3
+ "version": "0.0.193",
4
4
  "description": "Types for the global scope of Service Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -1205,6 +1205,23 @@ interface WebTransportCloseInfo {
1205
1205
  reason?: string;
1206
1206
  }
1207
1207
 
1208
+ interface WebTransportConnectionStats {
1209
+ bytesReceived?: number;
1210
+ datagrams: WebTransportDatagramStats;
1211
+ minRtt?: DOMHighResTimeStamp;
1212
+ packetsLost?: number;
1213
+ packetsReceived?: number;
1214
+ packetsSent?: number;
1215
+ rttVariation?: DOMHighResTimeStamp;
1216
+ smoothedRtt?: DOMHighResTimeStamp;
1217
+ }
1218
+
1219
+ interface WebTransportDatagramStats {
1220
+ droppedIncoming?: number;
1221
+ expiredOutgoing?: number;
1222
+ lostOutgoing?: number;
1223
+ }
1224
+
1208
1225
  interface WebTransportErrorOptions {
1209
1226
  source?: WebTransportErrorSource;
1210
1227
  streamErrorCode?: number | null;
@@ -1223,6 +1240,11 @@ interface WebTransportOptions {
1223
1240
  serverCertificateHashes?: WebTransportHash[];
1224
1241
  }
1225
1242
 
1243
+ interface WebTransportReceiveStreamStats {
1244
+ bytesRead?: number;
1245
+ bytesReceived?: number;
1246
+ }
1247
+
1226
1248
  interface WebTransportSendOptions {
1227
1249
  sendOrder?: number;
1228
1250
  }
@@ -1230,6 +1252,12 @@ interface WebTransportSendOptions {
1230
1252
  interface WebTransportSendStreamOptions extends WebTransportSendOptions {
1231
1253
  }
1232
1254
 
1255
+ interface WebTransportSendStreamStats {
1256
+ bytesAcknowledged?: number;
1257
+ bytesSent?: number;
1258
+ bytesWritten?: number;
1259
+ }
1260
+
1233
1261
  interface WriteParams {
1234
1262
  data?: BufferSource | Blob | string | null;
1235
1263
  position?: number | null;
@@ -7526,6 +7554,12 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7526
7554
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
7527
7555
  */
7528
7556
  readonly decodedBodySize: number;
7557
+ /**
7558
+ * The **`deliveryType`** read-only property is a string indicating how the resource was delivered — for example from the cache or from a navigational prefetch.
7559
+ *
7560
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/deliveryType)
7561
+ */
7562
+ readonly deliveryType: string;
7529
7563
  /**
7530
7564
  * The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
7531
7565
  *
@@ -7550,6 +7584,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7550
7584
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
7551
7585
  */
7552
7586
  readonly fetchStart: DOMHighResTimeStamp;
7587
+ /**
7588
+ * The **`finalResponseHeadersStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the final document response (for example, 200 OK) from the server.
7589
+ *
7590
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart)
7591
+ */
7592
+ readonly finalResponseHeadersStart: DOMHighResTimeStamp;
7593
+ /**
7594
+ * The **`firstInterimResponseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the interim 1xx response (for example, 100 Continue or 103 Early Hints) from the server.
7595
+ *
7596
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/firstInterimResponseStart)
7597
+ */
7598
+ readonly firstInterimResponseStart: DOMHighResTimeStamp;
7553
7599
  /**
7554
7600
  * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
7555
7601
  *
@@ -8153,7 +8199,7 @@ interface ReadableStreamDefaultController<R = any> {
8153
8199
  *
8154
8200
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
8155
8201
  */
8156
- enqueue(chunk?: R): void;
8202
+ enqueue(chunk: R): void;
8157
8203
  /**
8158
8204
  * The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
8159
8205
  *
@@ -12144,6 +12190,12 @@ interface WebTransport {
12144
12190
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed)
12145
12191
  */
12146
12192
  readonly closed: Promise<WebTransportCloseInfo>;
12193
+ /**
12194
+ * The **`congestionControl`** read-only property of the WebTransport interface indicates the application's preference for either high throughput or low-latency when sending data.
12195
+ *
12196
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/congestionControl)
12197
+ */
12198
+ readonly congestionControl: WebTransportCongestionControl;
12147
12199
  /**
12148
12200
  * The **`datagrams`** read-only property of the WebTransport interface returns a WebTransportDatagramDuplexStream instance that can be used to send and receive datagrams — unreliable data transmission.
12149
12201
  *
@@ -12162,12 +12214,19 @@ interface WebTransport {
12162
12214
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams)
12163
12215
  */
12164
12216
  readonly incomingUnidirectionalStreams: ReadableStream;
12217
+ readonly protocol: string;
12165
12218
  /**
12166
12219
  * The **`ready`** read-only property of the WebTransport interface returns a promise that resolves when the transport is ready to use.
12167
12220
  *
12168
12221
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready)
12169
12222
  */
12170
12223
  readonly ready: Promise<void>;
12224
+ /**
12225
+ * The **`reliability`** read-only property of the WebTransport interface indicates whether the connection supports reliable transports only, or whether it also supports unreliable transports (such as UDP).
12226
+ *
12227
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/reliability)
12228
+ */
12229
+ readonly reliability: WebTransportReliabilityMode;
12171
12230
  /**
12172
12231
  * The **`close()`** method of the WebTransport interface closes an ongoing WebTransport session.
12173
12232
  *
@@ -12186,6 +12245,12 @@ interface WebTransport {
12186
12245
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream)
12187
12246
  */
12188
12247
  createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
12248
+ /**
12249
+ * The **`getStats()`** method of the WebTransport interface asynchronously returns an object containing HTTP/3 connection statistics.
12250
+ *
12251
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/getStats)
12252
+ */
12253
+ getStats(): Promise<WebTransportConnectionStats>;
12189
12254
  }
12190
12255
 
12191
12256
  declare var WebTransport: {
@@ -12301,6 +12366,52 @@ declare var WebTransportError: {
12301
12366
  new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
12302
12367
  };
12303
12368
 
12369
+ /**
12370
+ * The **`WebTransportReceiveStream`** interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream.
12371
+ * Available only in secure contexts.
12372
+ *
12373
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream)
12374
+ */
12375
+ interface WebTransportReceiveStream extends ReadableStream {
12376
+ /**
12377
+ * The **`getStats()`** method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.
12378
+ *
12379
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream/getStats)
12380
+ */
12381
+ getStats(): Promise<WebTransportReceiveStreamStats>;
12382
+ }
12383
+
12384
+ declare var WebTransportReceiveStream: {
12385
+ prototype: WebTransportReceiveStream;
12386
+ new(): WebTransportReceiveStream;
12387
+ };
12388
+
12389
+ /**
12390
+ * The **`WebTransportSendStream`** interface of the WebTransport API is a specialized WritableStream that is used to send outbound data in both unidirectional or bidirectional WebTransport streams.
12391
+ * Available only in secure contexts.
12392
+ *
12393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream)
12394
+ */
12395
+ interface WebTransportSendStream extends WritableStream {
12396
+ /**
12397
+ * The **`sendOrder`** property of the WebTransportSendStream interface indicates the send priority of this stream relative to other streams for which the value has been set.
12398
+ *
12399
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/sendOrder)
12400
+ */
12401
+ sendOrder: number;
12402
+ /**
12403
+ * The **`getStats()`** method of the WebTransportSendStream interface asynchronously returns an object containing statistics for the current stream.
12404
+ *
12405
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/getStats)
12406
+ */
12407
+ getStats(): Promise<WebTransportSendStreamStats>;
12408
+ }
12409
+
12410
+ declare var WebTransportSendStream: {
12411
+ prototype: WebTransportSendStream;
12412
+ new(): WebTransportSendStream;
12413
+ };
12414
+
12304
12415
  /**
12305
12416
  * The **`WindowClient`** interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browsing context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.
12306
12417
  *
@@ -13471,5 +13582,6 @@ type TransferFunction = "hlg" | "pq" | "srgb";
13471
13582
  type WebGLPowerPreference = "default" | "high-performance" | "low-power";
13472
13583
  type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
13473
13584
  type WebTransportErrorSource = "session" | "stream";
13585
+ type WebTransportReliabilityMode = "pending" | "reliable-only" | "supports-unreliable";
13474
13586
  type WorkerType = "classic" | "module";
13475
13587
  type WriteCommandType = "seek" | "truncate" | "write";
package/ts5.6/index.d.ts CHANGED
@@ -1205,6 +1205,23 @@ interface WebTransportCloseInfo {
1205
1205
  reason?: string;
1206
1206
  }
1207
1207
 
1208
+ interface WebTransportConnectionStats {
1209
+ bytesReceived?: number;
1210
+ datagrams: WebTransportDatagramStats;
1211
+ minRtt?: DOMHighResTimeStamp;
1212
+ packetsLost?: number;
1213
+ packetsReceived?: number;
1214
+ packetsSent?: number;
1215
+ rttVariation?: DOMHighResTimeStamp;
1216
+ smoothedRtt?: DOMHighResTimeStamp;
1217
+ }
1218
+
1219
+ interface WebTransportDatagramStats {
1220
+ droppedIncoming?: number;
1221
+ expiredOutgoing?: number;
1222
+ lostOutgoing?: number;
1223
+ }
1224
+
1208
1225
  interface WebTransportErrorOptions {
1209
1226
  source?: WebTransportErrorSource;
1210
1227
  streamErrorCode?: number | null;
@@ -1223,6 +1240,11 @@ interface WebTransportOptions {
1223
1240
  serverCertificateHashes?: WebTransportHash[];
1224
1241
  }
1225
1242
 
1243
+ interface WebTransportReceiveStreamStats {
1244
+ bytesRead?: number;
1245
+ bytesReceived?: number;
1246
+ }
1247
+
1226
1248
  interface WebTransportSendOptions {
1227
1249
  sendOrder?: number;
1228
1250
  }
@@ -1230,6 +1252,12 @@ interface WebTransportSendOptions {
1230
1252
  interface WebTransportSendStreamOptions extends WebTransportSendOptions {
1231
1253
  }
1232
1254
 
1255
+ interface WebTransportSendStreamStats {
1256
+ bytesAcknowledged?: number;
1257
+ bytesSent?: number;
1258
+ bytesWritten?: number;
1259
+ }
1260
+
1233
1261
  interface WriteParams {
1234
1262
  data?: BufferSource | Blob | string | null;
1235
1263
  position?: number | null;
@@ -7526,6 +7554,12 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7526
7554
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
7527
7555
  */
7528
7556
  readonly decodedBodySize: number;
7557
+ /**
7558
+ * The **`deliveryType`** read-only property is a string indicating how the resource was delivered — for example from the cache or from a navigational prefetch.
7559
+ *
7560
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/deliveryType)
7561
+ */
7562
+ readonly deliveryType: string;
7529
7563
  /**
7530
7564
  * The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
7531
7565
  *
@@ -7550,6 +7584,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7550
7584
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
7551
7585
  */
7552
7586
  readonly fetchStart: DOMHighResTimeStamp;
7587
+ /**
7588
+ * The **`finalResponseHeadersStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the final document response (for example, 200 OK) from the server.
7589
+ *
7590
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart)
7591
+ */
7592
+ readonly finalResponseHeadersStart: DOMHighResTimeStamp;
7593
+ /**
7594
+ * The **`firstInterimResponseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the interim 1xx response (for example, 100 Continue or 103 Early Hints) from the server.
7595
+ *
7596
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/firstInterimResponseStart)
7597
+ */
7598
+ readonly firstInterimResponseStart: DOMHighResTimeStamp;
7553
7599
  /**
7554
7600
  * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
7555
7601
  *
@@ -8153,7 +8199,7 @@ interface ReadableStreamDefaultController<R = any> {
8153
8199
  *
8154
8200
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
8155
8201
  */
8156
- enqueue(chunk?: R): void;
8202
+ enqueue(chunk: R): void;
8157
8203
  /**
8158
8204
  * The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
8159
8205
  *
@@ -12144,6 +12190,12 @@ interface WebTransport {
12144
12190
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed)
12145
12191
  */
12146
12192
  readonly closed: Promise<WebTransportCloseInfo>;
12193
+ /**
12194
+ * The **`congestionControl`** read-only property of the WebTransport interface indicates the application's preference for either high throughput or low-latency when sending data.
12195
+ *
12196
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/congestionControl)
12197
+ */
12198
+ readonly congestionControl: WebTransportCongestionControl;
12147
12199
  /**
12148
12200
  * The **`datagrams`** read-only property of the WebTransport interface returns a WebTransportDatagramDuplexStream instance that can be used to send and receive datagrams — unreliable data transmission.
12149
12201
  *
@@ -12162,12 +12214,19 @@ interface WebTransport {
12162
12214
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams)
12163
12215
  */
12164
12216
  readonly incomingUnidirectionalStreams: ReadableStream;
12217
+ readonly protocol: string;
12165
12218
  /**
12166
12219
  * The **`ready`** read-only property of the WebTransport interface returns a promise that resolves when the transport is ready to use.
12167
12220
  *
12168
12221
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready)
12169
12222
  */
12170
12223
  readonly ready: Promise<void>;
12224
+ /**
12225
+ * The **`reliability`** read-only property of the WebTransport interface indicates whether the connection supports reliable transports only, or whether it also supports unreliable transports (such as UDP).
12226
+ *
12227
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/reliability)
12228
+ */
12229
+ readonly reliability: WebTransportReliabilityMode;
12171
12230
  /**
12172
12231
  * The **`close()`** method of the WebTransport interface closes an ongoing WebTransport session.
12173
12232
  *
@@ -12186,6 +12245,12 @@ interface WebTransport {
12186
12245
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream)
12187
12246
  */
12188
12247
  createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
12248
+ /**
12249
+ * The **`getStats()`** method of the WebTransport interface asynchronously returns an object containing HTTP/3 connection statistics.
12250
+ *
12251
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/getStats)
12252
+ */
12253
+ getStats(): Promise<WebTransportConnectionStats>;
12189
12254
  }
12190
12255
 
12191
12256
  declare var WebTransport: {
@@ -12301,6 +12366,52 @@ declare var WebTransportError: {
12301
12366
  new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
12302
12367
  };
12303
12368
 
12369
+ /**
12370
+ * The **`WebTransportReceiveStream`** interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream.
12371
+ * Available only in secure contexts.
12372
+ *
12373
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream)
12374
+ */
12375
+ interface WebTransportReceiveStream extends ReadableStream {
12376
+ /**
12377
+ * The **`getStats()`** method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.
12378
+ *
12379
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream/getStats)
12380
+ */
12381
+ getStats(): Promise<WebTransportReceiveStreamStats>;
12382
+ }
12383
+
12384
+ declare var WebTransportReceiveStream: {
12385
+ prototype: WebTransportReceiveStream;
12386
+ new(): WebTransportReceiveStream;
12387
+ };
12388
+
12389
+ /**
12390
+ * The **`WebTransportSendStream`** interface of the WebTransport API is a specialized WritableStream that is used to send outbound data in both unidirectional or bidirectional WebTransport streams.
12391
+ * Available only in secure contexts.
12392
+ *
12393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream)
12394
+ */
12395
+ interface WebTransportSendStream extends WritableStream {
12396
+ /**
12397
+ * The **`sendOrder`** property of the WebTransportSendStream interface indicates the send priority of this stream relative to other streams for which the value has been set.
12398
+ *
12399
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/sendOrder)
12400
+ */
12401
+ sendOrder: number;
12402
+ /**
12403
+ * The **`getStats()`** method of the WebTransportSendStream interface asynchronously returns an object containing statistics for the current stream.
12404
+ *
12405
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/getStats)
12406
+ */
12407
+ getStats(): Promise<WebTransportSendStreamStats>;
12408
+ }
12409
+
12410
+ declare var WebTransportSendStream: {
12411
+ prototype: WebTransportSendStream;
12412
+ new(): WebTransportSendStream;
12413
+ };
12414
+
12304
12415
  /**
12305
12416
  * The **`WindowClient`** interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browsing context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.
12306
12417
  *
@@ -13471,5 +13582,6 @@ type TransferFunction = "hlg" | "pq" | "srgb";
13471
13582
  type WebGLPowerPreference = "default" | "high-performance" | "low-power";
13472
13583
  type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
13473
13584
  type WebTransportErrorSource = "session" | "stream";
13585
+ type WebTransportReliabilityMode = "pending" | "reliable-only" | "supports-unreliable";
13474
13586
  type WorkerType = "classic" | "module";
13475
13587
  type WriteCommandType = "seek" | "truncate" | "write";
package/ts5.9/index.d.ts CHANGED
@@ -1205,6 +1205,23 @@ interface WebTransportCloseInfo {
1205
1205
  reason?: string;
1206
1206
  }
1207
1207
 
1208
+ interface WebTransportConnectionStats {
1209
+ bytesReceived?: number;
1210
+ datagrams: WebTransportDatagramStats;
1211
+ minRtt?: DOMHighResTimeStamp;
1212
+ packetsLost?: number;
1213
+ packetsReceived?: number;
1214
+ packetsSent?: number;
1215
+ rttVariation?: DOMHighResTimeStamp;
1216
+ smoothedRtt?: DOMHighResTimeStamp;
1217
+ }
1218
+
1219
+ interface WebTransportDatagramStats {
1220
+ droppedIncoming?: number;
1221
+ expiredOutgoing?: number;
1222
+ lostOutgoing?: number;
1223
+ }
1224
+
1208
1225
  interface WebTransportErrorOptions {
1209
1226
  source?: WebTransportErrorSource;
1210
1227
  streamErrorCode?: number | null;
@@ -1223,6 +1240,11 @@ interface WebTransportOptions {
1223
1240
  serverCertificateHashes?: WebTransportHash[];
1224
1241
  }
1225
1242
 
1243
+ interface WebTransportReceiveStreamStats {
1244
+ bytesRead?: number;
1245
+ bytesReceived?: number;
1246
+ }
1247
+
1226
1248
  interface WebTransportSendOptions {
1227
1249
  sendOrder?: number;
1228
1250
  }
@@ -1230,6 +1252,12 @@ interface WebTransportSendOptions {
1230
1252
  interface WebTransportSendStreamOptions extends WebTransportSendOptions {
1231
1253
  }
1232
1254
 
1255
+ interface WebTransportSendStreamStats {
1256
+ bytesAcknowledged?: number;
1257
+ bytesSent?: number;
1258
+ bytesWritten?: number;
1259
+ }
1260
+
1233
1261
  interface WriteParams {
1234
1262
  data?: BufferSource | Blob | string | null;
1235
1263
  position?: number | null;
@@ -7526,6 +7554,12 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7526
7554
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
7527
7555
  */
7528
7556
  readonly decodedBodySize: number;
7557
+ /**
7558
+ * The **`deliveryType`** read-only property is a string indicating how the resource was delivered — for example from the cache or from a navigational prefetch.
7559
+ *
7560
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/deliveryType)
7561
+ */
7562
+ readonly deliveryType: string;
7529
7563
  /**
7530
7564
  * The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
7531
7565
  *
@@ -7550,6 +7584,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
7550
7584
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
7551
7585
  */
7552
7586
  readonly fetchStart: DOMHighResTimeStamp;
7587
+ /**
7588
+ * The **`finalResponseHeadersStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the final document response (for example, 200 OK) from the server.
7589
+ *
7590
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart)
7591
+ */
7592
+ readonly finalResponseHeadersStart: DOMHighResTimeStamp;
7593
+ /**
7594
+ * The **`firstInterimResponseStart`** read-only property returns a timestamp immediately after the browser receives the first byte of the interim 1xx response (for example, 100 Continue or 103 Early Hints) from the server.
7595
+ *
7596
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/firstInterimResponseStart)
7597
+ */
7598
+ readonly firstInterimResponseStart: DOMHighResTimeStamp;
7553
7599
  /**
7554
7600
  * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
7555
7601
  *
@@ -8153,7 +8199,7 @@ interface ReadableStreamDefaultController<R = any> {
8153
8199
  *
8154
8200
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
8155
8201
  */
8156
- enqueue(chunk?: R): void;
8202
+ enqueue(chunk: R): void;
8157
8203
  /**
8158
8204
  * The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
8159
8205
  *
@@ -12144,6 +12190,12 @@ interface WebTransport {
12144
12190
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed)
12145
12191
  */
12146
12192
  readonly closed: Promise<WebTransportCloseInfo>;
12193
+ /**
12194
+ * The **`congestionControl`** read-only property of the WebTransport interface indicates the application's preference for either high throughput or low-latency when sending data.
12195
+ *
12196
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/congestionControl)
12197
+ */
12198
+ readonly congestionControl: WebTransportCongestionControl;
12147
12199
  /**
12148
12200
  * The **`datagrams`** read-only property of the WebTransport interface returns a WebTransportDatagramDuplexStream instance that can be used to send and receive datagrams — unreliable data transmission.
12149
12201
  *
@@ -12162,12 +12214,19 @@ interface WebTransport {
12162
12214
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams)
12163
12215
  */
12164
12216
  readonly incomingUnidirectionalStreams: ReadableStream;
12217
+ readonly protocol: string;
12165
12218
  /**
12166
12219
  * The **`ready`** read-only property of the WebTransport interface returns a promise that resolves when the transport is ready to use.
12167
12220
  *
12168
12221
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready)
12169
12222
  */
12170
12223
  readonly ready: Promise<void>;
12224
+ /**
12225
+ * The **`reliability`** read-only property of the WebTransport interface indicates whether the connection supports reliable transports only, or whether it also supports unreliable transports (such as UDP).
12226
+ *
12227
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/reliability)
12228
+ */
12229
+ readonly reliability: WebTransportReliabilityMode;
12171
12230
  /**
12172
12231
  * The **`close()`** method of the WebTransport interface closes an ongoing WebTransport session.
12173
12232
  *
@@ -12186,6 +12245,12 @@ interface WebTransport {
12186
12245
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream)
12187
12246
  */
12188
12247
  createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
12248
+ /**
12249
+ * The **`getStats()`** method of the WebTransport interface asynchronously returns an object containing HTTP/3 connection statistics.
12250
+ *
12251
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/getStats)
12252
+ */
12253
+ getStats(): Promise<WebTransportConnectionStats>;
12189
12254
  }
12190
12255
 
12191
12256
  declare var WebTransport: {
@@ -12301,6 +12366,52 @@ declare var WebTransportError: {
12301
12366
  new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
12302
12367
  };
12303
12368
 
12369
+ /**
12370
+ * The **`WebTransportReceiveStream`** interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream.
12371
+ * Available only in secure contexts.
12372
+ *
12373
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream)
12374
+ */
12375
+ interface WebTransportReceiveStream extends ReadableStream {
12376
+ /**
12377
+ * The **`getStats()`** method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.
12378
+ *
12379
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream/getStats)
12380
+ */
12381
+ getStats(): Promise<WebTransportReceiveStreamStats>;
12382
+ }
12383
+
12384
+ declare var WebTransportReceiveStream: {
12385
+ prototype: WebTransportReceiveStream;
12386
+ new(): WebTransportReceiveStream;
12387
+ };
12388
+
12389
+ /**
12390
+ * The **`WebTransportSendStream`** interface of the WebTransport API is a specialized WritableStream that is used to send outbound data in both unidirectional or bidirectional WebTransport streams.
12391
+ * Available only in secure contexts.
12392
+ *
12393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream)
12394
+ */
12395
+ interface WebTransportSendStream extends WritableStream {
12396
+ /**
12397
+ * The **`sendOrder`** property of the WebTransportSendStream interface indicates the send priority of this stream relative to other streams for which the value has been set.
12398
+ *
12399
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/sendOrder)
12400
+ */
12401
+ sendOrder: number;
12402
+ /**
12403
+ * The **`getStats()`** method of the WebTransportSendStream interface asynchronously returns an object containing statistics for the current stream.
12404
+ *
12405
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/getStats)
12406
+ */
12407
+ getStats(): Promise<WebTransportSendStreamStats>;
12408
+ }
12409
+
12410
+ declare var WebTransportSendStream: {
12411
+ prototype: WebTransportSendStream;
12412
+ new(): WebTransportSendStream;
12413
+ };
12414
+
12304
12415
  /**
12305
12416
  * The **`WindowClient`** interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browsing context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.
12306
12417
  *
@@ -13471,5 +13582,6 @@ type TransferFunction = "hlg" | "pq" | "srgb";
13471
13582
  type WebGLPowerPreference = "default" | "high-performance" | "low-power";
13472
13583
  type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
13473
13584
  type WebTransportErrorSource = "session" | "stream";
13585
+ type WebTransportReliabilityMode = "pending" | "reliable-only" | "supports-unreliable";
13474
13586
  type WorkerType = "classic" | "module";
13475
13587
  type WriteCommandType = "seek" | "truncate" | "write";