@cloudflare/workers-types 4.20240712.0 → 4.20240718.0
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/2021-11-03/index.d.ts +427 -166
- package/2021-11-03/index.ts +427 -166
- package/2022-01-31/index.d.ts +443 -176
- package/2022-01-31/index.ts +443 -176
- package/2022-03-21/index.d.ts +443 -176
- package/2022-03-21/index.ts +443 -176
- package/2022-08-04/index.d.ts +443 -176
- package/2022-08-04/index.ts +443 -176
- package/2022-10-31/index.d.ts +444 -177
- package/2022-10-31/index.ts +444 -177
- package/2022-11-30/index.d.ts +449 -173
- package/2022-11-30/index.ts +449 -173
- package/2023-03-01/index.d.ts +450 -173
- package/2023-03-01/index.ts +450 -173
- package/2023-07-01/index.d.ts +450 -173
- package/2023-07-01/index.ts +450 -173
- package/experimental/index.d.ts +450 -173
- package/experimental/index.ts +450 -173
- package/index.d.ts +427 -166
- package/index.ts +427 -166
- package/oldest/index.d.ts +427 -166
- package/oldest/index.ts +427 -166
- package/package.json +1 -1
package/2022-11-30/index.ts
CHANGED
|
@@ -14,11 +14,16 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
/* eslint-disable */
|
|
16
16
|
// noinspection JSUnusedGlobalSymbols
|
|
17
|
+
/**
|
|
18
|
+
* An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
|
|
19
|
+
*
|
|
20
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
|
|
21
|
+
*/
|
|
17
22
|
export declare class DOMException extends Error {
|
|
18
23
|
constructor(message?: string, name?: string);
|
|
19
|
-
|
|
24
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
|
|
20
25
|
readonly message: string;
|
|
21
|
-
|
|
26
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
|
|
22
27
|
readonly name: string;
|
|
23
28
|
/**
|
|
24
29
|
* @deprecated
|
|
@@ -64,45 +69,45 @@ export type WorkerGlobalScopeEventMap = {
|
|
|
64
69
|
export declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {
|
|
65
70
|
EventTarget: typeof EventTarget;
|
|
66
71
|
}
|
|
67
|
-
|
|
72
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
|
|
68
73
|
export interface Console {
|
|
69
74
|
"assert"(condition?: boolean, ...data: any[]): void;
|
|
70
|
-
|
|
75
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
|
|
71
76
|
clear(): void;
|
|
72
|
-
|
|
77
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
|
|
73
78
|
count(label?: string): void;
|
|
74
|
-
|
|
79
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */
|
|
75
80
|
countReset(label?: string): void;
|
|
76
|
-
|
|
81
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
|
|
77
82
|
debug(...data: any[]): void;
|
|
78
|
-
|
|
83
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
|
|
79
84
|
dir(item?: any, options?: any): void;
|
|
80
|
-
|
|
85
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
|
|
81
86
|
dirxml(...data: any[]): void;
|
|
82
|
-
|
|
87
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
|
|
83
88
|
error(...data: any[]): void;
|
|
84
|
-
|
|
89
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
|
|
85
90
|
group(...data: any[]): void;
|
|
86
|
-
|
|
91
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */
|
|
87
92
|
groupCollapsed(...data: any[]): void;
|
|
88
|
-
|
|
93
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */
|
|
89
94
|
groupEnd(): void;
|
|
90
|
-
|
|
95
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
|
|
91
96
|
info(...data: any[]): void;
|
|
92
|
-
|
|
97
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
|
|
93
98
|
log(...data: any[]): void;
|
|
94
|
-
|
|
99
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
|
|
95
100
|
table(tabularData?: any, properties?: string[]): void;
|
|
96
|
-
|
|
101
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
|
|
97
102
|
time(label?: string): void;
|
|
98
|
-
|
|
103
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */
|
|
99
104
|
timeEnd(label?: string): void;
|
|
100
|
-
|
|
105
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */
|
|
101
106
|
timeLog(label?: string, ...data: any[]): void;
|
|
102
107
|
timeStamp(label?: string): void;
|
|
103
|
-
|
|
108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
|
|
104
109
|
trace(...data: any[]): void;
|
|
105
|
-
|
|
110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
|
|
106
111
|
warn(...data: any[]): void;
|
|
107
112
|
}
|
|
108
113
|
export declare const console: Console;
|
|
@@ -195,6 +200,7 @@ export declare namespace WebAssembly {
|
|
|
195
200
|
}
|
|
196
201
|
/**
|
|
197
202
|
* This ServiceWorker API interface represents the global execution context of a service worker.
|
|
203
|
+
* Available only in secure contexts.
|
|
198
204
|
*
|
|
199
205
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
|
|
200
206
|
*/
|
|
@@ -319,54 +325,73 @@ export declare function removeEventListener<
|
|
|
319
325
|
export declare function dispatchEvent(
|
|
320
326
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
321
327
|
): boolean;
|
|
322
|
-
|
|
328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
323
329
|
export declare function btoa(data: string): string;
|
|
324
|
-
|
|
330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
325
331
|
export declare function atob(data: string): string;
|
|
326
|
-
|
|
332
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
327
333
|
export declare function setTimeout(
|
|
328
334
|
callback: (...args: any[]) => void,
|
|
329
335
|
msDelay?: number,
|
|
330
336
|
): number;
|
|
331
|
-
|
|
337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
332
338
|
export declare function setTimeout<Args extends any[]>(
|
|
333
339
|
callback: (...args: Args) => void,
|
|
334
340
|
msDelay?: number,
|
|
335
341
|
...args: Args
|
|
336
342
|
): number;
|
|
337
|
-
|
|
343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
338
344
|
export declare function clearTimeout(timeoutId: number | null): void;
|
|
339
|
-
|
|
345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
340
346
|
export declare function setInterval(
|
|
341
347
|
callback: (...args: any[]) => void,
|
|
342
348
|
msDelay?: number,
|
|
343
349
|
): number;
|
|
344
|
-
|
|
350
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
345
351
|
export declare function setInterval<Args extends any[]>(
|
|
346
352
|
callback: (...args: Args) => void,
|
|
347
353
|
msDelay?: number,
|
|
348
354
|
...args: Args
|
|
349
355
|
): number;
|
|
350
|
-
|
|
356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
351
357
|
export declare function clearInterval(timeoutId: number | null): void;
|
|
352
|
-
|
|
358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
353
359
|
export declare function queueMicrotask(task: Function): void;
|
|
354
|
-
|
|
360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
355
361
|
export declare function structuredClone<T>(
|
|
356
362
|
value: T,
|
|
357
363
|
options?: StructuredSerializeOptions,
|
|
358
364
|
): T;
|
|
359
|
-
|
|
365
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
360
366
|
export declare function reportError(error: any): void;
|
|
361
|
-
|
|
367
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
362
368
|
export declare function fetch(
|
|
363
369
|
input: RequestInfo,
|
|
364
370
|
init?: RequestInit<RequestInitCfProperties>,
|
|
365
371
|
): Promise<Response>;
|
|
366
372
|
export declare const self: ServiceWorkerGlobalScope;
|
|
373
|
+
/**
|
|
374
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
375
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
376
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
377
|
+
* compared to those implemented in most browsers.
|
|
378
|
+
*
|
|
379
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
380
|
+
*/
|
|
367
381
|
export declare const crypto: Crypto;
|
|
382
|
+
/**
|
|
383
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
384
|
+
*
|
|
385
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
386
|
+
*/
|
|
368
387
|
export declare const caches: CacheStorage;
|
|
369
388
|
export declare const scheduler: Scheduler;
|
|
389
|
+
/**
|
|
390
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
391
|
+
* as well as timing of subrequests and other operations.
|
|
392
|
+
*
|
|
393
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
394
|
+
*/
|
|
370
395
|
export declare const performance: Performance;
|
|
371
396
|
export declare const origin: string;
|
|
372
397
|
export declare const navigator: Navigator;
|
|
@@ -424,10 +449,11 @@ export interface ExportedHandler<
|
|
|
424
449
|
export interface StructuredSerializeOptions {
|
|
425
450
|
transfer?: any[];
|
|
426
451
|
}
|
|
452
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
427
453
|
export declare abstract class PromiseRejectionEvent extends Event {
|
|
428
|
-
|
|
454
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
429
455
|
readonly promise: Promise<any>;
|
|
430
|
-
|
|
456
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
431
457
|
readonly reason: any;
|
|
432
458
|
}
|
|
433
459
|
export declare abstract class Navigator {
|
|
@@ -445,14 +471,15 @@ export declare abstract class Navigator {
|
|
|
445
471
|
readonly gpu: GPU;
|
|
446
472
|
}
|
|
447
473
|
/**
|
|
448
|
-
*
|
|
474
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
475
|
+
* as well as timing of subrequests and other operations.
|
|
449
476
|
*
|
|
450
|
-
* [
|
|
477
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
451
478
|
*/
|
|
452
479
|
export interface Performance {
|
|
453
|
-
|
|
480
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
454
481
|
readonly timeOrigin: number;
|
|
455
|
-
|
|
482
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
456
483
|
now(): number;
|
|
457
484
|
}
|
|
458
485
|
export interface AlarmInvocationInfo {
|
|
@@ -641,6 +668,11 @@ export interface AnalyticsEngineDataPoint {
|
|
|
641
668
|
doubles?: number[];
|
|
642
669
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
643
670
|
}
|
|
671
|
+
/**
|
|
672
|
+
* An event which takes place in the DOM.
|
|
673
|
+
*
|
|
674
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
675
|
+
*/
|
|
644
676
|
export declare class Event {
|
|
645
677
|
constructor(type: string, init?: EventInit);
|
|
646
678
|
/**
|
|
@@ -764,6 +796,11 @@ export interface EventListenerObject<EventType extends Event = Event> {
|
|
|
764
796
|
export type EventListenerOrEventListenerObject<
|
|
765
797
|
EventType extends Event = Event,
|
|
766
798
|
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
799
|
+
/**
|
|
800
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
801
|
+
*
|
|
802
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
803
|
+
*/
|
|
767
804
|
export declare class EventTarget<
|
|
768
805
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
769
806
|
> {
|
|
@@ -819,6 +856,11 @@ export interface EventTargetAddEventListenerOptions {
|
|
|
819
856
|
export interface EventTargetHandlerObject {
|
|
820
857
|
handleEvent: (event: Event) => any | undefined;
|
|
821
858
|
}
|
|
859
|
+
/**
|
|
860
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
861
|
+
*
|
|
862
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
863
|
+
*/
|
|
822
864
|
export declare class AbortController {
|
|
823
865
|
constructor();
|
|
824
866
|
/**
|
|
@@ -834,11 +876,17 @@ export declare class AbortController {
|
|
|
834
876
|
*/
|
|
835
877
|
abort(reason?: any): void;
|
|
836
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
|
|
881
|
+
*
|
|
882
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
883
|
+
*/
|
|
837
884
|
export declare abstract class AbortSignal extends EventTarget {
|
|
838
|
-
|
|
885
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
839
886
|
static abort(reason?: any): AbortSignal;
|
|
840
|
-
|
|
887
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
841
888
|
static timeout(delay: number): AbortSignal;
|
|
889
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
842
890
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
843
891
|
/**
|
|
844
892
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -846,13 +894,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
846
894
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
847
895
|
*/
|
|
848
896
|
get aborted(): boolean;
|
|
849
|
-
|
|
897
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
850
898
|
get reason(): any;
|
|
851
|
-
|
|
899
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
852
900
|
get onabort(): any | null;
|
|
853
|
-
|
|
901
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
854
902
|
set onabort(value: any | null);
|
|
855
|
-
|
|
903
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
856
904
|
throwIfAborted(): void;
|
|
857
905
|
}
|
|
858
906
|
export interface Scheduler {
|
|
@@ -861,10 +909,16 @@ export interface Scheduler {
|
|
|
861
909
|
export interface SchedulerWaitOptions {
|
|
862
910
|
signal?: AbortSignal;
|
|
863
911
|
}
|
|
912
|
+
/**
|
|
913
|
+
* Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
|
|
914
|
+
*
|
|
915
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
916
|
+
*/
|
|
864
917
|
export declare abstract class ExtendableEvent extends Event {
|
|
865
|
-
|
|
918
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
866
919
|
waitUntil(promise: Promise<any>): void;
|
|
867
920
|
}
|
|
921
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
868
922
|
export declare class CustomEvent<T = any> extends Event {
|
|
869
923
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
870
924
|
/**
|
|
@@ -880,59 +934,90 @@ export interface CustomEventCustomEventInit {
|
|
|
880
934
|
composed?: boolean;
|
|
881
935
|
detail?: any;
|
|
882
936
|
}
|
|
937
|
+
/**
|
|
938
|
+
* A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
|
|
939
|
+
*
|
|
940
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
941
|
+
*/
|
|
883
942
|
export declare class Blob {
|
|
884
943
|
constructor(
|
|
885
944
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
886
945
|
options?: BlobOptions,
|
|
887
946
|
);
|
|
888
|
-
|
|
947
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
889
948
|
get size(): number;
|
|
890
|
-
|
|
949
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
891
950
|
get type(): string;
|
|
892
|
-
|
|
951
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
893
952
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
894
|
-
|
|
953
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
895
954
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
896
955
|
bytes(): Promise<Uint8Array>;
|
|
897
|
-
|
|
956
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
898
957
|
text(): Promise<string>;
|
|
899
|
-
|
|
958
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
900
959
|
stream(): ReadableStream;
|
|
901
960
|
}
|
|
902
961
|
export interface BlobOptions {
|
|
903
962
|
type?: string;
|
|
904
963
|
}
|
|
964
|
+
/**
|
|
965
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
966
|
+
*
|
|
967
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
968
|
+
*/
|
|
905
969
|
export declare class File extends Blob {
|
|
906
970
|
constructor(
|
|
907
971
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
908
972
|
name: string,
|
|
909
973
|
options?: FileOptions,
|
|
910
974
|
);
|
|
911
|
-
|
|
975
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
912
976
|
get name(): string;
|
|
913
|
-
|
|
977
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
914
978
|
get lastModified(): number;
|
|
915
979
|
}
|
|
916
980
|
export interface FileOptions {
|
|
917
981
|
type?: string;
|
|
918
982
|
lastModified?: number;
|
|
919
983
|
}
|
|
984
|
+
/**
|
|
985
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
986
|
+
*
|
|
987
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
988
|
+
*/
|
|
920
989
|
export declare abstract class CacheStorage {
|
|
921
|
-
|
|
990
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
922
991
|
open(cacheName: string): Promise<Cache>;
|
|
923
992
|
readonly default: Cache;
|
|
924
993
|
}
|
|
994
|
+
/**
|
|
995
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
996
|
+
*
|
|
997
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
998
|
+
*/
|
|
925
999
|
export declare abstract class Cache {
|
|
1000
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
926
1001
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
1002
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
927
1003
|
match(
|
|
928
1004
|
request: RequestInfo,
|
|
929
1005
|
options?: CacheQueryOptions,
|
|
930
1006
|
): Promise<Response | undefined>;
|
|
1007
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
931
1008
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
932
1009
|
}
|
|
933
1010
|
export interface CacheQueryOptions {
|
|
934
1011
|
ignoreMethod?: boolean;
|
|
935
1012
|
}
|
|
1013
|
+
/**
|
|
1014
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
1015
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
1016
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
1017
|
+
* compared to those implemented in most browsers.
|
|
1018
|
+
*
|
|
1019
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
1020
|
+
*/
|
|
936
1021
|
export declare abstract class Crypto {
|
|
937
1022
|
/**
|
|
938
1023
|
* Available only in secure contexts.
|
|
@@ -940,7 +1025,7 @@ export declare abstract class Crypto {
|
|
|
940
1025
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
941
1026
|
*/
|
|
942
1027
|
get subtle(): SubtleCrypto;
|
|
943
|
-
|
|
1028
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
944
1029
|
getRandomValues<
|
|
945
1030
|
T extends
|
|
946
1031
|
| Int8Array
|
|
@@ -960,39 +1045,50 @@ export declare abstract class Crypto {
|
|
|
960
1045
|
randomUUID(): string;
|
|
961
1046
|
DigestStream: typeof DigestStream;
|
|
962
1047
|
}
|
|
1048
|
+
/**
|
|
1049
|
+
* This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
|
|
1050
|
+
* Available only in secure contexts.
|
|
1051
|
+
*
|
|
1052
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1053
|
+
*/
|
|
963
1054
|
export declare abstract class SubtleCrypto {
|
|
1055
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
964
1056
|
encrypt(
|
|
965
1057
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
966
1058
|
key: CryptoKey,
|
|
967
1059
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
968
1060
|
): Promise<ArrayBuffer>;
|
|
1061
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
969
1062
|
decrypt(
|
|
970
1063
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
971
1064
|
key: CryptoKey,
|
|
972
1065
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
973
1066
|
): Promise<ArrayBuffer>;
|
|
1067
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
974
1068
|
sign(
|
|
975
1069
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
976
1070
|
key: CryptoKey,
|
|
977
1071
|
data: ArrayBuffer | ArrayBufferView,
|
|
978
1072
|
): Promise<ArrayBuffer>;
|
|
1073
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
979
1074
|
verify(
|
|
980
1075
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
981
1076
|
key: CryptoKey,
|
|
982
1077
|
signature: ArrayBuffer | ArrayBufferView,
|
|
983
1078
|
data: ArrayBuffer | ArrayBufferView,
|
|
984
1079
|
): Promise<boolean>;
|
|
1080
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
985
1081
|
digest(
|
|
986
1082
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
987
1083
|
data: ArrayBuffer | ArrayBufferView,
|
|
988
1084
|
): Promise<ArrayBuffer>;
|
|
989
|
-
|
|
1085
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
990
1086
|
generateKey(
|
|
991
1087
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
992
1088
|
extractable: boolean,
|
|
993
1089
|
keyUsages: string[],
|
|
994
1090
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
995
|
-
|
|
1091
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
996
1092
|
deriveKey(
|
|
997
1093
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
998
1094
|
baseKey: CryptoKey,
|
|
@@ -1000,12 +1096,13 @@ export declare abstract class SubtleCrypto {
|
|
|
1000
1096
|
extractable: boolean,
|
|
1001
1097
|
keyUsages: string[],
|
|
1002
1098
|
): Promise<CryptoKey>;
|
|
1099
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
1003
1100
|
deriveBits(
|
|
1004
1101
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1005
1102
|
baseKey: CryptoKey,
|
|
1006
|
-
length
|
|
1103
|
+
length?: number | null,
|
|
1007
1104
|
): Promise<ArrayBuffer>;
|
|
1008
|
-
|
|
1105
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
1009
1106
|
importKey(
|
|
1010
1107
|
format: string,
|
|
1011
1108
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1013,14 +1110,16 @@ export declare abstract class SubtleCrypto {
|
|
|
1013
1110
|
extractable: boolean,
|
|
1014
1111
|
keyUsages: string[],
|
|
1015
1112
|
): Promise<CryptoKey>;
|
|
1113
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
1016
1114
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1115
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
1017
1116
|
wrapKey(
|
|
1018
1117
|
format: string,
|
|
1019
1118
|
key: CryptoKey,
|
|
1020
1119
|
wrappingKey: CryptoKey,
|
|
1021
1120
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1022
1121
|
): Promise<ArrayBuffer>;
|
|
1023
|
-
|
|
1122
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
1024
1123
|
unwrapKey(
|
|
1025
1124
|
format: string,
|
|
1026
1125
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1035,12 +1134,18 @@ export declare abstract class SubtleCrypto {
|
|
|
1035
1134
|
b: ArrayBuffer | ArrayBufferView,
|
|
1036
1135
|
): boolean;
|
|
1037
1136
|
}
|
|
1137
|
+
/**
|
|
1138
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1139
|
+
* Available only in secure contexts.
|
|
1140
|
+
*
|
|
1141
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1142
|
+
*/
|
|
1038
1143
|
export declare abstract class CryptoKey {
|
|
1039
|
-
|
|
1144
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1040
1145
|
readonly type: string;
|
|
1041
|
-
|
|
1146
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1042
1147
|
readonly extractable: boolean;
|
|
1043
|
-
|
|
1148
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1044
1149
|
readonly algorithm:
|
|
1045
1150
|
| CryptoKeyKeyAlgorithm
|
|
1046
1151
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1048,7 +1153,7 @@ export declare abstract class CryptoKey {
|
|
|
1048
1153
|
| CryptoKeyRsaKeyAlgorithm
|
|
1049
1154
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1050
1155
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1051
|
-
|
|
1156
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1052
1157
|
readonly usages: string[];
|
|
1053
1158
|
}
|
|
1054
1159
|
export interface CryptoKeyPair {
|
|
@@ -1156,6 +1261,11 @@ export declare class DigestStream extends WritableStream<
|
|
|
1156
1261
|
get digest(): Promise<ArrayBuffer>;
|
|
1157
1262
|
get bytesWritten(): number | bigint;
|
|
1158
1263
|
}
|
|
1264
|
+
/**
|
|
1265
|
+
* A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
|
|
1266
|
+
*
|
|
1267
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1268
|
+
*/
|
|
1159
1269
|
export declare class TextDecoder {
|
|
1160
1270
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1161
1271
|
/**
|
|
@@ -1181,6 +1291,11 @@ export declare class TextDecoder {
|
|
|
1181
1291
|
get fatal(): boolean;
|
|
1182
1292
|
get ignoreBOM(): boolean;
|
|
1183
1293
|
}
|
|
1294
|
+
/**
|
|
1295
|
+
* TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
|
|
1296
|
+
*
|
|
1297
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1298
|
+
*/
|
|
1184
1299
|
export declare class TextEncoder {
|
|
1185
1300
|
constructor();
|
|
1186
1301
|
/**
|
|
@@ -1211,17 +1326,22 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1211
1326
|
read: number;
|
|
1212
1327
|
written: number;
|
|
1213
1328
|
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Events providing information related to errors in scripts or in files.
|
|
1331
|
+
*
|
|
1332
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1333
|
+
*/
|
|
1214
1334
|
export declare class ErrorEvent extends Event {
|
|
1215
1335
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1216
|
-
|
|
1336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1217
1337
|
get filename(): string;
|
|
1218
|
-
|
|
1338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1219
1339
|
get message(): string;
|
|
1220
|
-
|
|
1340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1221
1341
|
get lineno(): number;
|
|
1222
|
-
|
|
1342
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1223
1343
|
get colno(): number;
|
|
1224
|
-
|
|
1344
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1225
1345
|
get error(): any;
|
|
1226
1346
|
}
|
|
1227
1347
|
export interface ErrorEventErrorEventInit {
|
|
@@ -1231,21 +1351,34 @@ export interface ErrorEventErrorEventInit {
|
|
|
1231
1351
|
colno?: number;
|
|
1232
1352
|
error?: any;
|
|
1233
1353
|
}
|
|
1354
|
+
/**
|
|
1355
|
+
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
|
|
1356
|
+
*
|
|
1357
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1358
|
+
*/
|
|
1234
1359
|
export declare class FormData {
|
|
1235
1360
|
constructor();
|
|
1361
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1236
1362
|
append(name: string, value: string): void;
|
|
1363
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1237
1364
|
append(name: string, value: Blob, filename?: string): void;
|
|
1365
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1238
1366
|
delete(name: string): void;
|
|
1367
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1239
1368
|
get(name: string): (File | string) | null;
|
|
1369
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1240
1370
|
getAll(name: string): (File | string)[];
|
|
1371
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1241
1372
|
has(name: string): boolean;
|
|
1373
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1242
1374
|
set(name: string, value: string): void;
|
|
1375
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1243
1376
|
set(name: string, value: Blob, filename?: string): void;
|
|
1244
|
-
|
|
1377
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1245
1378
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1246
|
-
|
|
1379
|
+
/* Returns a list of keys in the list. */
|
|
1247
1380
|
keys(): IterableIterator<string>;
|
|
1248
|
-
|
|
1381
|
+
/* Returns a list of values in the list. */
|
|
1249
1382
|
values(): IterableIterator<File | string>;
|
|
1250
1383
|
forEach<This = unknown>(
|
|
1251
1384
|
callback: (
|
|
@@ -1331,10 +1464,15 @@ export interface Text {
|
|
|
1331
1464
|
export interface DocumentEnd {
|
|
1332
1465
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1333
1466
|
}
|
|
1467
|
+
/**
|
|
1468
|
+
* This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.
|
|
1469
|
+
*
|
|
1470
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1471
|
+
*/
|
|
1334
1472
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1335
|
-
|
|
1473
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1336
1474
|
readonly request: Request;
|
|
1337
|
-
|
|
1475
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1338
1476
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1339
1477
|
passThroughOnException(): void;
|
|
1340
1478
|
}
|
|
@@ -1342,23 +1480,33 @@ export type HeadersInit =
|
|
|
1342
1480
|
| Headers
|
|
1343
1481
|
| Iterable<Iterable<string>>
|
|
1344
1482
|
| Record<string, string>;
|
|
1483
|
+
/**
|
|
1484
|
+
* This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
|
|
1485
|
+
*
|
|
1486
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1487
|
+
*/
|
|
1345
1488
|
export declare class Headers {
|
|
1346
1489
|
constructor(init?: HeadersInit);
|
|
1490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1347
1491
|
get(name: string): string | null;
|
|
1348
1492
|
getAll(name: string): string[];
|
|
1493
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1349
1494
|
has(name: string): boolean;
|
|
1495
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1350
1496
|
set(name: string, value: string): void;
|
|
1497
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1351
1498
|
append(name: string, value: string): void;
|
|
1499
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1352
1500
|
delete(name: string): void;
|
|
1353
1501
|
forEach<This = unknown>(
|
|
1354
1502
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1355
1503
|
thisArg?: This,
|
|
1356
1504
|
): void;
|
|
1357
|
-
|
|
1505
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1358
1506
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1359
|
-
|
|
1507
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1360
1508
|
keys(): IterableIterator<string>;
|
|
1361
|
-
|
|
1509
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1362
1510
|
values(): IterableIterator<string>;
|
|
1363
1511
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1364
1512
|
}
|
|
@@ -1371,34 +1519,46 @@ export type BodyInit =
|
|
|
1371
1519
|
| URLSearchParams
|
|
1372
1520
|
| FormData;
|
|
1373
1521
|
export declare abstract class Body {
|
|
1522
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1374
1523
|
get body(): ReadableStream | null;
|
|
1524
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1375
1525
|
get bodyUsed(): boolean;
|
|
1526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1376
1527
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1377
1528
|
bytes(): Promise<Uint8Array>;
|
|
1529
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1378
1530
|
text(): Promise<string>;
|
|
1531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1379
1532
|
json<T>(): Promise<T>;
|
|
1533
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1380
1534
|
formData(): Promise<FormData>;
|
|
1535
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1381
1536
|
blob(): Promise<Blob>;
|
|
1382
1537
|
}
|
|
1538
|
+
/**
|
|
1539
|
+
* This Fetch API interface represents the response to a request.
|
|
1540
|
+
*
|
|
1541
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1542
|
+
*/
|
|
1383
1543
|
export declare class Response extends Body {
|
|
1384
1544
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1385
|
-
|
|
1545
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1386
1546
|
static redirect(url: string, status?: number): Response;
|
|
1387
|
-
|
|
1547
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1388
1548
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1389
|
-
|
|
1549
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1390
1550
|
clone(): Response;
|
|
1391
|
-
|
|
1551
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1392
1552
|
get status(): number;
|
|
1393
|
-
|
|
1553
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1394
1554
|
get statusText(): string;
|
|
1395
|
-
|
|
1555
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1396
1556
|
get headers(): Headers;
|
|
1397
|
-
|
|
1557
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1398
1558
|
get ok(): boolean;
|
|
1399
|
-
|
|
1559
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1400
1560
|
get redirected(): boolean;
|
|
1401
|
-
|
|
1561
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1402
1562
|
get url(): string;
|
|
1403
1563
|
get webSocket(): WebSocket | null;
|
|
1404
1564
|
get cf(): any | undefined;
|
|
@@ -1415,12 +1575,17 @@ export type RequestInfo<
|
|
|
1415
1575
|
CfHostMetadata = unknown,
|
|
1416
1576
|
Cf = CfProperties<CfHostMetadata>,
|
|
1417
1577
|
> = Request<CfHostMetadata, Cf> | string | URL;
|
|
1578
|
+
/**
|
|
1579
|
+
* This Fetch API interface represents a resource request.
|
|
1580
|
+
*
|
|
1581
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1582
|
+
*/
|
|
1418
1583
|
export declare class Request<
|
|
1419
1584
|
CfHostMetadata = unknown,
|
|
1420
1585
|
Cf = CfProperties<CfHostMetadata>,
|
|
1421
1586
|
> extends Body {
|
|
1422
1587
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1423
|
-
|
|
1588
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1424
1589
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1425
1590
|
/**
|
|
1426
1591
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1466,21 +1631,29 @@ export declare class Request<
|
|
|
1466
1631
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1467
1632
|
*/
|
|
1468
1633
|
get keepalive(): boolean;
|
|
1634
|
+
/**
|
|
1635
|
+
* Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
1636
|
+
*
|
|
1637
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1638
|
+
*/
|
|
1639
|
+
get cache(): string | undefined;
|
|
1469
1640
|
}
|
|
1470
1641
|
export interface RequestInit<Cf = CfProperties> {
|
|
1471
|
-
|
|
1642
|
+
/* A string to set request's method. */
|
|
1472
1643
|
method?: string;
|
|
1473
|
-
|
|
1644
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1474
1645
|
headers?: HeadersInit;
|
|
1475
|
-
|
|
1646
|
+
/* A BodyInit object or null to set request's body. */
|
|
1476
1647
|
body?: BodyInit | null;
|
|
1477
|
-
|
|
1648
|
+
/* A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect. */
|
|
1478
1649
|
redirect?: string;
|
|
1479
1650
|
fetcher?: Fetcher | null;
|
|
1480
1651
|
cf?: Cf;
|
|
1481
|
-
|
|
1652
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1653
|
+
cache?: string;
|
|
1654
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1482
1655
|
integrity?: string;
|
|
1483
|
-
|
|
1656
|
+
/* An AbortSignal to set request's signal. */
|
|
1484
1657
|
signal?: AbortSignal | null;
|
|
1485
1658
|
}
|
|
1486
1659
|
export type Service<
|
|
@@ -1914,31 +2087,36 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
1914
2087
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1915
2088
|
*/
|
|
1916
2089
|
export interface ReadableStream<R = any> {
|
|
1917
|
-
|
|
2090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1918
2091
|
get locked(): boolean;
|
|
1919
|
-
|
|
2092
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1920
2093
|
cancel(reason?: any): Promise<void>;
|
|
1921
|
-
|
|
2094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1922
2095
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1923
|
-
|
|
2096
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1924
2097
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1925
|
-
|
|
2098
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1926
2099
|
pipeThrough<T>(
|
|
1927
2100
|
transform: ReadableWritablePair<T, R>,
|
|
1928
2101
|
options?: StreamPipeOptions,
|
|
1929
2102
|
): ReadableStream<T>;
|
|
1930
|
-
|
|
2103
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1931
2104
|
pipeTo(
|
|
1932
2105
|
destination: WritableStream<R>,
|
|
1933
2106
|
options?: StreamPipeOptions,
|
|
1934
2107
|
): Promise<void>;
|
|
1935
|
-
|
|
2108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1936
2109
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1937
2110
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1938
2111
|
[Symbol.asyncIterator](
|
|
1939
2112
|
options?: ReadableStreamValuesOptions,
|
|
1940
2113
|
): AsyncIterableIterator<R>;
|
|
1941
2114
|
}
|
|
2115
|
+
/**
|
|
2116
|
+
* This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
|
|
2117
|
+
*
|
|
2118
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2119
|
+
*/
|
|
1942
2120
|
export declare const ReadableStream: {
|
|
1943
2121
|
prototype: ReadableStream;
|
|
1944
2122
|
new (
|
|
@@ -1950,24 +2128,26 @@ export declare const ReadableStream: {
|
|
|
1950
2128
|
strategy?: QueuingStrategy<R>,
|
|
1951
2129
|
): ReadableStream<R>;
|
|
1952
2130
|
};
|
|
2131
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1953
2132
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
1954
2133
|
constructor(stream: ReadableStream);
|
|
1955
2134
|
get closed(): Promise<void>;
|
|
1956
2135
|
cancel(reason?: any): Promise<void>;
|
|
1957
|
-
|
|
2136
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1958
2137
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1959
|
-
|
|
2138
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1960
2139
|
releaseLock(): void;
|
|
1961
2140
|
}
|
|
2141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1962
2142
|
export declare class ReadableStreamBYOBReader {
|
|
1963
2143
|
constructor(stream: ReadableStream);
|
|
1964
2144
|
get closed(): Promise<void>;
|
|
1965
2145
|
cancel(reason?: any): Promise<void>;
|
|
1966
|
-
|
|
2146
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1967
2147
|
read<T extends ArrayBufferView>(
|
|
1968
2148
|
view: T,
|
|
1969
2149
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1970
|
-
|
|
2150
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1971
2151
|
releaseLock(): void;
|
|
1972
2152
|
readAtLeast<T extends ArrayBufferView>(
|
|
1973
2153
|
minElements: number,
|
|
@@ -1985,51 +2165,60 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
1985
2165
|
*/
|
|
1986
2166
|
mode: "byob";
|
|
1987
2167
|
}
|
|
2168
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1988
2169
|
export declare abstract class ReadableStreamBYOBRequest {
|
|
1989
|
-
|
|
2170
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1990
2171
|
get view(): Uint8Array | null;
|
|
1991
|
-
|
|
2172
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1992
2173
|
respond(bytesWritten: number): void;
|
|
1993
|
-
|
|
2174
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1994
2175
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1995
2176
|
get atLeast(): number | null;
|
|
1996
2177
|
}
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1997
2179
|
export declare abstract class ReadableStreamDefaultController<R = any> {
|
|
1998
|
-
|
|
2180
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1999
2181
|
get desiredSize(): number | null;
|
|
2000
|
-
|
|
2182
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
2001
2183
|
close(): void;
|
|
2002
|
-
|
|
2184
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
2003
2185
|
enqueue(chunk?: R): void;
|
|
2004
|
-
|
|
2186
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
2005
2187
|
error(reason: any): void;
|
|
2006
2188
|
}
|
|
2189
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
2007
2190
|
export declare abstract class ReadableByteStreamController {
|
|
2008
|
-
|
|
2191
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
2009
2192
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2010
|
-
|
|
2193
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
2011
2194
|
get desiredSize(): number | null;
|
|
2012
|
-
|
|
2195
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
2013
2196
|
close(): void;
|
|
2014
|
-
|
|
2197
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
2015
2198
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2016
|
-
|
|
2199
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
2017
2200
|
error(reason: any): void;
|
|
2018
2201
|
}
|
|
2202
|
+
/**
|
|
2203
|
+
* 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.
|
|
2204
|
+
*
|
|
2205
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2206
|
+
*/
|
|
2019
2207
|
export declare abstract class WritableStreamDefaultController {
|
|
2020
|
-
|
|
2208
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2021
2209
|
get signal(): AbortSignal;
|
|
2022
|
-
|
|
2210
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2023
2211
|
error(reason?: any): void;
|
|
2024
2212
|
}
|
|
2213
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2025
2214
|
export declare abstract class TransformStreamDefaultController<O = any> {
|
|
2026
|
-
|
|
2215
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2027
2216
|
get desiredSize(): number | null;
|
|
2028
|
-
|
|
2217
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2029
2218
|
enqueue(chunk?: O): void;
|
|
2030
|
-
|
|
2219
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2031
2220
|
error(reason: any): void;
|
|
2032
|
-
|
|
2221
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2033
2222
|
terminate(): void;
|
|
2034
2223
|
}
|
|
2035
2224
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2041,46 +2230,57 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
2041
2230
|
writable: WritableStream<W>;
|
|
2042
2231
|
readable: ReadableStream<R>;
|
|
2043
2232
|
}
|
|
2233
|
+
/**
|
|
2234
|
+
* This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.
|
|
2235
|
+
*
|
|
2236
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2237
|
+
*/
|
|
2044
2238
|
export declare class WritableStream<W = any> {
|
|
2045
2239
|
constructor(
|
|
2046
2240
|
underlyingSink?: UnderlyingSink,
|
|
2047
2241
|
queuingStrategy?: QueuingStrategy,
|
|
2048
2242
|
);
|
|
2049
|
-
|
|
2243
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2050
2244
|
get locked(): boolean;
|
|
2051
|
-
|
|
2245
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2052
2246
|
abort(reason?: any): Promise<void>;
|
|
2053
|
-
|
|
2247
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2054
2248
|
close(): Promise<void>;
|
|
2055
|
-
|
|
2249
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2056
2250
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2057
2251
|
}
|
|
2252
|
+
/**
|
|
2253
|
+
* This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink.
|
|
2254
|
+
*
|
|
2255
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2256
|
+
*/
|
|
2058
2257
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2059
2258
|
constructor(stream: WritableStream);
|
|
2060
|
-
|
|
2259
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2061
2260
|
get closed(): Promise<void>;
|
|
2062
|
-
|
|
2261
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2063
2262
|
get ready(): Promise<void>;
|
|
2064
|
-
|
|
2263
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2065
2264
|
get desiredSize(): number | null;
|
|
2066
|
-
|
|
2265
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2067
2266
|
abort(reason?: any): Promise<void>;
|
|
2068
|
-
|
|
2267
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2069
2268
|
close(): Promise<void>;
|
|
2070
|
-
|
|
2269
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2071
2270
|
write(chunk?: W): Promise<void>;
|
|
2072
|
-
|
|
2271
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2073
2272
|
releaseLock(): void;
|
|
2074
2273
|
}
|
|
2274
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2075
2275
|
export declare class TransformStream<I = any, O = any> {
|
|
2076
2276
|
constructor(
|
|
2077
2277
|
transformer?: Transformer<I, O>,
|
|
2078
2278
|
writableStrategy?: QueuingStrategy<I>,
|
|
2079
2279
|
readableStrategy?: QueuingStrategy<O>,
|
|
2080
2280
|
);
|
|
2081
|
-
|
|
2281
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2082
2282
|
get readable(): ReadableStream<O>;
|
|
2083
|
-
|
|
2283
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2084
2284
|
get writable(): WritableStream<I>;
|
|
2085
2285
|
}
|
|
2086
2286
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2101,18 +2301,21 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2101
2301
|
export interface ReadableStreamValuesOptions {
|
|
2102
2302
|
preventCancel?: boolean;
|
|
2103
2303
|
}
|
|
2304
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2104
2305
|
export declare class CompressionStream extends TransformStream<
|
|
2105
2306
|
ArrayBuffer | ArrayBufferView,
|
|
2106
2307
|
Uint8Array
|
|
2107
2308
|
> {
|
|
2108
2309
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2109
2310
|
}
|
|
2311
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2110
2312
|
export declare class DecompressionStream extends TransformStream<
|
|
2111
2313
|
ArrayBuffer | ArrayBufferView,
|
|
2112
2314
|
Uint8Array
|
|
2113
2315
|
> {
|
|
2114
2316
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2115
2317
|
}
|
|
2318
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2116
2319
|
export declare class TextEncoderStream extends TransformStream<
|
|
2117
2320
|
string,
|
|
2118
2321
|
Uint8Array
|
|
@@ -2120,6 +2323,7 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2120
2323
|
constructor();
|
|
2121
2324
|
get encoding(): string;
|
|
2122
2325
|
}
|
|
2326
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2123
2327
|
export declare class TextDecoderStream extends TransformStream<
|
|
2124
2328
|
ArrayBuffer | ArrayBufferView,
|
|
2125
2329
|
string
|
|
@@ -2133,20 +2337,30 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2133
2337
|
fatal?: boolean;
|
|
2134
2338
|
ignoreBOM?: boolean;
|
|
2135
2339
|
}
|
|
2340
|
+
/**
|
|
2341
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2342
|
+
*
|
|
2343
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2344
|
+
*/
|
|
2136
2345
|
export declare class ByteLengthQueuingStrategy
|
|
2137
2346
|
implements QueuingStrategy<ArrayBufferView>
|
|
2138
2347
|
{
|
|
2139
2348
|
constructor(init: QueuingStrategyInit);
|
|
2140
|
-
|
|
2349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2141
2350
|
get highWaterMark(): number;
|
|
2142
|
-
|
|
2351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2143
2352
|
get size(): (chunk?: any) => number;
|
|
2144
2353
|
}
|
|
2354
|
+
/**
|
|
2355
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2356
|
+
*
|
|
2357
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2358
|
+
*/
|
|
2145
2359
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2146
2360
|
constructor(init: QueuingStrategyInit);
|
|
2147
|
-
|
|
2361
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2148
2362
|
get highWaterMark(): number;
|
|
2149
|
-
|
|
2363
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2150
2364
|
get size(): (chunk?: any) => number;
|
|
2151
2365
|
}
|
|
2152
2366
|
export interface QueuingStrategyInit {
|
|
@@ -2190,6 +2404,7 @@ export interface TraceItem {
|
|
|
2190
2404
|
readonly dispatchNamespace?: string;
|
|
2191
2405
|
readonly scriptTags?: string[];
|
|
2192
2406
|
readonly outcome: string;
|
|
2407
|
+
readonly truncated: boolean;
|
|
2193
2408
|
}
|
|
2194
2409
|
export interface TraceItemAlarmEventInfo {
|
|
2195
2410
|
readonly scheduledTime: Date;
|
|
@@ -2271,76 +2486,115 @@ export interface TraceMetrics {
|
|
|
2271
2486
|
export interface UnsafeTraceMetrics {
|
|
2272
2487
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2273
2488
|
}
|
|
2489
|
+
/**
|
|
2490
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2491
|
+
*
|
|
2492
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2493
|
+
*/
|
|
2274
2494
|
export declare class URL {
|
|
2275
2495
|
constructor(url: string | URL, base?: string | URL);
|
|
2276
|
-
|
|
2496
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2277
2497
|
get origin(): string;
|
|
2278
|
-
|
|
2498
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2279
2499
|
get href(): string;
|
|
2280
|
-
|
|
2500
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2281
2501
|
set href(value: string);
|
|
2282
|
-
|
|
2502
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2283
2503
|
get protocol(): string;
|
|
2284
|
-
|
|
2504
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2285
2505
|
set protocol(value: string);
|
|
2286
|
-
|
|
2506
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2287
2507
|
get username(): string;
|
|
2288
|
-
|
|
2508
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2289
2509
|
set username(value: string);
|
|
2290
|
-
|
|
2510
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2291
2511
|
get password(): string;
|
|
2292
|
-
|
|
2512
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2293
2513
|
set password(value: string);
|
|
2294
|
-
|
|
2514
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2295
2515
|
get host(): string;
|
|
2296
|
-
|
|
2516
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2297
2517
|
set host(value: string);
|
|
2298
|
-
|
|
2518
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2299
2519
|
get hostname(): string;
|
|
2300
|
-
|
|
2520
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2301
2521
|
set hostname(value: string);
|
|
2302
|
-
|
|
2522
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2303
2523
|
get port(): string;
|
|
2304
|
-
|
|
2524
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2305
2525
|
set port(value: string);
|
|
2306
|
-
|
|
2526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2307
2527
|
get pathname(): string;
|
|
2308
|
-
|
|
2528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2309
2529
|
set pathname(value: string);
|
|
2310
|
-
|
|
2530
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2311
2531
|
get search(): string;
|
|
2312
|
-
|
|
2532
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2313
2533
|
set search(value: string);
|
|
2314
|
-
|
|
2534
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2315
2535
|
get hash(): string;
|
|
2316
|
-
|
|
2536
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2317
2537
|
set hash(value: string);
|
|
2318
|
-
|
|
2538
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2319
2539
|
get searchParams(): URLSearchParams;
|
|
2320
|
-
|
|
2540
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2321
2541
|
toJSON(): string;
|
|
2542
|
+
/*function toString() { [native code] }*/
|
|
2322
2543
|
toString(): string;
|
|
2323
|
-
|
|
2544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
|
|
2324
2545
|
static canParse(url: string, base?: string): boolean;
|
|
2325
2546
|
static parse(url: string, base?: string): URL | null;
|
|
2326
2547
|
}
|
|
2548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2327
2549
|
export declare class URLSearchParams {
|
|
2328
2550
|
constructor(
|
|
2329
2551
|
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
2330
2552
|
);
|
|
2553
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2331
2554
|
get size(): number;
|
|
2555
|
+
/**
|
|
2556
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2557
|
+
*
|
|
2558
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2559
|
+
*/
|
|
2332
2560
|
append(name: string, value: string): void;
|
|
2561
|
+
/**
|
|
2562
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2563
|
+
*
|
|
2564
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2565
|
+
*/
|
|
2333
2566
|
delete(name: string): void;
|
|
2567
|
+
/**
|
|
2568
|
+
* Returns the first value associated to the given search parameter.
|
|
2569
|
+
*
|
|
2570
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2571
|
+
*/
|
|
2334
2572
|
get(name: string): string | null;
|
|
2573
|
+
/**
|
|
2574
|
+
* Returns all the values association with a given search parameter.
|
|
2575
|
+
*
|
|
2576
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2577
|
+
*/
|
|
2335
2578
|
getAll(name: string): string[];
|
|
2579
|
+
/**
|
|
2580
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2581
|
+
*
|
|
2582
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2583
|
+
*/
|
|
2336
2584
|
has(name: string): boolean;
|
|
2585
|
+
/**
|
|
2586
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2587
|
+
*
|
|
2588
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2589
|
+
*/
|
|
2337
2590
|
set(name: string, value: string): void;
|
|
2591
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2338
2592
|
sort(): void;
|
|
2339
|
-
|
|
2593
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2340
2594
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2341
|
-
|
|
2595
|
+
/* Returns a list of keys in the search params. */
|
|
2342
2596
|
keys(): IterableIterator<string>;
|
|
2343
|
-
|
|
2597
|
+
/* Returns a list of values in the search params. */
|
|
2344
2598
|
values(): IterableIterator<string>;
|
|
2345
2599
|
forEach<This = unknown>(
|
|
2346
2600
|
callback: (
|
|
@@ -2351,6 +2605,7 @@ export declare class URLSearchParams {
|
|
|
2351
2605
|
) => void,
|
|
2352
2606
|
thisArg?: This,
|
|
2353
2607
|
): void;
|
|
2608
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2354
2609
|
toString(): string;
|
|
2355
2610
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2356
2611
|
}
|
|
@@ -2403,6 +2658,11 @@ export interface URLPatternURLPatternResult {
|
|
|
2403
2658
|
export interface URLPatternURLPatternOptions {
|
|
2404
2659
|
ignoreCase?: boolean;
|
|
2405
2660
|
}
|
|
2661
|
+
/**
|
|
2662
|
+
* A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute.
|
|
2663
|
+
*
|
|
2664
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2665
|
+
*/
|
|
2406
2666
|
export declare class CloseEvent extends Event {
|
|
2407
2667
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2408
2668
|
/**
|
|
@@ -2429,8 +2689,18 @@ export interface CloseEventInit {
|
|
|
2429
2689
|
reason?: string;
|
|
2430
2690
|
wasClean?: boolean;
|
|
2431
2691
|
}
|
|
2692
|
+
/**
|
|
2693
|
+
* A message received by a target object.
|
|
2694
|
+
*
|
|
2695
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2696
|
+
*/
|
|
2432
2697
|
export declare class MessageEvent extends Event {
|
|
2433
2698
|
constructor(type: string, initializer: MessageEventInit);
|
|
2699
|
+
/**
|
|
2700
|
+
* Returns the data of the message.
|
|
2701
|
+
*
|
|
2702
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2703
|
+
*/
|
|
2434
2704
|
readonly data: ArrayBuffer | string;
|
|
2435
2705
|
}
|
|
2436
2706
|
export interface MessageEventInit {
|
|
@@ -2442,6 +2712,11 @@ export type WebSocketEventMap = {
|
|
|
2442
2712
|
open: Event;
|
|
2443
2713
|
error: ErrorEvent;
|
|
2444
2714
|
};
|
|
2715
|
+
/**
|
|
2716
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2717
|
+
*
|
|
2718
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2719
|
+
*/
|
|
2445
2720
|
export declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2446
2721
|
constructor(url: string, protocols?: string[] | string);
|
|
2447
2722
|
accept(): void;
|
|
@@ -3034,6 +3309,7 @@ export interface GPUOrigin3DDict {
|
|
|
3034
3309
|
y?: number;
|
|
3035
3310
|
z?: number;
|
|
3036
3311
|
}
|
|
3312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3037
3313
|
export declare class EventSource {
|
|
3038
3314
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3039
3315
|
/**
|
|
@@ -3060,17 +3336,17 @@ export declare class EventSource {
|
|
|
3060
3336
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3061
3337
|
*/
|
|
3062
3338
|
get readyState(): number;
|
|
3063
|
-
|
|
3339
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3064
3340
|
get onopen(): any | null;
|
|
3065
|
-
|
|
3341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3066
3342
|
set onopen(value: any | null);
|
|
3067
|
-
|
|
3343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3068
3344
|
get onmessage(): any | null;
|
|
3069
|
-
|
|
3345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3070
3346
|
set onmessage(value: any | null);
|
|
3071
|
-
|
|
3347
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3072
3348
|
get onerror(): any | null;
|
|
3073
|
-
|
|
3349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3074
3350
|
set onerror(value: any | null);
|
|
3075
3351
|
static readonly CONNECTING: number;
|
|
3076
3352
|
static readonly OPEN: number;
|