@types/serviceworker 0.0.42 → 0.0.45
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 +1 -1
- package/index.d.ts +15 -7
- package/iterable.d.ts +1 -1
- 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.
|
|
31
|
+
You can read what changed in version 0.0.45 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.45.
|
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;
|
|
@@ -952,6 +956,7 @@ declare var CustomEvent: {
|
|
|
952
956
|
|
|
953
957
|
/** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
|
|
954
958
|
interface DOMException extends Error {
|
|
959
|
+
/** @deprecated */
|
|
955
960
|
readonly code: number;
|
|
956
961
|
readonly message: string;
|
|
957
962
|
readonly name: string;
|
|
@@ -1387,7 +1392,7 @@ declare var EventTarget: {
|
|
|
1387
1392
|
|
|
1388
1393
|
/** 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. */
|
|
1389
1394
|
interface ExtendableEvent extends Event {
|
|
1390
|
-
waitUntil(f: any): void;
|
|
1395
|
+
waitUntil(f: Promise<any>): void;
|
|
1391
1396
|
}
|
|
1392
1397
|
|
|
1393
1398
|
declare var ExtendableEvent: {
|
|
@@ -1708,7 +1713,7 @@ interface IDBDatabase extends EventTarget {
|
|
|
1708
1713
|
*/
|
|
1709
1714
|
deleteObjectStore(name: string): void;
|
|
1710
1715
|
/** 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. */
|
|
1711
|
-
transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction;
|
|
1716
|
+
transaction(storeNames: string | string[], mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
|
|
1712
1717
|
addEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
1713
1718
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
1714
1719
|
removeEventListener<K extends keyof IDBDatabaseEventMap>(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
@@ -2769,6 +2774,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
2769
2774
|
onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
|
|
2770
2775
|
onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
2771
2776
|
readonly registration: ServiceWorkerRegistration;
|
|
2777
|
+
readonly serviceWorker: ServiceWorker;
|
|
2772
2778
|
skipWaiting(): Promise<void>;
|
|
2773
2779
|
addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2774
2780
|
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -5112,8 +5118,8 @@ interface WindowOrWorkerGlobalScope {
|
|
|
5112
5118
|
readonly performance: Performance;
|
|
5113
5119
|
atob(data: string): string;
|
|
5114
5120
|
btoa(data: string): string;
|
|
5115
|
-
clearInterval(id
|
|
5116
|
-
clearTimeout(id
|
|
5121
|
+
clearInterval(id: number | undefined): void;
|
|
5122
|
+
clearTimeout(id: number | undefined): void;
|
|
5117
5123
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5118
5124
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5119
5125
|
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
@@ -5204,6 +5210,7 @@ declare var WritableStream: {
|
|
|
5204
5210
|
|
|
5205
5211
|
/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
|
|
5206
5212
|
interface WritableStreamDefaultController {
|
|
5213
|
+
readonly signal: AbortSignal;
|
|
5207
5214
|
error(e?: any): void;
|
|
5208
5215
|
}
|
|
5209
5216
|
|
|
@@ -5452,6 +5459,7 @@ declare var onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: Notificat
|
|
|
5452
5459
|
declare var onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
|
|
5453
5460
|
declare var onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
|
|
5454
5461
|
declare var registration: ServiceWorkerRegistration;
|
|
5462
|
+
declare var serviceWorker: ServiceWorker;
|
|
5455
5463
|
declare function skipWaiting(): Promise<void>;
|
|
5456
5464
|
/** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
|
|
5457
5465
|
declare function dispatchEvent(event: Event): boolean;
|
|
@@ -5482,8 +5490,8 @@ declare var origin: string;
|
|
|
5482
5490
|
declare var performance: Performance;
|
|
5483
5491
|
declare function atob(data: string): string;
|
|
5484
5492
|
declare function btoa(data: string): string;
|
|
5485
|
-
declare function clearInterval(id
|
|
5486
|
-
declare function clearTimeout(id
|
|
5493
|
+
declare function clearInterval(id: number | undefined): void;
|
|
5494
|
+
declare function clearTimeout(id: number | undefined): void;
|
|
5487
5495
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5488
5496
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5489
5497
|
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
@@ -5521,7 +5529,7 @@ type GLsizeiptr = number;
|
|
|
5521
5529
|
type GLuint = number;
|
|
5522
5530
|
type GLuint64 = number;
|
|
5523
5531
|
type HashAlgorithmIdentifier = AlgorithmIdentifier;
|
|
5524
|
-
type HeadersInit = string
|
|
5532
|
+
type HeadersInit = [string, string][] | Record<string, string> | Headers;
|
|
5525
5533
|
type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
|
|
5526
5534
|
type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
|
|
5527
5535
|
type Int32List = Int32Array | GLint[];
|
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 {
|