@types/serviceworker 0.0.29 → 0.0.33
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 +116 -10
- package/iterable.d.ts +7 -0
- 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.33 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.33.
|
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
|
-
|
|
700
|
+
abort(reason?: any): AbortSignal;
|
|
671
701
|
};
|
|
672
702
|
|
|
673
703
|
interface AbstractWorkerEventMap {
|
|
@@ -876,6 +906,8 @@ interface Crypto {
|
|
|
876
906
|
/** Available only in secure contexts. */
|
|
877
907
|
readonly subtle: SubtleCrypto;
|
|
878
908
|
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
|
|
909
|
+
/** Available only in secure contexts. */
|
|
910
|
+
randomUUID(): string;
|
|
879
911
|
}
|
|
880
912
|
|
|
881
913
|
declare var Crypto: {
|
|
@@ -1450,6 +1482,41 @@ declare var FileReader: {
|
|
|
1450
1482
|
readonly LOADING: number;
|
|
1451
1483
|
};
|
|
1452
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
|
+
|
|
1453
1520
|
interface FontFace {
|
|
1454
1521
|
ascentOverride: string;
|
|
1455
1522
|
descentOverride: string;
|
|
@@ -1913,6 +1980,7 @@ interface IDBTransactionEventMap {
|
|
|
1913
1980
|
interface IDBTransaction extends EventTarget {
|
|
1914
1981
|
/** Returns the transaction's connection. */
|
|
1915
1982
|
readonly db: IDBDatabase;
|
|
1983
|
+
readonly durability: IDBTransactionDurability;
|
|
1916
1984
|
/** If the transaction was aborted, returns the error (a DOMException) providing the reason. */
|
|
1917
1985
|
readonly error: DOMException | null;
|
|
1918
1986
|
/** Returns the mode the transaction was created with ("readonly" or "readwrite"), or "versionchange" for an upgrade transaction. */
|
|
@@ -1993,6 +2061,29 @@ interface KHR_parallel_shader_compile {
|
|
|
1993
2061
|
readonly COMPLETION_STATUS_KHR: GLenum;
|
|
1994
2062
|
}
|
|
1995
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
|
+
|
|
1996
2087
|
interface MediaCapabilities {
|
|
1997
2088
|
decodingInfo(configuration: MediaDecodingConfiguration): Promise<MediaCapabilitiesDecodingInfo>;
|
|
1998
2089
|
encodingInfo(configuration: MediaEncodingConfiguration): Promise<MediaCapabilitiesEncodingInfo>;
|
|
@@ -2709,6 +2800,7 @@ declare var ServiceWorkerRegistration: {
|
|
|
2709
2800
|
/** Available only in secure contexts. */
|
|
2710
2801
|
interface StorageManager {
|
|
2711
2802
|
estimate(): Promise<StorageEstimate>;
|
|
2803
|
+
getDirectory(): Promise<FileSystemDirectoryHandle>;
|
|
2712
2804
|
persisted(): Promise<boolean>;
|
|
2713
2805
|
}
|
|
2714
2806
|
|
|
@@ -3043,6 +3135,13 @@ interface WEBGL_lose_context {
|
|
|
3043
3135
|
restoreContext(): void;
|
|
3044
3136
|
}
|
|
3045
3137
|
|
|
3138
|
+
interface WEBGL_multi_draw {
|
|
3139
|
+
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
3140
|
+
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | GLint[], firstsOffset: GLuint, countsList: Int32Array | GLsizei[], countsOffset: GLuint, drawcount: GLsizei): void;
|
|
3141
|
+
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, instanceCountsList: Int32Array | GLsizei[], instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
3142
|
+
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | GLint[], countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | GLsizei[], offsetsOffset: GLuint, drawcount: GLsizei): void;
|
|
3143
|
+
}
|
|
3144
|
+
|
|
3046
3145
|
interface WebGL2RenderingContext extends WebGL2RenderingContextBase, WebGL2RenderingContextOverloads, WebGLRenderingContextBase {
|
|
3047
3146
|
}
|
|
3048
3147
|
|
|
@@ -4984,7 +5083,7 @@ declare var WebSocket: {
|
|
|
4984
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. */
|
|
4985
5084
|
interface WindowClient extends Client {
|
|
4986
5085
|
readonly focused: boolean;
|
|
4987
|
-
readonly visibilityState:
|
|
5086
|
+
readonly visibilityState: DocumentVisibilityState;
|
|
4988
5087
|
focus(): Promise<WindowClient>;
|
|
4989
5088
|
navigate(url: string | URL): Promise<WindowClient | null>;
|
|
4990
5089
|
}
|
|
@@ -5005,8 +5104,8 @@ interface WindowOrWorkerGlobalScope {
|
|
|
5005
5104
|
readonly performance: Performance;
|
|
5006
5105
|
atob(data: string): string;
|
|
5007
5106
|
btoa(data: string): string;
|
|
5008
|
-
clearInterval(
|
|
5009
|
-
clearTimeout(
|
|
5107
|
+
clearInterval(id?: number): void;
|
|
5108
|
+
clearTimeout(id?: number): void;
|
|
5010
5109
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5011
5110
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5012
5111
|
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
@@ -5260,7 +5359,7 @@ declare namespace WebAssembly {
|
|
|
5260
5359
|
|
|
5261
5360
|
type ImportExportKind = "function" | "global" | "memory" | "table";
|
|
5262
5361
|
type TableKind = "anyfunc" | "externref";
|
|
5263
|
-
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64";
|
|
5362
|
+
type ValueType = "anyfunc" | "externref" | "f32" | "f64" | "i32" | "i64" | "v128";
|
|
5264
5363
|
type ExportValue = Function | Global | Memory | Table;
|
|
5265
5364
|
type Exports = Record<string, ExportValue>;
|
|
5266
5365
|
type ImportValue = ExportValue | number;
|
|
@@ -5274,6 +5373,10 @@ declare namespace WebAssembly {
|
|
|
5274
5373
|
function validate(bytes: BufferSource): boolean;
|
|
5275
5374
|
}
|
|
5276
5375
|
|
|
5376
|
+
interface LockGrantedCallback {
|
|
5377
|
+
(lock: Lock | null): any;
|
|
5378
|
+
}
|
|
5379
|
+
|
|
5277
5380
|
interface OnErrorEventHandlerNonNull {
|
|
5278
5381
|
(event: Event | string, source?: string, lineno?: number, colno?: number, error?: Error): any;
|
|
5279
5382
|
}
|
|
@@ -5370,8 +5473,8 @@ declare var origin: string;
|
|
|
5370
5473
|
declare var performance: Performance;
|
|
5371
5474
|
declare function atob(data: string): string;
|
|
5372
5475
|
declare function btoa(data: string): string;
|
|
5373
|
-
declare function clearInterval(
|
|
5374
|
-
declare function clearTimeout(
|
|
5476
|
+
declare function clearInterval(id?: number): void;
|
|
5477
|
+
declare function clearTimeout(id?: number): void;
|
|
5375
5478
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5376
5479
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5377
5480
|
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
@@ -5432,18 +5535,22 @@ type ClientTypes = "all" | "sharedworker" | "window" | "worker";
|
|
|
5432
5535
|
type ColorGamut = "p3" | "rec2020" | "srgb";
|
|
5433
5536
|
type ColorSpaceConversion = "default" | "none";
|
|
5434
5537
|
type ConnectionType = "bluetooth" | "cellular" | "ethernet" | "mixed" | "none" | "other" | "unknown" | "wifi";
|
|
5538
|
+
type DocumentVisibilityState = "hidden" | "visible";
|
|
5435
5539
|
type EndingType = "native" | "transparent";
|
|
5540
|
+
type FileSystemHandleKind = "directory" | "file";
|
|
5436
5541
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
5437
5542
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
5438
5543
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
5439
5544
|
type HdrMetadataType = "smpteSt2086" | "smpteSt2094-10" | "smpteSt2094-40";
|
|
5440
5545
|
type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique";
|
|
5441
5546
|
type IDBRequestReadyState = "done" | "pending";
|
|
5547
|
+
type IDBTransactionDurability = "default" | "relaxed" | "strict";
|
|
5442
5548
|
type IDBTransactionMode = "readonly" | "readwrite" | "versionchange";
|
|
5443
5549
|
type ImageOrientation = "flipY" | "none";
|
|
5444
5550
|
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
5445
5551
|
type KeyType = "private" | "public" | "secret";
|
|
5446
5552
|
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
|
|
5553
|
+
type LockMode = "exclusive" | "shared";
|
|
5447
5554
|
type MediaDecodingType = "file" | "media-source" | "webrtc";
|
|
5448
5555
|
type MediaEncodingType = "record" | "webrtc";
|
|
5449
5556
|
type NotificationDirection = "auto" | "ltr" | "rtl";
|
|
@@ -5465,6 +5572,5 @@ type SecurityPolicyViolationEventDisposition = "enforce" | "report";
|
|
|
5465
5572
|
type ServiceWorkerState = "activated" | "activating" | "installed" | "installing" | "parsed" | "redundant";
|
|
5466
5573
|
type ServiceWorkerUpdateViaCache = "all" | "imports" | "none";
|
|
5467
5574
|
type TransferFunction = "hlg" | "pq" | "srgb";
|
|
5468
|
-
type VisibilityState = "hidden" | "visible";
|
|
5469
5575
|
type WebGLPowerPreference = "default" | "high-performance" | "low-power";
|
|
5470
5576
|
type WorkerType = "classic" | "module";
|
package/iterable.d.ts
CHANGED
|
@@ -80,6 +80,13 @@ interface WEBGL_draw_buffers {
|
|
|
80
80
|
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
interface WEBGL_multi_draw {
|
|
84
|
+
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
85
|
+
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void;
|
|
86
|
+
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void;
|
|
87
|
+
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLint>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void;
|
|
88
|
+
}
|
|
89
|
+
|
|
83
90
|
interface WebGL2RenderingContextBase {
|
|
84
91
|
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void;
|
|
85
92
|
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void;
|