@types/serviceworker 0.0.30 → 0.0.34
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 +105 -10
- 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.34 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.34.
|
package/index.d.ts
CHANGED
|
@@ -192,6 +192,18 @@ interface FilePropertyBag extends BlobPropertyBag {
|
|
|
192
192
|
lastModified?: number;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
interface FileSystemGetDirectoryOptions {
|
|
196
|
+
create?: boolean;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface FileSystemGetFileOptions {
|
|
200
|
+
create?: boolean;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
interface FileSystemRemoveOptions {
|
|
204
|
+
recursive?: boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
195
207
|
interface FontFaceDescriptors {
|
|
196
208
|
display?: string;
|
|
197
209
|
featureSettings?: string;
|
|
@@ -292,6 +304,24 @@ interface KeyAlgorithm {
|
|
|
292
304
|
name: string;
|
|
293
305
|
}
|
|
294
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
|
+
|
|
295
325
|
interface MediaCapabilitiesDecodingInfo extends MediaCapabilitiesInfo {
|
|
296
326
|
configuration?: MediaDecodingConfiguration;
|
|
297
327
|
}
|
|
@@ -560,7 +590,7 @@ interface StreamPipeOptions {
|
|
|
560
590
|
}
|
|
561
591
|
|
|
562
592
|
interface StructuredSerializeOptions {
|
|
563
|
-
transfer?:
|
|
593
|
+
transfer?: Transferable[];
|
|
564
594
|
}
|
|
565
595
|
|
|
566
596
|
interface TextDecodeOptions {
|
|
@@ -641,7 +671,7 @@ interface AbortController {
|
|
|
641
671
|
/** Returns the AbortSignal object associated with this object. */
|
|
642
672
|
readonly signal: AbortSignal;
|
|
643
673
|
/** Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted. */
|
|
644
|
-
abort(): void;
|
|
674
|
+
abort(reason?: any): void;
|
|
645
675
|
}
|
|
646
676
|
|
|
647
677
|
declare var AbortController: {
|
|
@@ -667,7 +697,7 @@ interface AbortSignal extends EventTarget {
|
|
|
667
697
|
declare var AbortSignal: {
|
|
668
698
|
prototype: AbortSignal;
|
|
669
699
|
new(): AbortSignal;
|
|
670
|
-
// abort(): AbortSignal; - To be re-added in the future
|
|
700
|
+
// abort(reason?: any): AbortSignal; - To be re-added in the future
|
|
671
701
|
};
|
|
672
702
|
|
|
673
703
|
interface AbstractWorkerEventMap {
|
|
@@ -1452,6 +1482,41 @@ declare var FileReader: {
|
|
|
1452
1482
|
readonly LOADING: number;
|
|
1453
1483
|
};
|
|
1454
1484
|
|
|
1485
|
+
/** Available only in secure contexts. */
|
|
1486
|
+
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
|
1487
|
+
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
|
1488
|
+
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
|
1489
|
+
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
|
1490
|
+
resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
|
+
declare var FileSystemDirectoryHandle: {
|
|
1494
|
+
prototype: FileSystemDirectoryHandle;
|
|
1495
|
+
new(): FileSystemDirectoryHandle;
|
|
1496
|
+
};
|
|
1497
|
+
|
|
1498
|
+
/** Available only in secure contexts. */
|
|
1499
|
+
interface FileSystemFileHandle extends FileSystemHandle {
|
|
1500
|
+
getFile(): Promise<File>;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
declare var FileSystemFileHandle: {
|
|
1504
|
+
prototype: FileSystemFileHandle;
|
|
1505
|
+
new(): FileSystemFileHandle;
|
|
1506
|
+
};
|
|
1507
|
+
|
|
1508
|
+
/** Available only in secure contexts. */
|
|
1509
|
+
interface FileSystemHandle {
|
|
1510
|
+
readonly kind: FileSystemHandleKind;
|
|
1511
|
+
readonly name: string;
|
|
1512
|
+
isSameEntry(other: FileSystemHandle): Promise<boolean>;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
declare var FileSystemHandle: {
|
|
1516
|
+
prototype: FileSystemHandle;
|
|
1517
|
+
new(): FileSystemHandle;
|
|
1518
|
+
};
|
|
1519
|
+
|
|
1455
1520
|
interface FontFace {
|
|
1456
1521
|
ascentOverride: string;
|
|
1457
1522
|
descentOverride: string;
|
|
@@ -1996,6 +2061,29 @@ interface KHR_parallel_shader_compile {
|
|
|
1996
2061
|
readonly COMPLETION_STATUS_KHR: GLenum;
|
|
1997
2062
|
}
|
|
1998
2063
|
|
|
2064
|
+
/** Available only in secure contexts. */
|
|
2065
|
+
interface Lock {
|
|
2066
|
+
readonly mode: LockMode;
|
|
2067
|
+
readonly name: string;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
declare var Lock: {
|
|
2071
|
+
prototype: Lock;
|
|
2072
|
+
new(): Lock;
|
|
2073
|
+
};
|
|
2074
|
+
|
|
2075
|
+
/** Available only in secure contexts. */
|
|
2076
|
+
interface LockManager {
|
|
2077
|
+
query(): Promise<LockManagerSnapshot>;
|
|
2078
|
+
request(name: string, callback: LockGrantedCallback): Promise<any>;
|
|
2079
|
+
request(name: string, options: LockOptions, callback: LockGrantedCallback): Promise<any>;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
declare var LockManager: {
|
|
2083
|
+
prototype: LockManager;
|
|
2084
|
+
new(): LockManager;
|
|
2085
|
+
};
|
|
2086
|
+
|
|
1999
2087
|
interface MediaCapabilities {
|
|
2000
2088
|
decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
|
|
2001
2089
|
encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
|
|
@@ -2712,6 +2800,7 @@ declare var ServiceWorkerRegistration: {
|
|
|
2712
2800
|
/** Available only in secure contexts. */
|
|
2713
2801
|
interface StorageManager {
|
|
2714
2802
|
estimate(): Promise<StorageEstimate>;
|
|
2803
|
+
getDirectory(): Promise<FileSystemDirectoryHandle>;
|
|
2715
2804
|
persisted(): Promise<boolean>;
|
|
2716
2805
|
}
|
|
2717
2806
|
|
|
@@ -4994,7 +5083,7 @@ declare var WebSocket: {
|
|
|
4994
5083
|
/** This ServiceWorker API interface represents the scope of a service worker client that is a document in a browser context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources. */
|
|
4995
5084
|
interface WindowClient extends Client {
|
|
4996
5085
|
readonly focused: boolean;
|
|
4997
|
-
readonly visibilityState:
|
|
5086
|
+
readonly visibilityState: DocumentVisibilityState;
|
|
4998
5087
|
focus(): Promise<WindowClient>;
|
|
4999
5088
|
navigate(url: string | URL): Promise<WindowClient | null>;
|
|
5000
5089
|
}
|
|
@@ -5015,8 +5104,8 @@ interface WindowOrWorkerGlobalScope {
|
|
|
5015
5104
|
readonly performance: Performance;
|
|
5016
5105
|
atob(data: string): string;
|
|
5017
5106
|
btoa(data: string): string;
|
|
5018
|
-
clearInterval(
|
|
5019
|
-
clearTimeout(
|
|
5107
|
+
clearInterval(id?: number): void;
|
|
5108
|
+
clearTimeout(id?: number): void;
|
|
5020
5109
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5021
5110
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5022
5111
|
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
@@ -5270,7 +5359,7 @@ declare namespace WebAssembly {
|
|
|
5270
5359
|
|
|
5271
5360
|
type ImportExportKind = "function" | "global" | "memory" | "table";
|
|
5272
5361
|
type TableKind = "anyfunc" | "externref";
|
|
5273
|
-
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
|
|
5362
|
+
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
|
|
5274
5363
|
type ExportValue = Function | Global | Memory | Table;
|
|
5275
5364
|
type Exports = Record<string, ExportValue>;
|
|
5276
5365
|
type ImportValue = ExportValue | number;
|
|
@@ -5284,6 +5373,10 @@ declare namespace WebAssembly {
|
|
|
5284
5373
|
function validate(bytes: BufferSource): boolean;
|
|
5285
5374
|
}
|
|
5286
5375
|
|
|
5376
|
+
interface LockGrantedCallback {
|
|
5377
|
+
(lock: Lock | null): any;
|
|
5378
|
+
}
|
|
5379
|
+
|
|
5287
5380
|
interface OnErrorEventHandlerNonNull {
|
|
5288
5381
|
(event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
|
|
5289
5382
|
}
|
|
@@ -5380,8 +5473,8 @@ declare var origin: string;
|
|
|
5380
5473
|
declare var performance: Performance;
|
|
5381
5474
|
declare function atob(data: string): string;
|
|
5382
5475
|
declare function btoa(data: string): string;
|
|
5383
|
-
declare function clearInterval(
|
|
5384
|
-
declare function clearTimeout(
|
|
5476
|
+
declare function clearInterval(id?: number): void;
|
|
5477
|
+
declare function clearTimeout(id?: number): void;
|
|
5385
5478
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5386
5479
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5387
5480
|
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
@@ -5442,7 +5535,9 @@ type ClientTypes = "all" | "sharedworker" | "window" | "worker";
|
|
|
5442
5535
|
type ColorGamut = "p3" | "rec2020" | "srgb";
|
|
5443
5536
|
type ColorSpaceConversion = "default" | "none";
|
|
5444
5537
|
type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
|
|
5538
|
+
type DocumentVisibilityState = "hidden" | "visible";
|
|
5445
5539
|
type EndingType = "native" | "transparent";
|
|
5540
|
+
type FileSystemHandleKind = "directory" | "file";
|
|
5446
5541
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
5447
5542
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
5448
5543
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
@@ -5455,6 +5550,7 @@ type ImageOrientation = "flipY" | "none";
|
|
|
5455
5550
|
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
5456
5551
|
type KeyType = "private" | "public" | "secret";
|
|
5457
5552
|
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
|
|
5553
|
+
type LockMode = "exclusive" | "shared";
|
|
5458
5554
|
type MediaDecodingType = "file" | "media-source" | "webrtc";
|
|
5459
5555
|
type MediaEncodingType = "record" | "webrtc";
|
|
5460
5556
|
type NotificationDirection = "auto" | "ltr" | "rtl";
|
|
@@ -5476,6 +5572,5 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
|
|
|
5476
5572
|
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
|
|
5477
5573
|
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
|
5478
5574
|
type TransferFunction = "hlg" | "pq" | "srgb";
|
|
5479
|
-
type VisibilityState = "hidden" | "visible";
|
|
5480
5575
|
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
|
|
5481
5576
|
type WorkerType = "classic" | "module";
|