@types/sharedworker 0.0.58 → 0.0.62

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.58 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.58.
31
+ You can read what changed in version 0.0.62 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.62.
package/index.d.ts CHANGED
@@ -167,6 +167,18 @@ interface FilePropertyBag extends BlobPropertyBag {
167
167
  lastModified?: number;
168
168
  }
169
169
 
170
+ interface FileSystemGetDirectoryOptions {
171
+ create?: boolean;
172
+ }
173
+
174
+ interface FileSystemGetFileOptions {
175
+ create?: boolean;
176
+ }
177
+
178
+ interface FileSystemRemoveOptions {
179
+ recursive?: boolean;
180
+ }
181
+
170
182
  interface FontFaceDescriptors {
171
183
  display?: string;
172
184
  featureSettings?: string;
@@ -267,6 +279,24 @@ interface KeyAlgorithm {
267
279
  name: string;
268
280
  }
269
281
 
282
+ interface LockInfo {
283
+ clientId?: string;
284
+ mode?: LockMode;
285
+ name?: string;
286
+ }
287
+
288
+ interface LockManagerSnapshot {
289
+ held?: LockInfo[];
290
+ pending?: LockInfo[];
291
+ }
292
+
293
+ interface LockOptions {
294
+ ifAvailable?: boolean;
295
+ mode?: LockMode;
296
+ signal?: AbortSignal;
297
+ steal?: boolean;
298
+ }
299
+
270
300
  interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
271
301
  configuration?: MediaDecodingConfiguration;
272
302
  }
@@ -526,7 +556,7 @@ interface StreamPipeOptions {
526
556
  }
527
557
 
528
558
  interface StructuredSerializeOptions {
529
- transfer?: any[];
559
+ transfer?: Transferable[];
530
560
  }
531
561
 
