@types/serviceworker 0.0.31 → 0.0.35
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 +104 -7
- 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.35 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.35.
|
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 {
|
|
@@ -667,7 +697,7 @@ interface AbortSignal extends EventTarget {
|
|
|
667
697
|
declare var AbortSignal: {
|
|
668
698
|
prototype: AbortSignal;
|
|
669
699
|
new(): AbortSignal;
|
|
670
|
-
abort(reason?: any): AbortSignal;
|
|
700
|
+
// abort(reason?: any): AbortSignal; - To be re-added in the future
|
|
671
701
|
};
|
|
672
702
|
|
|
673
703
|
interface AbstractWorkerEventMap {
|
|
@@ -1452,6 +1482,43 @@ declare var FileReader: {
|
|
|
1452
1482
|
readonly LOADING: number;
|
|
1453
1483
|
};
|
|
1454
1484
|
|
|
1485
|
+
/** Available only in secure contexts. */
|
|
1486
|
+
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
|
1487
|
+
readonly kind: "directory";
|
|
1488
|
+
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
|
1489
|
+
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
|
1490
|
+
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
|
1491
|
+
resolve(possibleDescendant: FileSystemHandle): Promise<string[] | null>;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
declare var FileSystemDirectoryHandle: {
|
|
1495
|
+
prototype: FileSystemDirectoryHandle;
|
|
1496
|
+
new(): FileSystemDirectoryHandle;
|
|
1497
|
+
};
|
|
1498
|
+
|
|
1499
|
+
/** Available only in secure contexts. */
|
|
1500
|
+
interface FileSystemFileHandle extends FileSystemHandle {
|
|
1501
|
+
readonly kind: "file";
|
|
1502
|
+
getFile(): Promise<File>;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
declare var FileSystemFileHandle: {
|
|
1506
|
+
prototype: FileSystemFileHandle;
|
|
1507
|
+
new(): FileSystemFileHandle;
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
/** Available only in secure contexts. */
|
|
1511
|
+
interface FileSystemHandle {
|
|
1512
|
+
readonly kind: FileSystemHandleKind;
|
|
1513
|
+
readonly name: string;
|
|
1514
|
+
isSameEntry(other: FileSystemHandle): Promise<boolean>;
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
declare var FileSystemHandle: {
|
|
1518
|
+
prototype: FileSystemHandle;
|
|
1519
|
+
new(): FileSystemHandle;
|
|
1520
|
+
};
|
|
1521
|
+
|
|
1455
1522
|
interface FontFace {
|
|
1456
1523
|
ascentOverride: string;
|
|
1457
1524
|
descentOverride: string;
|
|
@@ -1996,6 +2063,29 @@ interface KHR_parallel_shader_compile {
|
|
|
1996
2063
|
readonly COMPLETION_STATUS_KHR: GLenum;
|
|
1997
2064
|
}
|
|
1998
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
|
+
|
|
1999
2089
|
interface MediaCapabilities {
|
|
2000
2090
|
decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
|
|
2001
2091
|
encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
|
|
@@ -2712,6 +2802,7 @@ declare var ServiceWorkerRegistration: {
|
|
|
2712
2802
|
/** Available only in secure contexts. */
|
|
2713
2803
|
interface StorageManager {
|
|
2714
2804
|
estimate(): Promise<StorageEstimate>;
|
|
2805
|
+
getDirectory(): Promise<FileSystemDirectoryHandle>;
|
|
2715
2806
|
persisted(): Promise<boolean>;
|
|
2716
2807
|
}
|
|
2717
2808
|
|
|
@@ -5015,8 +5106,8 @@ interface WindowOrWorkerGlobalScope {
|
|
|
5015
5106
|
readonly performance: Performance;
|
|
5016
5107
|
atob(data: string): string;
|
|
5017
5108
|
btoa(data: string): string;
|
|
5018
|
-
clearInterval(
|
|
5019
|
-
clearTimeout(
|
|
5109
|
+
clearInterval(id?: number): void;
|
|
5110
|
+
clearTimeout(id?: number): void;
|
|
5020
5111
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5021
5112
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5022
5113
|
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
@@ -5270,7 +5361,7 @@ declare namespace WebAssembly {
|
|
|
5270
5361
|
|
|
5271
5362
|
type ImportExportKind = "function" | "global" | "memory" | "table";
|
|
5272
5363
|
type TableKind = "anyfunc" | "externref";
|
|
5273
|
-
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
|
|
5364
|
+
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
|
|
5274
5365
|
type ExportValue = Function | Global | Memory | Table;
|
|
5275
5366
|
type Exports = Record<string, ExportValue>;
|
|
5276
5367
|
type ImportValue = ExportValue | number;
|
|
@@ -5284,6 +5375,10 @@ declare namespace WebAssembly {
|
|
|
5284
5375
|
function validate(bytes: BufferSource): boolean;
|
|
5285
5376
|
}
|
|
5286
5377
|
|
|
5378
|
+
interface LockGrantedCallback {
|
|
5379
|
+
(lock: Lock | null): any;
|
|
5380
|
+
}
|
|
5381
|
+
|
|
5287
5382
|
interface OnErrorEventHandlerNonNull {
|
|
5288
5383
|
(event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
|
|
5289
5384
|
}
|
|
@@ -5380,8 +5475,8 @@ declare var origin: string;
|
|
|
5380
5475
|
declare var performance: Performance;
|
|
5381
5476
|
declare function atob(data: string): string;
|
|
5382
5477
|
declare function btoa(data: string): string;
|
|
5383
|
-
declare function clearInterval(
|
|
5384
|
-
declare function clearTimeout(
|
|
5478
|
+
declare function clearInterval(id?: number): void;
|
|
5479
|
+
declare function clearTimeout(id?: number): void;
|
|
5385
5480
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5386
5481
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5387
5482
|
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
@@ -5444,6 +5539,7 @@ type ColorSpaceConversion = "default" | "none";
|
|
|
5444
5539
|
type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
|
|
5445
5540
|
type DocumentVisibilityState = "hidden" | "visible";
|
|
5446
5541
|
type EndingType = "native" | "transparent";
|
|
5542
|
+
type FileSystemHandleKind = "directory" | "file";
|
|
5447
5543
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
5448
5544
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
5449
5545
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
@@ -5456,6 +5552,7 @@ type ImageOrientation = "flipY" | "none";
|
|
|
5456
5552
|
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
5457
5553
|
type KeyType = "private" | "public" | "secret";
|
|
5458
5554
|
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
|
|
5555
|
+
type LockMode = "exclusive" | "shared";
|
|
5459
5556
|
type MediaDecodingType = "file" | "media-source" | "webrtc";
|
|
5460
5557
|
type MediaEncodingType = "record" | "webrtc";
|
|
5461
5558
|
type NotificationDirection = "auto" | "ltr" | "rtl";
|