@types/sharedworker 0.0.61 → 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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +46 -0
  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.62 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.62.
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
  }
@@ -1963,6 +1981,29 @@ interface KHR_parallel_shader_compile {
1963
1981
  readonly COMPLETION_STATUS_KHR: GLenum;
1964
1982
  }
1965
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
+
1966
2007
  interface MediaCapabilities {
1967
2008
  decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
1968
2009
  encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
@@ -5355,6 +5396,10 @@ declare namespace WebAssembly {
5355
5396
  function validate(bytes: BufferSource): boolean;
5356
5397
  }
5357
5398
 
5399
+ interface LockGrantedCallback {
5400
+ (lock: Lock | null): any;
5401
+ }
5402
+
5358
5403
  interface OnErrorEventHandlerNonNull {
5359
5404
  (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5360
5405
  }
@@ -5519,6 +5564,7 @@ type ImageOrientation = "flipY" | "none";
5519
5564
  type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
5520
5565
  type KeyType = "private" | "public" | "secret";
5521
5566
  type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
5567
+ type LockMode = "exclusive" | "shared";
5522
5568
  type MediaDecodingType = "file" | "media-source" | "webrtc";
5523
5569
  type MediaEncodingType = "record" | "webrtc";
5524
5570
  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.62",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "MIT",
6
6
  "contributors": [],