@types/web 0.0.337 → 0.0.339

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
@@ -47,4 +47,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
47
47
 
48
48
  ## Deploy Metadata
49
49
 
50
- You can read what changed in version 0.0.337 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.337.
50
+ You can read what changed in version 0.0.339 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.339.
package/index.d.ts CHANGED
@@ -411,6 +411,10 @@ interface CloseEventInit extends EventInit {
411
411
  wasClean?: boolean;
412
412
  }
413
413
 
414
+ interface CloseWatcherOptions {
415
+ signal?: AbortSignal;
416
+ }
417
+
414
418
  interface CommandEventInit extends EventInit {
415
419
  command?: string;
416
420
  source?: Element | null;
@@ -1185,7 +1189,7 @@ interface GamepadEffectParameters {
1185
1189
  }
1186
1190
 
1187
1191
  interface GamepadEventInit extends EventInit {
1188
- gamepad: Gamepad;
1192
+ gamepad?: Gamepad | null;
1189
1193
  }
1190
1194
 
1191
1195
  interface GetAnimationsOptions {
@@ -3121,6 +3125,23 @@ interface WebTransportCloseInfo {
3121
3125
  reason?: string;
3122
3126
  }
3123
3127
 
3128
+ interface WebTransportConnectionStats {
3129
+ bytesReceived?: number;
3130
+ datagrams: WebTransportDatagramStats;
3131
+ minRtt?: DOMHighResTimeStamp;
3132
+ packetsLost?: number;
3133
+ packetsReceived?: number;
3134
+ packetsSent?: number;
3135
+ rttVariation?: DOMHighResTimeStamp;
3136
+ smoothedRtt?: DOMHighResTimeStamp;
3137
+ }
3138
+
3139
+ interface WebTransportDatagramStats {
3140
+ droppedIncoming?: number;
3141
+ expiredOutgoing?: number;
3142
+ lostOutgoing?: number;
3143
+ }
3144
+
3124
3145
  interface WebTransportErrorOptions {
3125
3146
  source?: WebTransportErrorSource;
3126
3147
  streamErrorCode?: number | null;
@@ -3139,6 +3160,11 @@ interface WebTransportOptions {
3139
3160
  serverCertificateHashes?: WebTransportHash[];
3140
3161
  }
3141
3162
 
3163
+ interface WebTransportReceiveStreamStats {
3164
+ bytesRead?: number;
3165
+ bytesReceived?: number;
3166
+ }
3167
+
3142
3168
  interface WebTransportSendOptions {
3143
3169
  sendOrder?: number;
3144
3170
  }
@@ -3146,6 +3172,12 @@ interface WebTransportSendOptions {
3146
3172
  interface WebTransportSendStreamOptions extends WebTransportSendOptions {
3147
3173
  }
3148
3174
 
3175
+ interface WebTransportSendStreamStats {
3176
+ bytesAcknowledged?: number;
3177
+ bytesSent?: number;
3178
+ bytesWritten?: number;
3179
+ }
3180
+
3149
3181
  interface WheelEventInit extends MouseEventInit {
3150
3182
  deltaMode?: number;
3151
3183
  deltaX?: number;
@@ -5361,7 +5393,7 @@ declare var CSSFontFaceRule: {
5361
5393
  };
5362
5394
 
5363
5395
  /**
5364
- * The **`CSSFontFeatureValuesRule`** interface represents an @font-feature-values at-rule. The values of its instance properties can be accessed with the CSSFontFeatureValuesMapinterface.
5396
+ * The **`CSSFontFeatureValuesRule`** interface represents an @font-feature-values at-rule. The values of its instance properties can be accessed with the CSSFontFeatureValuesMap interface.
5365
5397
  *
5366
5398
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSFontFeatureValuesRule)
5367
5399
  */
@@ -6818,7 +6850,11 @@ interface CSSStyleProperties extends CSSStyleDeclarationBase {
6818
6850
  * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/background-size)
6819
6851
  */
6820
6852
  backgroundSize: string;
6821
- /** The baseline-shift CSS property repositions the dominant-baseline of a text element relative to the dominant-baseline of its parent text content element. The shifted element might be a sub- or superscript. If the property is present, the value overrides the element's baseline-shift attribute. */
6853
+ /**
6854
+ * The baseline-shift CSS property repositions the dominant-baseline of a text element relative to the dominant-baseline of its parent text content element. The shifted element might be a sub- or superscript. If the property is present, the value overrides the element's baseline-shift attribute.
6855
+ *
6856
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/baseline-shift)
6857
+ */
6822
6858
  baselineShift: string;
6823
6859
  /**
6824
6860
  * The baseline-source CSS property defines which baseline to use when inline-level boxes have multiple possible baselines, such as multi-line inline blocks or inline flex containers. The values allow for choosing between aligning to the box's first baseline, last baseline, or letting the browser decide automatically based on the box type.
@@ -10796,6 +10832,50 @@ declare var CloseEvent: {
10796
10832
  new(type: string, eventInitDict?: CloseEventInit): CloseEvent;
10797
10833
  };
10798
10834
 
10835
+ interface CloseWatcherEventMap {
10836
+ "cancel": Event;
10837
+ "close": Event;
10838
+ }
10839
+
10840
+ /**
10841
+ * The **`CloseWatcher`** interface allows a custom UI component with open and close semantics to respond to device-specific close actions in the same way as a built-in component.
10842
+ *
10843
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher)
10844
+ */
10845
+ interface CloseWatcher extends EventTarget {
10846
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/cancel_event) */
10847
+ oncancel: ((this: CloseWatcher, ev: Event) => any) | null;
10848
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/close_event) */
10849
+ onclose: ((this: CloseWatcher, ev: Event) => any) | null;
10850
+ /**
10851
+ * The **`close()`** method of the CloseWatcher interface lets you skip any logic in the cancel event handler and immediately fire the close event. It then deactivates the close watcher as if destroy() was called.
10852
+ *
10853
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/close)
10854
+ */
10855
+ close(): void;
10856
+ /**
10857
+ * The **`destroy()`** method of the CloseWatcher interface deactivates the close watcher. This is intended to be called if the relevant UI element is torn down in some other way than being closed.
10858
+ *
10859
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/destroy)
10860
+ */
10861
+ destroy(): void;
10862
+ /**
10863
+ * The **`requestClose()`** method of the CloseWatcher interface fires a cancel event and if that event is not canceled with Event.preventDefault(), proceeds to fire a close event, and then finally deactivates the close watcher as if destroy() was called.
10864
+ *
10865
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseWatcher/requestClose)
10866
+ */
10867
+ requestClose(): void;
10868
+ addEventListener<K extends keyof CloseWatcherEventMap>(type: K, listener: (this: CloseWatcher, ev: CloseWatcherEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
10869
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
10870
+ removeEventListener<K extends keyof CloseWatcherEventMap>(type: K, listener: (this: CloseWatcher, ev: CloseWatcherEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
10871
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
10872
+ }
10873
+
10874
+ declare var CloseWatcher: {
10875
+ prototype: CloseWatcher;
10876
+ new(options?: CloseWatcherOptions): CloseWatcher;
10877
+ };
10878
+
10799
10879
  /**
10800
10880
  * The **`CommandEvent`** interface represents an event notifying the user when a button element with valid commandForElement and command attributes is about to invoke an interactive element.
10801
10881
  *
@@ -11234,6 +11314,7 @@ interface CustomElementRegistry {
11234
11314
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/getName)
11235
11315
  */
11236
11316
  getName(constructor: CustomElementConstructor): string | null;
11317
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomElementRegistry/initialize) */
11237
11318
  initialize(root: Node): void;
11238
11319
  /**
11239
11320
  * The **`upgrade()`** method of the CustomElementRegistry interface upgrades all shadow-containing custom elements in a Node subtree, even before they are connected to the main document.
@@ -13232,6 +13313,7 @@ interface DocumentOrShadowRoot {
13232
13313
  readonly activeElement: Element | null;
13233
13314
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/adoptedStyleSheets) */
13234
13315
  adoptedStyleSheets: CSSStyleSheet[];
13316
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/customElementRegistry) */
13235
13317
  readonly customElementRegistry: CustomElementRegistry | null;
13236
13318
  /**
13237
13319
  * Returns document's fullscreen element.
@@ -13542,6 +13624,7 @@ interface Element extends Node, ARIAMixin, Animatable, ChildNode, NonDocumentTyp
13542
13624
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/currentCSSZoom)
13543
13625
  */
13544
13626
  readonly currentCSSZoom: number;
13627
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Element/customElementRegistry) */
13545
13628
  readonly customElementRegistry: CustomElementRegistry | null;
13546
13629
  /**
13547
13630
  * The **`id`** property of the Element interface represents the element's identifier, reflecting the id global attribute.
@@ -16446,7 +16529,7 @@ interface GamepadEvent extends Event {
16446
16529
 
16447
16530
  declare var GamepadEvent: {
16448
16531
  prototype: GamepadEvent;
16449
- new(type: string, eventInitDict: GamepadEventInit): GamepadEvent;
16532
+ new(type: string, eventInitDict?: GamepadEventInit): GamepadEvent;
16450
16533
  };
16451
16534
 
16452
16535
  /**
@@ -18766,6 +18849,12 @@ interface HTMLInputElement extends HTMLElement, PopoverTargetAttributes {
18766
18849
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/checked)
18767
18850
  */
18768
18851
  checked: boolean;
18852
+ /**
18853
+ * The **`colorSpace`** property of the HTMLInputElement interface reflects the <input> element's colorspace attribute, which indicates whether the color space of the serialized CSS color is sRGB (the default) or display-p3. It is only relevant to color controls.
18854
+ *
18855
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/colorSpace)
18856
+ */
18857
+ colorSpace: string;
18769
18858
  /**
18770
18859
  * The **`defaultChecked`** property of the HTMLInputElement interface specifies the default checkedness state of the element. This property reflects the <input> element's checked attribute.
18771
18860
  *
@@ -19570,6 +19659,12 @@ interface HTMLMediaElement extends HTMLElement {
19570
19659
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/canPlayType)
19571
19660
  */
19572
19661
  canPlayType(type: string): CanPlayTypeResult;
19662
+ /**
19663
+ * The **`captureStream()`** method of the HTMLMediaElement interface returns a MediaStream object which is streaming a real-time capture of the content being rendered in the media element.
19664
+ *
19665
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLMediaElement/captureStream)
19666
+ */
19667
+ captureStream(): MediaStream;
19573
19668
  /**
19574
19669
  * The **`HTMLMediaElement.fastSeek()`** method quickly seeks the media to the new time with precision tradeoff.
19575
19670
  *
@@ -21307,6 +21402,7 @@ interface HTMLTemplateElement extends HTMLElement {
21307
21402
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootClonable)
21308
21403
  */
21309
21404
  shadowRootClonable: boolean;
21405
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLTemplateElement/shadowRootCustomElementRegistry) */
21310
21406
  shadowRootCustomElementRegistry: string;
21311
21407
  /**
21312
21408
  * The **`shadowRootDelegatesFocus`** property of the HTMLTemplateElement interface reflects the value of the shadowrootdelegatesfocus attribute of the associated <template> element.
@@ -27899,6 +27995,12 @@ interface PerformanceResourceTiming extends PerformanceEntry {
27899
27995
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/decodedBodySize)
27900
27996
  */
27901
27997
  readonly decodedBodySize: number;
27998
+ /**
27999
+ * The **`deliveryType`** read-only property is a string indicating how the resource was delivered — for example from the cache or from a navigational prefetch.
28000
+ *
28001
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/deliveryType)
28002
+ */
28003
+ readonly deliveryType: string;
27902
28004
  /**
27903
28005
  * The **`domainLookupEnd`** read-only property returns the timestamp immediately after the browser finishes the domain-name lookup for the resource.
27904
28006
  *
@@ -27923,6 +28025,18 @@ interface PerformanceResourceTiming extends PerformanceEntry {
27923
28025
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/fetchStart)
27924
28026
  */
27925
28027
  readonly fetchStart: DOMHighResTimeStamp;
28028
+ /**
28029
+ * 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.
28030
+ *
28031
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/finalResponseHeadersStart)
28032
+ */
28033
+ readonly finalResponseHeadersStart: DOMHighResTimeStamp;
28034
+ /**
28035
+ * 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.
28036
+ *
28037
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/firstInterimResponseStart)
28038
+ */
28039
+ readonly firstInterimResponseStart: DOMHighResTimeStamp;
27926
28040
  /**
27927
28041
  * The **`initiatorType`** read-only property is a string representing web platform feature that initiated the resource load.
27928
28042
  *
@@ -30353,7 +30467,7 @@ interface ReadableStreamDefaultController<R = any> {
30353
30467
  *
30354
30468
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
30355
30469
  */
30356
- enqueue(chunk?: R): void;
30470
+ enqueue(chunk: R): void;
30357
30471
  /**
30358
30472
  * The **`error()`** method of the ReadableStreamDefaultController interface causes any future interactions with the associated stream to error.
30359
30473
  *
@@ -40941,6 +41055,12 @@ interface WebTransport {
40941
41055
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/closed)
40942
41056
  */
40943
41057
  readonly closed: Promise<WebTransportCloseInfo>;
41058
+ /**
41059
+ * The **`congestionControl`** read-only property of the WebTransport interface indicates the application's preference for either high throughput or low-latency when sending data.
41060
+ *
41061
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/congestionControl)
41062
+ */
41063
+ readonly congestionControl: WebTransportCongestionControl;
40944
41064
  /**
40945
41065
  * 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.
40946
41066
  *
@@ -40959,12 +41079,19 @@ interface WebTransport {
40959
41079
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/incomingUnidirectionalStreams)
40960
41080
  */
40961
41081
  readonly incomingUnidirectionalStreams: ReadableStream;
41082
+ readonly protocol: string;
40962
41083
  /**
40963
41084
  * The **`ready`** read-only property of the WebTransport interface returns a promise that resolves when the transport is ready to use.
40964
41085
  *
40965
41086
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/ready)
40966
41087
  */
40967
41088
  readonly ready: Promise<void>;
41089
+ /**
41090
+ * 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).
41091
+ *
41092
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/reliability)
41093
+ */
41094
+ readonly reliability: WebTransportReliabilityMode;
40968
41095
  /**
40969
41096
  * The **`close()`** method of the WebTransport interface closes an ongoing WebTransport session.
40970
41097
  *
@@ -40983,6 +41110,12 @@ interface WebTransport {
40983
41110
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/createUnidirectionalStream)
40984
41111
  */
40985
41112
  createUnidirectionalStream(options?: WebTransportSendStreamOptions): Promise<WritableStream>;
41113
+ /**
41114
+ * The **`getStats()`** method of the WebTransport interface asynchronously returns an object containing HTTP/3 connection statistics.
41115
+ *
41116
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransport/getStats)
41117
+ */
41118
+ getStats(): Promise<WebTransportConnectionStats>;
40986
41119
  }
40987
41120
 
40988
41121
  declare var WebTransport: {
@@ -41098,6 +41231,52 @@ declare var WebTransportError: {
41098
41231
  new(message?: string, options?: WebTransportErrorOptions): WebTransportError;
41099
41232
  };
41100
41233
 
41234
+ /**
41235
+ * The **`WebTransportReceiveStream`** interface of the WebTransport API is a ReadableStream that can be used to read from an incoming unidirectional or bidirectional WebTransport stream.
41236
+ * Available only in secure contexts.
41237
+ *
41238
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream)
41239
+ */
41240
+ interface WebTransportReceiveStream extends ReadableStream {
41241
+ /**
41242
+ * The **`getStats()`** method of the WebTransportReceiveStream interface asynchronously returns an object containing statistics for the current stream.
41243
+ *
41244
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportReceiveStream/getStats)
41245
+ */
41246
+ getStats(): Promise<WebTransportReceiveStreamStats>;
41247
+ }
41248
+
41249
+ declare var WebTransportReceiveStream: {
41250
+ prototype: WebTransportReceiveStream;
41251
+ new(): WebTransportReceiveStream;
41252
+ };
41253
+
41254
+ /**
41255
+ * 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.
41256
+ * Available only in secure contexts.
41257
+ *
41258
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream)
41259
+ */
41260
+ interface WebTransportSendStream extends WritableStream {
41261
+ /**
41262
+ * 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.
41263
+ *
41264
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/sendOrder)
41265
+ */
41266
+ sendOrder: number;
41267
+ /**
41268
+ * The **`getStats()`** method of the WebTransportSendStream interface asynchronously returns an object containing statistics for the current stream.
41269
+ *
41270
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebTransportSendStream/getStats)
41271
+ */
41272
+ getStats(): Promise<WebTransportSendStreamStats>;
41273
+ }
41274
+
41275
+ declare var WebTransportSendStream: {
41276
+ prototype: WebTransportSendStream;
41277
+ new(): WebTransportSendStream;
41278
+ };
41279
+
41101
41280
  /**
41102
41281
  * The **`WheelEvent`** interface represents events that occur due to the user moving a mouse wheel or similar input device.
41103
41282
  *
@@ -44458,6 +44637,7 @@ type WakeLockType = "screen";
44458
44637
  type WebGLPowerPreference = "default" | "high-performance" | "low-power";
44459
44638
  type WebTransportCongestionControl = "default" | "low-latency" | "throughput";
44460
44639
  type WebTransportErrorSource = "session" | "stream";
44640
+ type WebTransportReliabilityMode = "pending" | "reliable-only" | "supports-unreliable";
44461
44641
  type WorkerType = "classic" | "module";
44462
44642
  type WriteCommandType = "seek" | "truncate" | "write";
44463
44643
  type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.337",
3
+ "version": "0.0.339",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],