@types/webworker 0.0.74 → 0.0.75

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/ts5.9/index.d.ts CHANGED
@@ -1190,6 +1190,34 @@ interface SecurityPolicyViolationEventInit extends EventInit {
1190
1190
  violatedDirective?: string;
1191
1191
  }
1192
1192
 
1193
+ interface SerialInputSignals {
1194
+ clearToSend: boolean;
1195
+ dataCarrierDetect: boolean;
1196
+ dataSetReady: boolean;
1197
+ ringIndicator: boolean;
1198
+ }
1199
+
1200
+ interface SerialOptions {
1201
+ baudRate: number;
1202
+ bufferSize?: number;
1203
+ dataBits?: number;
1204
+ flowControl?: FlowControlType;
1205
+ parity?: ParityType;
1206
+ stopBits?: number;
1207
+ }
1208
+
1209
+ interface SerialOutputSignals {
1210
+ break?: boolean;
1211
+ dataTerminalReady?: boolean;
1212
+ requestToSend?: boolean;
1213
+ }
1214
+
1215
+ interface SerialPortInfo {
1216
+ bluetoothServiceClassId?: BluetoothServiceUUID;
1217
+ usbProductId?: number;
1218
+ usbVendorId?: number;
1219
+ }
1220
+
1193
1221
  interface StorageEstimate {
1194
1222
  quota?: number;
1195
1223
  usage?: number;
@@ -2039,9 +2067,29 @@ declare var CSSKeywordValue: {
2039
2067
  new(value: string): CSSKeywordValue;
2040
2068
  };
2041
2069
 
2070
+ /**
2071
+ * The **`CSSMathClamp`** interface of the CSS Typed Object Model API represents the CSS clamp() function. It inherits properties and methods from its parent CSSNumericValue.
2072
+ *
2073
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathClamp)
2074
+ */
2042
2075
  interface CSSMathClamp extends CSSMathValue {
2076
+ /**
2077
+ * The **`lower`** read-only property of the CSSMathClamp interface returns a CSSNumericValue object containing the minimum value of a CSSMathClamp object.
2078
+ *
2079
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathClamp/lower)
2080
+ */
2043
2081
  readonly lower: CSSNumericValue;
2082
+ /**
2083
+ * The **`upper`** read-only property of the CSSMathClamp interface returns a CSSNumericValue object containing the maximum value of a CSSMathClamp object.
2084
+ *
2085
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathClamp/upper)
2086
+ */
2044
2087
  readonly upper: CSSNumericValue;
2088
+ /**
2089
+ * The **`value`** read-only property of the CSSMathClamp interface returns a CSSNumericValue object containing the preferred value of a CSSMathClamp object.
2090
+ *
2091
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSMathClamp/value)
2092
+ */
2045
2093
  readonly value: CSSNumericValue;
2046
2094
  }
2047
2095
 
@@ -2552,13 +2600,13 @@ declare var CSSTranslate: {
2552
2600
  };
2553
2601
 
2554
2602
  /**
2555
- * The **`CSSUnitValue`** interface of the CSS Typed Object Model API represents values that contain a single unit type. For example, "42px" would be represented by a CSSNumericValue.
2603
+ * The **`CSSUnitValue`** interface of the CSS Typed Object Model API represents values that contain a single unit type.
2556
2604
  *
2557
2605
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue)
2558
2606
  */
2559
2607
  interface CSSUnitValue extends CSSNumericValue {
2560
2608
  /**
2561
- * The **`CSSUnitValue.unit`** read-only property of the CSSUnitValue interface returns a string indicating the type of unit.
2609
+ * The **`CSSUnitValue.unit`** read-only property of the CSSUnitValue interface returns a string indicating the unit type.
2562
2610
  *
2563
2611
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CSSUnitValue/unit)
2564
2612
  */
@@ -2923,6 +2971,8 @@ interface CanvasTextDrawingStyles {
2923
2971
  fontStretch: CanvasFontStretch;
2924
2972
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fontVariantCaps) */
2925
2973
  fontVariantCaps: CanvasFontVariantCaps;
2974
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/lang) */
2975
+ lang: string;
2926
2976
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/letterSpacing) */
2927
2977
  letterSpacing: string;