532
562
  interface TextDecodeOptions {
@@ -613,7 +643,7 @@ interface AbortController {
613
643
  /** Returns the AbortSignal object associated with this object. */
614
644
  readonly signal: AbortSignal;
615
645
  /** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */
616
- abort(): void;
646
+ abort(reason?: any): void;
617
647
  }
618
648
 
619
649
  declare var AbortController: {
@@ -639,7 +669,7 @@ interface AbortSignal extends EventTarget {
639
669
  declare var AbortSignal: {
640
670
  prototype: AbortSignal;
641
671
  new(): AbortSignal;
642
- // abort(): AbortSignal; - To be re-added in the future
672
+ abort(reason?: any): AbortSignal;
643
673
  };
644
674
 
645
675
  interface AbstractWorkerEventMap {
@@ -820,6 +850,8 @@ interface Crypto {
820
850
  /** Available only in secure contexts. */
821
851
  readonly subtle: SubtleCrypto;
822
852
  getRandomValues<T extends ArrayBufferView | null>(array: T): T;
853
+ /** Available only in secure contexts. */
854
+ randomUUID(): string;
823
855
  }
824
856
 
825
857
  declare var Crypto: {
@@ -1370,6 +1402,41 @@ declare var FileReaderSync: {
1370
1402
  new(): FileReaderSync;
1371
1403
  };
1372
1404
 
1405
+ /** Available only in secure contexts. */
1406
+ interface FileSystemDirectoryHandle extends FileSystemHandle {
1407
+ getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
1408
+ getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
1409
+ removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
1410
+ resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
1411
+ }
1412
+
1413
+ declare var FileSystemDirectoryHandle: {
1414
+ prototype: FileSystemDirectoryHandle;
1415
+ new(): FileSystemDirectoryHandle;
1416
+ };
1417
+
1418
+ /** Available only in secure contexts. */
1419
+ interface FileSystemFileHandle extends FileSystemHandle {
1420
+ getFile(): Promise<File>;
1421
+ }
1422
+
1423
+ declare var FileSystemFileHandle: {
1424
+ prototype: FileSystemFileHandle;
1425
+ new(): FileSystemFileHandle;
1426
+ };
1427
+
1428
+ /** Available only in secure contexts. */
1429
+ interface FileSystemHandle {
1430
+ readonly kind: FileSystemHandleKind;
1431
+ readonly name: string;
1432
+ isSameEntry(other: FileSystemHandle): Promise<boolean>;
1433
+ }
1434
+
1435
+ declare var FileSystemHandle: {
1436
+ prototype: FileSystemHandle;
1437
+ new(): FileSystemHandle;
1438
+ };
1439
+
1373
1440
  interface FontFace {
1374
1441
  ascentOverride: string;
1375
1442
  descentOverride: string;
@@ -1833,6 +1900,7 @@ interface IDBTransactionEventMap {
1833
1900
  interface IDBTransaction extends EventTarget {
1834
1901
  /** Returns the transaction's connection. */
1835
1902
  readonly db: IDBDatabase;
1903
+ readonly durability: IDBTransactionDurability;
1836
1904
  /** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
1837
1905
  readonly error: DOMException | null;
1838
1906
  /** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
@@ -1913,6 +1981,29 @@ interface KHR_parallel_shader_compile {
1913
1981
  readonly COMPLETION_STATUS_KHR: GLenum;
1914
1982
  }
1915
1983
 
1984
+ /** Available only in secure contexts. */
1985
+ interface Lock {
1986
+ readonly mode: LockMode;
1987
+ readonly name: string;
1988
+ }
1989
+
1990
+ declare var Lock: {
1991
+ prototype: Lock;
1992
+ new(): Lock;
1993
+ };
1994
+
1995
+ /** Available only in secure contexts. */
1996
+ interface LockManager {
1997
+ query(): Promise<LockManagerSnapshot>;
1998
+ request(name: string, callback: LockGrantedCallback): Promise<any>;
1999
+ request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
2000
+ }
2001
+
2002
+ declare var LockManager: {
2003
+ prototype: LockManager;
2004
+ new(): LockManager;
2005
+ };
2006
+
1916
2007
  interface MediaCapabilities {
1917
2008
  decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
1918
2009
  encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
@@ -2575,6 +2666,7 @@ declare var SharedWorkerGlobalScope: {
2575
2666
  /** Available only in secure contexts. */
2576
2667
  interface StorageManager {
2577
2668
  estimate(): Promise<StorageEstimate>;
2669
+ getDirectory(): Promise<FileSystemDirectoryHandle>;
2578
2670
  persisted(): Promise<boolean>;
2579
2671
  }
2580
2672
 
@@ -2911,6 +3003,13 @@ interface WEBGL_lose_context {
2911
3003
  restoreContext(): void;
2912
3004
  }
2913
3005
 
3006
+ interface WEBGL_multi_draw {
3007
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
3008
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
3009
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
3010
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
3011
+ }
3012
+
2914
3013
  interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
2915
3014
  }
2916
3015
 
@@ -4860,8 +4959,8 @@ interface WindowOrWorkerGlobalScope {
4860
4959
  readonly performance: Performance;
4861
4960
  atob(data: string): string;
4862
4961
  btoa(data: string): string;
4863
- clearInterval(handle?: number): void;
4864
- clearTimeout(handle?: number): void;
4962
+ clearInterval(id?: number): void;
4963
+ clearTimeout(id?: number): void;
4865
4964
  createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
4866
4965
  createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
4867
4966
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
@@ -5283,7 +5382,7 @@ declare namespace WebAssembly {
5283
5382
 
5284
5383
  type ImportExportKind = "function" | "global" | "memory" | "table";
5285
5384
  type TableKind = "anyfunc" | "externref";
5286
- type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
5385
+ type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
5287
5386
  type ExportValue = Function | Global | Memory | Table;
5288
5387
  type Exports = Record<string, ExportValue>;
5289
5388
  type ImportValue = ExportValue | number;
@@ -5297,6 +5396,10 @@ declare namespace WebAssembly {
5297
5396
  function validate(bytes: BufferSource): boolean;
5298
5397
  }
5299
5398
 
5399
+ interface LockGrantedCallback {
5400
+ (lock: Lock | null): any;
5401
+ }
5402
+
5300
5403
  interface OnErrorEventHandlerNonNull {
5301
5404
  (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5302
5405
  }
@@ -5387,8 +5490,8 @@ declare var origin: string;
5387
5490
  declare var performance: Performance;
5388
5491
  declare function atob(data: string): string;
5389
5492
  declare function btoa(data: string): string;
5390
- declare function clearInterval(handle?: number): void;
5391
- declare function clearTimeout(handle?: number): void;
5493
+ declare function clearInterval(id?: number): void;
5494
+ declare function clearTimeout(id?: number): void;
5392
5495
  declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5393
5496
  declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5394
5497
  declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
@@ -5449,16 +5552,19 @@ type ColorGamut = "p3" | "rec2020" | "srgb";
5449
5552
  type ColorSpaceConversion = "default" | "none";
5450
5553
  type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
5451
5554
  type EndingType = "native" | "transparent";
5555
+ type FileSystemHandleKind = "directory" | "file";
5452
5556
  type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
5453
5557
  type FontFaceSetLoadStatus = "loaded" | "loading";
5454
5558
  type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
5455
5559
  type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
5456
5560
  type IDBRequestReadyState = "done" | "pending";
5561
+ type IDBTransactionDurability = "default" | "relaxed" | "strict";
5457
5562
  type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
5458
5563
  type ImageOrientation = "flipY" | "none";
5459
5564
  type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
5460
5565
  type KeyType = "private" | "public" | "secret";
5461
5566
  type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
5567
+ type LockMode = "exclusive" | "shared";
5462
5568
  type MediaDecodingType = "file" | "media-source" | "webrtc";
5463
5569
  type MediaEncodingType = "record" | "webrtc";
5464
5570
  type NotificationDirection = "auto" | "ltr" | "rtl";
package/iterable.d.ts CHANGED
@@ -80,6 +80,13 @@ interface WEBGL_draw_buffers {
80
80
  drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
81
81
  }
82
82
 
83
+ interface WEBGL_multi_draw {
84
+ multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
85
+ multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void;
86
+ multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
87
+ multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void;
88
+ }
89
+
83
90
  interface WebGL2RenderingContextBase {
84
91
  clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
85
92
  clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sharedworker",
3
- "version": "0.0.58",
3
+ "version": "0.0.62",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "MIT",
6
6
  "contributors": [],