@types/serviceworker 0.0.40 → 0.0.43

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.40 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.40.
31
+ You can read what changed in version 0.0.43 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.43.
package/index.d.ts CHANGED
@@ -253,6 +253,10 @@ interface IDBObjectStoreParameters {
253
253
  keyPath?: string | string[] | null;
254
254
  }
255
255
 
256
+ interface IDBTransactionOptions {
257
+ durability?: IDBTransactionDurability;
258
+ }
259
+
256
260
  interface IDBVersionChangeEventInit extends EventInit {
257
261
  newVersion?: number | null;
258
262
  oldVersion?: number;
@@ -462,12 +466,12 @@ interface QueuingStrategyInit {
462
466
  highWaterMark: number;
463
467
  }
464
468
 
465
- interface ReadableStreamDefaultReadDoneResult {
469
+ interface ReadableStreamReadDoneResult {
466
470
  done: true;
467
471
  value?: undefined;
468
472
  }
469
473
 
470
- interface ReadableStreamDefaultReadValueResult<T> {
474
+ interface ReadableStreamReadValueResult<T> {
471
475
  done: false;
472
476
  value: T;
473
477
  }
@@ -694,6 +698,7 @@ interface AbortSignal extends EventTarget {
694
698
  readonly aborted: boolean;
695
699
  onabort: ((this: AbortSignal, ev: Event) => any) | null;
696
700
  readonly reason: any;
701
+ throwIfAborted(): void;
697
702
  addEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
698
703
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
699
704
  removeEventListener<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -1386,7 +1391,7 @@ declare var EventTarget: {
1386
1391
 
1387
1392
  /** Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. */
1388
1393
  interface ExtendableEvent extends Event {
1389
- waitUntil(f: any): void;
1394
+ waitUntil(f: Promise<any>): void;
1390
1395
  }
1391
1396
 
1392
1397
  declare var ExtendableEvent: {
@@ -1707,7 +1712,7 @@ interface IDBDatabase extends EventTarget {
1707
1712
  */
1708
1713
  deleteObjectStore(name: string): void;
1709
1714
  /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
1710
- transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
1715
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
1711
1716
  addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1712
1717
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1713
1718
  removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
@@ -2193,7 +2198,6 @@ interface NavigatorID {
2193
2198
  readonly appName: string;
2194
2199
  /** @deprecated */
2195
2200
  readonly appVersion: string;
2196
- /** @deprecated */
2197
2201
  readonly platform: string;
2198
2202
  /** @deprecated */
2199
2203
  readonly product: string;
@@ -2210,10 +2214,6 @@ interface NavigatorLocks {
2210
2214
  readonly locks: LockManager;
2211
2215
  }
2212
2216
 
2213
- interface NavigatorNetworkInformation {
2214
- readonly connection: NetworkInformation;
2215
- }
2216
-
2217
2217
  interface NavigatorOnLine {
2218
2218
  readonly onLine: boolean;
2219
2219
  }
@@ -2223,15 +2223,6 @@ interface NavigatorStorage {
2223
2223
  readonly storage: StorageManager;
2224
2224
  }
2225
2225
 
2226
- interface NetworkInformation extends EventTarget {
2227
- readonly type: ConnectionType;
2228
- }
2229
-
2230
- declare var NetworkInformation: {
2231
- prototype: NetworkInformation;
2232
- new(): NetworkInformation;
2233
- };
2234
-
2235
2226
  interface NotificationEventMap {
2236
2227
  "click": Event;
2237
2228
  "close": Event;
@@ -2613,7 +2604,7 @@ declare var ReadableStreamDefaultController: {
2613
2604
  };
2614
2605
 
2615
2606
  interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
2616
- read(): Promise<ReadableStreamDefaultReadResult<R>>;
2607
+ read(): Promise<ReadableStreamReadResult<R>>;
2617
2608
  releaseLock(): void;
2618
2609
  }
2619
2610
 
@@ -5193,7 +5184,7 @@ declare var WorkerLocation: {
5193
5184
  };
5194
5185
 
5195
5186
  /** A subset of the Navigator interface allowed to be accessed from a Worker. Such an object is initialized for each worker and is available via the WorkerGlobalScope.navigator property obtained by calling window.self.navigator. */
5196
- interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorNetworkInformation, NavigatorOnLine, NavigatorStorage {
5187
+ interface WorkerNavigator extends NavigatorConcurrentHardware, NavigatorID, NavigatorLanguage, NavigatorLocks, NavigatorOnLine, NavigatorStorage {
5197
5188
  readonly mediaCapabilities: MediaCapabilities;
5198
5189
  }
5199
5190
 
@@ -5544,7 +5535,7 @@ type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
5544
5535
  type PerformanceEntryList = PerformanceEntry[];
5545
5536
  type PushMessageDataInit = BufferSource | string;
5546
5537
  type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
5547
- type ReadableStreamDefaultReadResult<T> = ReadableStreamDefaultReadValueResult<T> | ReadableStreamDefaultReadDoneResult;
5538
+ type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult;
5548
5539
  type ReadableStreamReader<T> = ReadableStreamDefaultReader<T>;
5549
5540
  type RequestInfo = Request | string;
5550
5541
  type TexImageSource = ImageBitmap | ImageData | OffscreenCanvas;
@@ -5557,7 +5548,6 @@ type BinaryType = "arraybuffer" | "blob";
5557
5548
  type ClientTypes = "all" | "sharedworker" | "window" | "worker";
5558
5549
  type ColorGamut = "p3" | "rec2020" | "srgb";
5559
5550
  type ColorSpaceConversion = "default" | "none";
5560
- type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
5561
5551
  type DocumentVisibilityState = "hidden" | "visible";
5562
5552
  type EndingType = "native" | "transparent";
5563
5553
  type FileSystemHandleKind = "directory" | "file";
package/iterable.d.ts CHANGED
@@ -39,7 +39,7 @@ interface Headers {
39
39
 
40
40
  interface IDBDatabase {
41
41
  /** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */
42
- transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode): IDBTransaction;
42
+ transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
43
43
  }
44
44
 
45
45
  interface IDBObjectStore {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/serviceworker",
3
- "version": "0.0.40",
3
+ "version": "0.0.43",
4
4
  "description": "Types for the global scope of Service Workers",
5
5
  "license": "MIT",
6
6
  "contributors": [],