@types/sharedworker 0.0.61 → 0.0.65

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +50 -2
  3. package/package.json +1 -1
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.61 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.61.
31
+ You can read what changed in version 0.0.65 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.65.
package/index.d.ts CHANGED
@@ -279,6 +279,24 @@ interface KeyAlgorithm {
279
279
  name: string;
280
280
  }
281
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
+
282
300
  interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
283
301
  configuration?: MediaDecodingConfiguration;
284
302
  }
@@ -651,7 +669,7 @@ interface AbortSignal extends EventTarget {
651
669
  declare var AbortSignal: {
652
670
  prototype: AbortSignal;
653
671
  new(): AbortSignal;
654
- abort(reason?: any): AbortSignal;
672
+ // abort(reason?: any): AbortSignal; - To be re-added in the future
655
673
  };
656
674
 
657
675
  interface AbstractWorkerEventMap {
@@ -672,7 +690,7 @@ interface Blob {
672
690
  readonly type: string;
673
691
  arrayBuffer(): Promise<ArrayBuffer>;
674
692
  slice(start?: number, end?: number, contentType?: string): Blob;
675
- stream(): ReadableStream;
693
+ stream(): ReadableStream<Uint8Array>;
676
694
  text(): Promise<string>;
677
695
  }
678
696
 
@@ -1386,6 +1404,7 @@ declare var FileReaderSync: {
1386
1404
 
1387
1405
  /** Available only in secure contexts. */
1388
1406
  interface FileSystemDirectoryHandle extends FileSystemHandle {
1407
+ readonly kind: "directory";
1389
1408
  getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
1390
1409
  getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
1391
1410
  removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
@@ -1399,6 +1418,7 @@ declare var FileSystemDirectoryHandle: {
1399
1418
 
1400
1419
  /** Available only in secure contexts. */
1401
1420
  interface FileSystemFileHandle extends FileSystemHandle {
1421
+ readonly kind: "file";
1402
1422
  getFile(): Promise<File>;
1403
1423
  }
1404
1424
 
@@ -1963,6 +1983,29 @@ interface KHR_parallel_shader_compile {
1963
1983
  readonly COMPLETION_STATUS_KHR: GLenum;
1964
1984
  }
1965
1985
 
1986
+ /** Available only in secure contexts. */
1987
+ interface Lock {
1988
+ readonly mode: LockMode;
1989
+ readonly name: string;
1990
+ }
1991
+
1992
+ declare var Lock: {
1993
+ prototype: Lock;
1994
+ new(): Lock;
1995
+ };
1996
+
1997
+ /** Available only in secure contexts. */
1998
+ interface LockManager {
1999
+ query(): Promise<LockManagerSnapshot>;
2000
+ request(name: string, callback: LockGrantedCallback): Promise<any>;
2001
+ request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
2002
+ }
2003
+
2004
+ declare var LockManager: {
2005
+ prototype: LockManager;
2006
+ new(): LockManager;
2007
+ };
2008
+
1966
2009
  interface MediaCapabilities {
1967
2010
  decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
1968
2011
  encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
@@ -5355,6 +5398,10 @@ declare namespace WebAssembly {
5355
5398
  function validate(bytes: BufferSource): boolean;
5356
5399
  }
5357
5400
 
5401
+ interface LockGrantedCallback {
5402
+ (lock: Lock | null): any;
5403
+ }
5404
+
5358
5405
  interface OnErrorEventHandlerNonNull {
5359
5406
  (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5360
5407
  }
@@ -5519,6 +5566,7 @@ type ImageOrientation = "flipY" | "none";
5519
5566
  type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
5520
5567
  type KeyType = "private" | "public" | "secret";
5521
5568
  type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
5569
+ type LockMode = "exclusive" | "shared";
5522
5570
  type MediaDecodingType = "file" | "media-source" | "webrtc";
5523
5571
  type MediaEncodingType = "record" | "webrtc";
5524
5572
  type NotificationDirection = "auto" | "ltr" | "rtl";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sharedworker",
3
- "version": "0.0.61",
3
+ "version": "0.0.65",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "MIT",
6
6
  "contributors": [],