@types/serviceworker 0.0.43 → 0.0.46

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 +10 -5
  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.43 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.43.
31
+ You can read what changed in version 0.0.46 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.46.
package/index.d.ts CHANGED
@@ -956,6 +956,7 @@ declare var CustomEvent: {
956
956
 
957
957
  /** An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. */
958
958
  interface DOMException extends Error {
959
+ /** @deprecated */
959
960
  readonly code: number;
960
961
  readonly message: string;
961
962
  readonly name: string;
@@ -2555,6 +2556,7 @@ declare var PushMessageData: {
2555
2556
  */
2556
2557
  interface PushSubscription {
2557
2558
  readonly endpoint: string;
2559
+ readonly expirationTime: EpochTimeStamp | null;
2558
2560
  readonly options: PushSubscriptionOptions;
2559
2561
  getKey(name: PushEncryptionKeyName): ArrayBuffer | null;
2560
2562
  toJSON(): PushSubscriptionJSON;
@@ -2773,6 +2775,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
2773
2775
  onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
2774
2776
  onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
2775
2777
  readonly registration: ServiceWorkerRegistration;
2778
+ readonly serviceWorker: ServiceWorker;
2776
2779
  skipWaiting(): Promise<void>;
2777
2780
  addEventListener<K extends keyof ServiceWorkerGlobalScopeEventMap>(type: K, listener: (this: ServiceWorkerGlobalScope, ev: ServiceWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2778
2781
  addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
@@ -5116,8 +5119,8 @@ interface WindowOrWorkerGlobalScope {
5116
5119
  readonly performance: Performance;
5117
5120
  atob(data: string): string;
5118
5121
  btoa(data: string): string;
5119
- clearInterval(id?: number): void;
5120
- clearTimeout(id?: number): void;
5122
+ clearInterval(id: number | undefined): void;
5123
+ clearTimeout(id: number | undefined): void;
5121
5124
  createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5122
5125
  createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5123
5126
  fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
@@ -5208,6 +5211,7 @@ declare var WritableStream: {
5208
5211
 
5209
5212
  /** 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. */
5210
5213
  interface WritableStreamDefaultController {
5214
+ readonly signal: AbortSignal;
5211
5215
  error(e?: any): void;
5212
5216
  }
5213
5217
 
@@ -5456,6 +5460,7 @@ declare var onnotificationclick: ((this: ServiceWorkerGlobalScope, ev: Notificat
5456
5460
  declare var onnotificationclose: ((this: ServiceWorkerGlobalScope, ev: NotificationEvent) => any) | null;
5457
5461
  declare var onpush: ((this: ServiceWorkerGlobalScope, ev: PushEvent) => any) | null;
5458
5462
  declare var registration: ServiceWorkerRegistration;
5463
+ declare var serviceWorker: ServiceWorker;
5459
5464
  declare function skipWaiting(): Promise<void>;
5460
5465
  /** 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. */
5461
5466
  declare function dispatchEvent(event: Event): boolean;
@@ -5486,8 +5491,8 @@ declare var origin: string;
5486
5491
  declare var performance: Performance;
5487
5492
  declare function atob(data: string): string;
5488
5493
  declare function btoa(data: string): string;
5489
- declare function clearInterval(id?: number): void;
5490
- declare function clearTimeout(id?: number): void;
5494
+ declare function clearInterval(id: number | undefined): void;
5495
+ declare function clearTimeout(id: number | undefined): void;
5491
5496
  declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5492
5497
  declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
5493
5498
  declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
@@ -5525,7 +5530,7 @@ type GLsizeiptr = number;
5525
5530
  type GLuint = number;
5526
5531
  type GLuint64 = number;
5527
5532
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
5528
- type HeadersInit = string[][] | Record<string, string> | Headers;
5533
+ type HeadersInit = [string, string][] | Record<string, string> | Headers;
5529
5534
  type IDBValidKey = number | string | Date | BufferSource | IDBValidKey[];
5530
5535
  type ImageBitmapSource = CanvasImageSource | Blob | ImageData;
5531
5536
  type Int32List = Int32Array | GLint[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/serviceworker",
3
- "version": "0.0.43",
3
+ "version": "0.0.46",
4
4
  "description": "Types for the global scope of Service Workers",
5
5
  "license": "MIT",
6
6
  "contributors": [],