@types/serviceworker 0.0.32 → 0.0.36

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.32 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.32.
31
+ You can read what changed in version 0.0.36 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.36.
package/index.d.ts CHANGED
@@ -304,6 +304,24 @@ interface KeyAlgorithm {
304
304
  name: string;
305
305
  }
306
306
 
307
+ interface LockInfo {
308
+ clientId?: string;
309
+ mode?: LockMode;
310
+ name?: string;
311
+ }
312
+
313
+ interface LockManagerSnapshot {
314
+ held?: LockInfo[];
315
+ pending?: LockInfo[];
316
+ }
317
+
318
+ interface LockOptions {
319
+ ifAvailable?: boolean;
320
+ mode?: LockMode;
321
+ signal?: AbortSignal;
322
+ steal?: boolean;
323
+ }
324
+
307
325
  interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
308
326
  configuration?: MediaDecodingConfiguration;
309
327
  }
@@ -679,7 +697,7 @@ interface AbortSignal extends EventTarget {
679
697
  declare var AbortSignal: {
680
698
  prototype: AbortSignal;
681
699
  new(): AbortSignal;
682
- abort(reason?: any): AbortSignal;
700
+ // abort(reason?: any): AbortSignal; - To be re-added in the future
683
701
  };
684
702
 
685
703
  interface AbstractWorkerEventMap {
@@ -700,7 +718,7 @@ interface Blob {
700
718
  readonly type: string;
701
719
  arrayBuffer(): Promise<ArrayBuffer>;
702
720
  slice(start?: number, end?: number, contentType?: string): Blob;
703
- stream(): ReadableStream;
721
+ stream(): ReadableStream<Uint8Array>;
704
722
  text(): Promise<string>;
705
723
  }
706
724
 
@@ -1466,6 +1484,7 @@ declare var FileReader: {
1466
1484
 
1467
1485
  /** Available only in secure contexts. */
1468
1486
  interface FileSystemDirectoryHandle extends FileSystemHandle {
1487
+ readonly kind: "directory";
1469
1488
  getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
1470
1489
  getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
1471
1490
  removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
@@ -1479,6 +1498,7 @@ declare var FileSystemDirectoryHandle: {
1479
1498
 
1480
1499
  /** Available only in secure contexts. */
1481
1500
  interface FileSystemFileHandle extends FileSystemHandle {
1501
+ readonly kind: "file";
1482
1502
  getFile(): Promise<File>;
1483
1503
  }
1484
1504
 
@@ -2043,6 +2063,29 @@ interface KHR_parallel_shader_compile {
2043
2063
  readonly COMPLETION_STATUS_KHR: GLenum;
2044
2064
  }
2045
2065
 
2066
+ /** Available only in secure contexts. */
2067
+ interface Lock {
2068
+ readonly mode: LockMode;
2069
+ readonly name: string;
2070
+ }
2071
+
2072
+ declare var Lock: {
2073
+ prototype: Lock;
2074
+ new(): Lock;
2075
+ };
2076
+
2077
+ /** Available only in secure contexts. */
2078
+ interface LockManager {
2079
+ query(): Promise<LockManagerSnapshot>;
2080
+ request(name: string, callback: LockGrantedCallback): Promise<any>;
2081
+ request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
2082
+ }
2083
+
2084
+ declare var LockManager: {
2085
+ prototype: LockManager;
2086
+ new(): LockManager;
2087
+ };
2088
+
2046
2089
  interface MediaCapabilities {
2047
2090
  decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
2048
2091
  encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
@@ -5332,6 +5375,10 @@ declare namespace WebAssembly {
5332
5375
  function validate(bytes: BufferSource): boolean;
5333
5376
  }
5334
5377
 
5378
+ interface LockGrantedCallback {
5379
+ (lock: Lock | null): any;
5380
+ }
5381
+
5335
5382
  interface OnErrorEventHandlerNonNull {
5336
5383
  (event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
5337
5384
  }
@@ -5505,6 +5552,7 @@ type ImageOrientation = "flipY" | "none";
5505
5552
  type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
5506
5553
  type KeyType = "private" | "public" | "secret";
5507
5554
  type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
5555
+ type LockMode = "exclusive" | "shared";
5508
5556
  type MediaDecodingType = "file" | "media-source" | "webrtc";
5509
5557
  type MediaEncodingType = "record" | "webrtc";
5510
5558
  type NotificationDirection = "auto" | "ltr" | "rtl";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/serviceworker",
3
- "version": "0.0.32",
3
+ "version": "0.0.36",
4
4
  "description": "Types for the global scope of Service Workers",
5
5
  "license": "MIT",
6
6
  "contributors": [],