@types/sharedworker 0.0.63 → 0.0.66
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 +34 -11
- 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.66 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.66.
|
package/index.d.ts
CHANGED
|
@@ -336,6 +336,11 @@ interface MultiCacheQueryOptions extends CacheQueryOptions {
|
|
|
336
336
|
cacheName?: string;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
interface NavigationPreloadState {
|
|
340
|
+
enabled?: boolean;
|
|
341
|
+
headerValue?: string;
|
|
342
|
+
}
|
|
343
|
+
|
|
339
344
|
interface NotificationAction {
|
|
340
345
|
action: string;
|
|
341
346
|
icon?: string;
|
|
@@ -690,7 +695,7 @@ interface Blob {
|
|
|
690
695
|
readonly type: string;
|
|
691
696
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
692
697
|
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
693
|
-
stream(): ReadableStream
|
|
698
|
+
stream(): ReadableStream<Uint8Array>;
|
|
694
699
|
text(): Promise<string>;
|
|
695
700
|
}
|
|
696
701
|
|
|
@@ -750,13 +755,13 @@ declare var ByteLengthQueuingStrategy: {
|
|
|
750
755
|
* Available only in secure contexts.
|
|
751
756
|
*/
|
|
752
757
|
interface Cache {
|
|
753
|
-
add(request: RequestInfo): Promise<void>;
|
|
758
|
+
add(request: RequestInfo | URL): Promise<void>;
|
|
754
759
|
addAll(requests: RequestInfo[]): Promise<void>;
|
|
755
|
-
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
756
|
-
keys(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
|
|
757
|
-
match(request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>;
|
|
758
|
-
matchAll(request?: RequestInfo, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
|
|
759
|
-
put(request: RequestInfo, response: Response): Promise<void>;
|
|
760
|
+
delete(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<boolean>;
|
|
761
|
+
keys(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Request>>;
|
|
762
|
+
match(request: RequestInfo | URL, options?: CacheQueryOptions): Promise<Response | undefined>;
|
|
763
|
+
matchAll(request?: RequestInfo | URL, options?: CacheQueryOptions): Promise<ReadonlyArray<Response>>;
|
|
764
|
+
put(request: RequestInfo | URL, response: Response): Promise<void>;
|
|
760
765
|
}
|
|
761
766
|
|
|
762
767
|
declare var Cache: {
|
|
@@ -772,7 +777,7 @@ interface CacheStorage {
|
|
|
772
777
|
delete(cacheName: string): Promise<boolean>;
|
|
773
778
|
has(cacheName: string): Promise<boolean>;
|
|
774
779
|
keys(): Promise<string[]>;
|
|
775
|
-
match(request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
|
|
780
|
+
match(request: RequestInfo | URL, options?: MultiCacheQueryOptions): Promise<Response | undefined>;
|
|
776
781
|
open(cacheName: string): Promise<Cache>;
|
|
777
782
|
}
|
|
778
783
|
|
|
@@ -1404,6 +1409,7 @@ declare var FileReaderSync: {
|
|
|
1404
1409
|
|
|
1405
1410
|
/** Available only in secure contexts. */
|
|
1406
1411
|
interface FileSystemDirectoryHandle extends FileSystemHandle {
|
|
1412
|
+
readonly kind: "directory";
|
|
1407
1413
|
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions): Promise<FileSystemDirectoryHandle>;
|
|
1408
1414
|
getFileHandle(name: string, options?: FileSystemGetFileOptions): Promise<FileSystemFileHandle>;
|
|
1409
1415
|
removeEntry(name: string, options?: FileSystemRemoveOptions): Promise<void>;
|
|
@@ -1417,6 +1423,7 @@ declare var FileSystemDirectoryHandle: {
|
|
|
1417
1423
|
|
|
1418
1424
|
/** Available only in secure contexts. */
|
|
1419
1425
|
interface FileSystemFileHandle extends FileSystemHandle {
|
|
1426
|
+
readonly kind: "file";
|
|
1420
1427
|
getFile(): Promise<File>;
|
|
1421
1428
|
}
|
|
1422
1429
|
|
|
@@ -1963,6 +1970,7 @@ declare var ImageBitmapRenderingContext: {
|
|
|
1963
1970
|
|
|
1964
1971
|
/** The underlying pixel data of an area of a <canvas> element. It is created using the ImageData() constructor or creator methods on the CanvasRenderingContext2D object associated with a canvas: createImageData() and getImageData(). It can also be used to set a part of the canvas by using putImageData(). */
|
|
1965
1972
|
interface ImageData {
|
|
1973
|
+
readonly colorSpace: PredefinedColorSpace;
|
|
1966
1974
|
/** Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255. */
|
|
1967
1975
|
readonly data: Uint8ClampedArray;
|
|
1968
1976
|
/** Returns the actual dimensions of the data in the ImageData object, in pixels. */
|
|
@@ -2079,6 +2087,19 @@ declare var MessagePort: {
|
|
|
2079
2087
|
new(): MessagePort;
|
|
2080
2088
|
};
|
|
2081
2089
|
|
|
2090
|
+
/** Available only in secure contexts. */
|
|
2091
|
+
interface NavigationPreloadManager {
|
|
2092
|
+
disable(): Promise<void>;
|
|
2093
|
+
enable(): Promise<void>;
|
|
2094
|
+
getState(): Promise<NavigationPreloadState>;
|
|
2095
|
+
setHeaderValue(value: string): Promise<void>;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
declare var NavigationPreloadManager: {
|
|
2099
|
+
prototype: NavigationPreloadManager;
|
|
2100
|
+
new(): NavigationPreloadManager;
|
|
2101
|
+
};
|
|
2102
|
+
|
|
2082
2103
|
interface NavigatorConcurrentHardware {
|
|
2083
2104
|
readonly hardwareConcurrency: number;
|
|
2084
2105
|
}
|
|
@@ -2512,7 +2533,7 @@ interface Request extends Body {
|
|
|
2512
2533
|
|
|
2513
2534
|
declare var Request: {
|
|
2514
2535
|
prototype: Request;
|
|
2515
|
-
new(input: RequestInfo, init?: RequestInit): Request;
|
|
2536
|
+
new(input: RequestInfo | URL, init?: RequestInit): Request;
|
|
2516
2537
|
};
|
|
2517
2538
|
|
|
2518
2539
|
/** This Fetch API interface represents the response to a request. */
|
|
@@ -4963,11 +4984,12 @@ interface WindowOrWorkerGlobalScope {
|
|
|
4963
4984
|
clearTimeout(id?: number): void;
|
|
4964
4985
|
createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
4965
4986
|
createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
4966
|
-
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
4987
|
+
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
4967
4988
|
queueMicrotask(callback: VoidFunction): void;
|
|
4968
4989
|
reportError(e: any): void;
|
|
4969
4990
|
setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
4970
4991
|
setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
4992
|
+
structuredClone(value: any, options?: StructuredSerializeOptions): any;
|
|
4971
4993
|
}
|
|
4972
4994
|
|
|
4973
4995
|
interface WorkerEventMap extends AbstractWorkerEventMap {
|
|
@@ -5494,11 +5516,12 @@ declare function clearInterval(id?: number): void;
|
|
|
5494
5516
|
declare function clearTimeout(id?: number): void;
|
|
5495
5517
|
declare function createImageBitmap(image: ImageBitmapSource, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5496
5518
|
declare function createImageBitmap(image: ImageBitmapSource, sx: number, sy: number, sw: number, sh: number, options?: ImageBitmapOptions): Promise<ImageBitmap>;
|
|
5497
|
-
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
5519
|
+
declare function fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
5498
5520
|
declare function queueMicrotask(callback: VoidFunction): void;
|
|
5499
5521
|
declare function reportError(e: any): void;
|
|
5500
5522
|
declare function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5501
5523
|
declare function setTimeout(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
|
|
5524
|
+
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
|
|
5502
5525
|
declare function addEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
5503
5526
|
declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
5504
5527
|
declare function removeEventListener<K extends keyof SharedWorkerGlobalScopeEventMap>(type: K, listener: (this: SharedWorkerGlobalScope, ev: SharedWorkerGlobalScopeEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|