2928
2978
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/textAlign) */
@@ -4345,7 +4395,7 @@ interface Event {
4345
4395
  */
4346
4396
  readonly eventPhase: number;
4347
4397
  /**
4348
- * The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The only exception is the click event, which initializes the isTrusted property to false in user agents.
4398
+ * The **`isTrusted`** read-only property of the Event interface is a boolean value that is true when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and false when the event was dispatched via EventTarget.dispatchEvent(). The click event fired through HTMLElement.click() sets the isTrusted property to false.
4349
4399
  *
4350
4400
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
4351
4401
  */
@@ -6330,8 +6380,12 @@ interface GPUSupportedLimits {
6330
6380
  readonly maxSamplersPerShaderStage: number;
6331
6381
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
6332
6382
  readonly maxStorageBufferBindingSize: number;
6383
+ readonly maxStorageBuffersInFragmentStage: number;
6384
+ readonly maxStorageBuffersInVertexStage: number;
6333
6385
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
6334
6386
  readonly maxStorageBuffersPerShaderStage: number;
6387
+ readonly maxStorageTexturesInFragmentStage: number;
6388
+ readonly maxStorageTexturesInVertexStage: number;
6335
6389
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
6336
6390
  readonly maxStorageTexturesPerShaderStage: number;
6337
6391
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUSupportedLimits#instance_properties) */
@@ -8110,7 +8164,7 @@ interface OffscreenCanvas extends EventTarget {
8110
8164
  getContext(contextId: "webgl2", options?: any): WebGL2RenderingContext | null;
8111
8165
  getContext(contextId: OffscreenRenderingContextId, options?: any): OffscreenRenderingContext | null;
8112
8166
  /**
8113
- * The **`OffscreenCanvas.transferToImageBitmap()`** method creates an ImageBitmap object from the most recently rendered image of the OffscreenCanvas. The OffscreenCanvas allocates a new image for its subsequent rendering.
8167
+ * The **`transferToImageBitmap()`** method of the OffscreenCanvas interface creates an ImageBitmap object from the most recently rendered image of the OffscreenCanvas. The image in the OffscreenCanvas is replaced with a new blank image for subsequent rendering.
8114
8168
  *
8115
8169
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/OffscreenCanvas/transferToImageBitmap)
8116
8170
  */
@@ -8141,6 +8195,18 @@ declare var OffscreenCanvasRenderingContext2D: {
8141
8195
  new(): OffscreenCanvasRenderingContext2D;
8142
8196
  };
8143
8197
 
8198
+ interface Origin {
8199
+ readonly opaque: boolean;
8200
+ isSameOrigin(other: Origin): boolean;
8201
+ isSameSite(other: Origin): boolean;
8202
+ }
8203
+
8204
+ declare var Origin: {
8205
+ prototype: Origin;
8206
+ new(): Origin;
8207
+ from(value: any): Origin;
8208
+ };
8209
+
8144
8210
  /**
8145
8211
  * The **`Path2D`** interface of the Canvas 2D API is used to declare a path that can then be used on a CanvasRenderingContext2D object. The path methods of the CanvasRenderingContext2D interface are also present on this interface, which gives you the convenience of being able to retain and replay your path whenever desired.
8146
8212
  *
@@ -8422,6 +8488,12 @@ interface PerformanceResourceTiming extends PerformanceEntry {
8422
8488
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/connectStart)
8423
8489
  */
8424
8490
  readonly connectStart: DOMHighResTimeStamp;
8491
+ /**
8492
+ * The **`contentType`** read-only property of the PerformanceResourceTiming interface is a string indicating the content type of the fetched resource, formatted as a MIME type and subtype separated by a forward slash.
8493
+ *
8494
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/contentType)
8495
+ */
8496
+ readonly contentType: string;
8425
8497
  /**
8426
8498
  * The **`decodedBodySize`** read-only property returns the size (in octets) received from the fetch (HTTP or cache) of the message body after removing any applied content encoding (like gzip or Brotli). If the resource is retrieved from an application cache or local resources, it returns the size of the payload after removing any applied content encoding.
8427
8499
  *
@@ -9067,7 +9139,7 @@ interface RTCEncodedVideoFrame {
9067
9139
  */
9068
9140
  readonly timestamp: number;
9069
9141
  /**
9070
- * The **`type`** read-only property of the RTCEncodedVideoFrame interface indicates whether this frame is a key frame, delta frame, or empty frame.
9142
+ * The **`type`** read-only property of the RTCEncodedVideoFrame interface indicates whether this frame is a key frame or a delta frame.
9071
9143
  *
9072
9144
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCEncodedVideoFrame/type)
9073
9145
  */
@@ -9279,7 +9351,7 @@ interface ReadableStreamBYOBRequest {
9279
9351
  *
9280
9352
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
9281
9353
  */
9282
- readonly view: ArrayBufferView<ArrayBuffer> | null;
9354
+ readonly view: Uint8Array<ArrayBuffer> | null;
9283
9355
  /**
9284
9356
  * The **`respond()`** method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.
9285
9357
  *
@@ -9613,7 +9685,7 @@ interface SecurityPolicyViolationEvent extends Event {
9613
9685
  */
9614
9686
  readonly blockedURI: string;
9615
9687
  /**
9616
- * The **`columnNumber`** read-only property of the SecurityPolicyViolationEvent interface is the column number in the document or worker script at which the Content Security Policy (CSP) violation occurred.
9688
+ * The **`columnNumber`** read-only property of the SecurityPolicyViolationEvent interface is the character position in the source file line of the document or worker script at which the Content Security Policy (CSP) violation occurred.
9617
9689
  *
9618
9690
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SecurityPolicyViolationEvent/columnNumber)
9619
9691
  */
@@ -9685,6 +9757,107 @@ declare var SecurityPolicyViolationEvent: {
9685
9757
  new(type: string, eventInitDict?: SecurityPolicyViolationEventInit): SecurityPolicyViolationEvent;
9686
9758
  };
9687
9759
 
9760
+ /**
9761
+ * The **`Serial`** interface of the Web Serial API provides attributes and methods for finding and connecting to serial ports from a web page.
9762
+ * Available only in secure contexts.
9763
+ *
9764
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Serial)
9765
+ */
9766
+ interface Serial extends EventTarget {
9767
+ /**
9768
+ * The **`getPorts()`** method of the Serial interface returns a Promise that resolves with an array of SerialPort objects representing serial ports connected to the host which the origin has permission to access.
9769
+ *
9770
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Serial/getPorts)
9771
+ */
9772
+ getPorts(): Promise<SerialPort[]>;
9773
+ }
9774
+
9775
+ declare var Serial: {
9776
+ prototype: Serial;
9777
+ new(): Serial;
9778
+ };
9779
+
9780
+ interface SerialPortEventMap {
9781
+ "connect": Event;
9782
+ "disconnect": Event;
9783
+ }
9784
+
9785
+ /**
9786
+ * The **`SerialPort`** interface of the Web Serial API provides access to a serial port on the host device.
9787
+ * Available only in secure contexts.
9788
+ *
9789
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort)
9790
+ */
9791
+ interface SerialPort extends EventTarget {
9792
+ /**
9793
+ * The **`connected`** read-only property of the SerialPort interface returns a boolean value that indicates whether the port is logically connected to the device.
9794
+ *
9795
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/connected)
9796
+ */
9797
+ readonly connected: boolean;
9798
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/connect_event) */
9799
+ onconnect: ((this: SerialPort, ev: Event) => any) | null;
9800
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/disconnect_event) */
9801
+ ondisconnect: ((this: SerialPort, ev: Event) => any) | null;
9802
+ /**
9803
+ * The **`readable`** read-only property of the SerialPort interface returns a ReadableStream for receiving data from the device connected to the port. Chunks read from this stream are instances of Uint8Array. This property is non-null as long as the port is open and has not encountered a fatal error.
9804
+ *
9805
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/readable)
9806
+ */
9807
+ readonly readable: ReadableStream | null;
9808
+ /**
9809
+ * The **`writable`** read-only property of the SerialPort interface returns a WritableStream for sending data to the device connected to the port. Chunks written to this stream must be instances of ArrayBuffer, TypedArray, or DataView. This property is non-null as long as the port is open and has not encountered a fatal error.
9810
+ *
9811
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/writable)
9812
+ */
9813
+ readonly writable: WritableStream | null;
9814
+ /**
9815
+ * The **`SerialPort.close()`** method of the SerialPort interface returns a Promise that resolves when the port closes.
9816
+ *
9817
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/close)
9818
+ */
9819
+ close(): Promise<void>;
9820
+ /**
9821
+ * The **`SerialPort.forget()`** method of the SerialPort interface returns a Promise that resolves when access to the serial port is revoked.
9822
+ *
9823
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/forget)
9824
+ */
9825
+ forget(): Promise<void>;
9826
+ /**
9827
+ * The **`getInfo()`** method of the SerialPort interface returns an object containing identifying information for the device available via the port.
9828
+ *
9829
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/getInfo)
9830
+ */
9831
+ getInfo(): SerialPortInfo;
9832
+ /**
9833
+ * The **`SerialPort.getSignals()`** method of the SerialPort interface returns a Promise that resolves with an object containing the current state of the port's control signals.
9834
+ *
9835
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/getSignals)
9836
+ */
9837
+ getSignals(): Promise<SerialInputSignals>;
9838
+ /**
9839
+ * The **`open()`** method of the SerialPort interface returns a Promise that resolves when the port is opened. By default the port is opened with 8 data bits, 1 stop bit and no parity checking. The baudRate parameter is required.
9840
+ *
9841
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/open)
9842
+ */
9843
+ open(options: SerialOptions): Promise<void>;
9844
+ /**
9845
+ * The **`setSignals()`** method of the SerialPort interface sets control signals on the port and returns a Promise that resolves when they are set.
9846
+ *
9847
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SerialPort/setSignals)
9848
+ */
9849
+ setSignals(signals?: SerialOutputSignals): Promise<void>;
9850
+ addEventListener<K extends keyof SerialPortEventMap>(type: K, listener: (this: SerialPort, ev: SerialPortEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
9851
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
9852
+ removeEventListener<K extends keyof SerialPortEventMap>(type: K, listener: (this: SerialPort, ev: SerialPortEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
9853
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
9854
+ }
9855
+
9856
+ declare var SerialPort: {
9857
+ prototype: SerialPort;
9858
+ new(): SerialPort;
9859
+ };
9860
+
9688
9861
  interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
9689
9862
  "statechange": Event;
9690
9863
  }
@@ -11239,13 +11412,13 @@ interface WEBGL_draw_buffers {
11239
11412
  */
11240
11413
  interface WEBGL_lose_context {
11241
11414
  /**
11242
- * The **`WEBGL_lose_context.loseContext()`** method is part of the WebGL API and allows you to simulate losing the context of a WebGLRenderingContext context.
11415
+ * The **`loseContext()`** method of the WEBGL_lose_context extension is part of the WebGL API and allows you to simulate losing the context of a WebGLRenderingContext.
11243
11416
  *
11244
11417
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_lose_context/loseContext)
11245
11418
  */
11246
11419
  loseContext(): void;
11247
11420
  /**
11248
- * The **`WEBGL_lose_context.restoreContext()`** method is part of the WebGL API and allows you to simulate restoring the context of a WebGLRenderingContext object.
11421
+ * The **`restoreContext()`** method of the WEBGL_lose_context extension is part of the WebGL API and allows you to simulate restoring the context of a WebGLRenderingContext.
11249
11422
  *
11250
11423
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_lose_context/restoreContext)
11251
11424
  */
@@ -14131,6 +14304,12 @@ interface WorkerNavigator extends NavigatorBadge, NavigatorConcurrentHardware, N
14131
14304
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/permissions)
14132
14305
  */
14133
14306
  readonly permissions: Permissions;
14307
+ /**
14308
+ * The **`serial`** read-only property of the WorkerNavigator interface returns a Serial object which represents the entry point into the Web Serial API.
14309
+ *
14310
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerNavigator/serial)
14311
+ */
14312
+ readonly serial: Serial;
14134
14313
  /**
14135
14314
  * The **`serviceWorker`** read-only property of the WorkerNavigator interface returns the ServiceWorkerContainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the ServiceWorker.
14136
14315
  * Available only in secure contexts.
@@ -14497,6 +14676,7 @@ declare namespace WebAssembly {
14497
14676
  * [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/Reference/JavaScript_interface/Global)
14498
14677
  */
14499
14678
  interface Global<T extends ValueType = ValueType> {
14679
+ /** The **`value`** property of the WebAssembly.Global object prototype returns the value contained inside the global variable. */
14500
14680
  value: ValueTypeMap[T];
14501
14681
  valueOf(): ValueTypeMap[T];
14502
14682
  }
@@ -15084,6 +15264,7 @@ type AlgorithmIdentifier = Algorithm | string;
15084
15264
  type AllowSharedBufferSource = ArrayBufferLike | ArrayBufferView<ArrayBufferLike>;
15085
15265
  type BigInteger = Uint8Array<ArrayBuffer>;
15086
15266
  type BlobPart = BufferSource | Blob | string;
15267
+ type BluetoothServiceUUID = string | number;
15087
15268
  type BodyInit = ReadableStream | XMLHttpRequestBodyInit;
15088
15269
  type BufferSource = ArrayBufferView<ArrayBuffer> | ArrayBuffer;
15089
15270
  type CSSKeywordish = string | CSSKeywordValue;
@@ -15188,6 +15369,7 @@ type EncodedAudioChunkType = "delta" | "key";
15188
15369
  type EncodedVideoChunkType = "delta" | "key";
15189
15370
  type EndingType = "native" | "transparent";
15190
15371
  type FileSystemHandleKind = "directory" | "file";
15372
+ type FlowControlType = "hardware" | "none";
15191
15373
  type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
15192
15374
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
15193
15375
  type FontFaceSetLoadStatus = "loaded" | "loading";
@@ -15248,6 +15430,7 @@ type NotificationDirection = "auto" | "ltr" | "rtl";
15248
15430
  type NotificationPermission = "default" | "denied" | "granted";
15249
15431
  type OffscreenRenderingContextId = "2d" | "bitmaprenderer" | "webgl" | "webgl2" | "webgpu";
15250
15432
  type OpusBitstreamFormat = "ogg" | "opus";
15433
+ type ParityType = "even" | "none" | "odd";
15251
15434
  type PermissionName = "camera" | "geolocation" | "microphone" | "midi" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "storage-access";
15252
15435
  type PermissionState = "denied" | "granted" | "prompt";
15253
15436
  type PredefinedColorSpace = "display-p3" | "srgb";