@cloudflare/workers-types 4.20240712.0 → 4.20240722.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 +433 -166
- package/2021-11-03/index.ts +433 -166
- package/2022-01-31/index.d.ts +449 -176
- package/2022-01-31/index.ts +449 -176
- package/2022-03-21/index.d.ts +449 -176
- package/2022-03-21/index.ts +449 -176
- package/2022-08-04/index.d.ts +449 -176
- package/2022-08-04/index.ts +449 -176
- package/2022-10-31/index.d.ts +450 -177
- package/2022-10-31/index.ts +450 -177
- package/2022-11-30/index.d.ts +455 -173
- package/2022-11-30/index.ts +455 -173
- package/2023-03-01/index.d.ts +456 -173
- package/2023-03-01/index.ts +456 -173
- package/2023-07-01/index.d.ts +456 -173
- package/2023-07-01/index.ts +456 -173
- package/experimental/index.d.ts +456 -173
- package/experimental/index.ts +456 -173
- package/index.d.ts +433 -166
- package/index.ts +433 -166
- package/oldest/index.d.ts +433 -166
- package/oldest/index.ts +433 -166
- package/package.json +1 -1
package/2022-11-30/index.d.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
|
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 @@ type WorkerGlobalScopeEventMap = {
|
|
|
64
69
|
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
|
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
|
declare const console: Console;
|
|
@@ -195,6 +200,7 @@ 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
|
*/
|
|
@@ -317,54 +323,73 @@ declare function removeEventListener<
|
|
|
317
323
|
declare function dispatchEvent(
|
|
318
324
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
319
325
|
): boolean;
|
|
320
|
-
|
|
326
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
321
327
|
declare function btoa(data: string): string;
|
|
322
|
-
|
|
328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
323
329
|
declare function atob(data: string): string;
|
|
324
|
-
|
|
330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
325
331
|
declare function setTimeout(
|
|
326
332
|
callback: (...args: any[]) => void,
|
|
327
333
|
msDelay?: number,
|
|
328
334
|
): number;
|
|
329
|
-
|
|
335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
330
336
|
declare function setTimeout<Args extends any[]>(
|
|
331
337
|
callback: (...args: Args) => void,
|
|
332
338
|
msDelay?: number,
|
|
333
339
|
...args: Args
|
|
334
340
|
): number;
|
|
335
|
-
|
|
341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
336
342
|
declare function clearTimeout(timeoutId: number | null): void;
|
|
337
|
-
|
|
343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
338
344
|
declare function setInterval(
|
|
339
345
|
callback: (...args: any[]) => void,
|
|
340
346
|
msDelay?: number,
|
|
341
347
|
): number;
|
|
342
|
-
|
|
348
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
343
349
|
declare function setInterval<Args extends any[]>(
|
|
344
350
|
callback: (...args: Args) => void,
|
|
345
351
|
msDelay?: number,
|
|
346
352
|
...args: Args
|
|
347
353
|
): number;
|
|
348
|
-
|
|
354
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
349
355
|
declare function clearInterval(timeoutId: number | null): void;
|
|
350
|
-
|
|
356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
351
357
|
declare function queueMicrotask(task: Function): void;
|
|
352
|
-
|
|
358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
353
359
|
declare function structuredClone<T>(
|
|
354
360
|
value: T,
|
|
355
361
|
options?: StructuredSerializeOptions,
|
|
356
362
|
): T;
|
|
357
|
-
|
|
363
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
358
364
|
declare function reportError(error: any): void;
|
|
359
|
-
|
|
365
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
360
366
|
declare function fetch(
|
|
361
367
|
input: RequestInfo,
|
|
362
368
|
init?: RequestInit<RequestInitCfProperties>,
|
|
363
369
|
): Promise<Response>;
|
|
364
370
|
declare const self: ServiceWorkerGlobalScope;
|
|
371
|
+
/**
|
|
372
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
373
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
374
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
375
|
+
* compared to those implemented in most browsers.
|
|
376
|
+
*
|
|
377
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
378
|
+
*/
|
|
365
379
|
declare const crypto: Crypto;
|
|
380
|
+
/**
|
|
381
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
382
|
+
*
|
|
383
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
384
|
+
*/
|
|
366
385
|
declare const caches: CacheStorage;
|
|
367
386
|
declare const scheduler: Scheduler;
|
|
387
|
+
/**
|
|
388
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
389
|
+
* as well as timing of subrequests and other operations.
|
|
390
|
+
*
|
|
391
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
392
|
+
*/
|
|
368
393
|
declare const performance: Performance;
|
|
369
394
|
declare const origin: string;
|
|
370
395
|
declare const navigator: Navigator;
|
|
@@ -419,10 +444,11 @@ interface ExportedHandler<
|
|
|
419
444
|
interface StructuredSerializeOptions {
|
|
420
445
|
transfer?: any[];
|
|
421
446
|
}
|
|
447
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
422
448
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
423
|
-
|
|
449
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
424
450
|
readonly promise: Promise<any>;
|
|
425
|
-
|
|
451
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
426
452
|
readonly reason: any;
|
|
427
453
|
}
|
|
428
454
|
declare abstract class Navigator {
|
|
@@ -440,14 +466,15 @@ declare abstract class Navigator {
|
|
|
440
466
|
readonly gpu: GPU;
|
|
441
467
|
}
|
|
442
468
|
/**
|
|
443
|
-
*
|
|
469
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
470
|
+
* as well as timing of subrequests and other operations.
|
|
444
471
|
*
|
|
445
|
-
* [
|
|
472
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
446
473
|
*/
|
|
447
474
|
interface Performance {
|
|
448
|
-
|
|
475
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
449
476
|
readonly timeOrigin: number;
|
|
450
|
-
|
|
477
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
451
478
|
now(): number;
|
|
452
479
|
}
|
|
453
480
|
interface AlarmInvocationInfo {
|
|
@@ -636,6 +663,11 @@ interface AnalyticsEngineDataPoint {
|
|
|
636
663
|
doubles?: number[];
|
|
637
664
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
638
665
|
}
|
|
666
|
+
/**
|
|
667
|
+
* An event which takes place in the DOM.
|
|
668
|
+
*
|
|
669
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
670
|
+
*/
|
|
639
671
|
declare class Event {
|
|
640
672
|
constructor(type: string, init?: EventInit);
|
|
641
673
|
/**
|
|
@@ -759,6 +791,11 @@ interface EventListenerObject<EventType extends Event = Event> {
|
|
|
759
791
|
type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
760
792
|
| EventListener<EventType>
|
|
761
793
|
| EventListenerObject<EventType>;
|
|
794
|
+
/**
|
|
795
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
796
|
+
*
|
|
797
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
798
|
+
*/
|
|
762
799
|
declare class EventTarget<
|
|
763
800
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
764
801
|
> {
|
|
@@ -814,6 +851,11 @@ interface EventTargetAddEventListenerOptions {
|
|
|
814
851
|
interface EventTargetHandlerObject {
|
|
815
852
|
handleEvent: (event: Event) => any | undefined;
|
|
816
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
856
|
+
*
|
|
857
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
858
|
+
*/
|
|
817
859
|
declare class AbortController {
|
|
818
860
|
constructor();
|
|
819
861
|
/**
|
|
@@ -829,11 +871,17 @@ declare class AbortController {
|
|
|
829
871
|
*/
|
|
830
872
|
abort(reason?: any): void;
|
|
831
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* 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.
|
|
876
|
+
*
|
|
877
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
878
|
+
*/
|
|
832
879
|
declare abstract class AbortSignal extends EventTarget {
|
|
833
|
-
|
|
880
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
834
881
|
static abort(reason?: any): AbortSignal;
|
|
835
|
-
|
|
882
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
836
883
|
static timeout(delay: number): AbortSignal;
|
|
884
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
837
885
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
838
886
|
/**
|
|
839
887
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -841,13 +889,13 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
841
889
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
842
890
|
*/
|
|
843
891
|
get aborted(): boolean;
|
|
844
|
-
|
|
892
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
845
893
|
get reason(): any;
|
|
846
|
-
|
|
894
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
847
895
|
get onabort(): any | null;
|
|
848
|
-
|
|
896
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
849
897
|
set onabort(value: any | null);
|
|
850
|
-
|
|
898
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
851
899
|
throwIfAborted(): void;
|
|
852
900
|
}
|
|
853
901
|
interface Scheduler {
|
|
@@ -856,10 +904,16 @@ interface Scheduler {
|
|
|
856
904
|
interface SchedulerWaitOptions {
|
|
857
905
|
signal?: AbortSignal;
|
|
858
906
|
}
|
|
907
|
+
/**
|
|
908
|
+
* 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.
|
|
909
|
+
*
|
|
910
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
911
|
+
*/
|
|
859
912
|
declare abstract class ExtendableEvent extends Event {
|
|
860
|
-
|
|
913
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
861
914
|
waitUntil(promise: Promise<any>): void;
|
|
862
915
|
}
|
|
916
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
863
917
|
declare class CustomEvent<T = any> extends Event {
|
|
864
918
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
865
919
|
/**
|
|
@@ -875,59 +929,90 @@ interface CustomEventCustomEventInit {
|
|
|
875
929
|
composed?: boolean;
|
|
876
930
|
detail?: any;
|
|
877
931
|
}
|
|
932
|
+
/**
|
|
933
|
+
* 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.
|
|
934
|
+
*
|
|
935
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
936
|
+
*/
|
|
878
937
|
declare class Blob {
|
|
879
938
|
constructor(
|
|
880
939
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
881
940
|
options?: BlobOptions,
|
|
882
941
|
);
|
|
883
|
-
|
|
942
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
884
943
|
get size(): number;
|
|
885
|
-
|
|
944
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
886
945
|
get type(): string;
|
|
887
|
-
|
|
946
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
888
947
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
889
|
-
|
|
948
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
890
949
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
891
950
|
bytes(): Promise<Uint8Array>;
|
|
892
|
-
|
|
951
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
893
952
|
text(): Promise<string>;
|
|
894
|
-
|
|
953
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
895
954
|
stream(): ReadableStream;
|
|
896
955
|
}
|
|
897
956
|
interface BlobOptions {
|
|
898
957
|
type?: string;
|
|
899
958
|
}
|
|
959
|
+
/**
|
|
960
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
961
|
+
*
|
|
962
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
963
|
+
*/
|
|
900
964
|
declare class File extends Blob {
|
|
901
965
|
constructor(
|
|
902
966
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
903
967
|
name: string,
|
|
904
968
|
options?: FileOptions,
|
|
905
969
|
);
|
|
906
|
-
|
|
970
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
907
971
|
get name(): string;
|
|
908
|
-
|
|
972
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
909
973
|
get lastModified(): number;
|
|
910
974
|
}
|
|
911
975
|
interface FileOptions {
|
|
912
976
|
type?: string;
|
|
913
977
|
lastModified?: number;
|
|
914
978
|
}
|
|
979
|
+
/**
|
|
980
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
981
|
+
*
|
|
982
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
983
|
+
*/
|
|
915
984
|
declare abstract class CacheStorage {
|
|
916
|
-
|
|
985
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
917
986
|
open(cacheName: string): Promise<Cache>;
|
|
918
987
|
readonly default: Cache;
|
|
919
988
|
}
|
|
989
|
+
/**
|
|
990
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
991
|
+
*
|
|
992
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
993
|
+
*/
|
|
920
994
|
declare abstract class Cache {
|
|
995
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
921
996
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
997
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
922
998
|
match(
|
|
923
999
|
request: RequestInfo,
|
|
924
1000
|
options?: CacheQueryOptions,
|
|
925
1001
|
): Promise<Response | undefined>;
|
|
1002
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
926
1003
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
927
1004
|
}
|
|
928
1005
|
interface CacheQueryOptions {
|
|
929
1006
|
ignoreMethod?: boolean;
|
|
930
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
1010
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
1011
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
1012
|
+
* compared to those implemented in most browsers.
|
|
1013
|
+
*
|
|
1014
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
1015
|
+
*/
|
|
931
1016
|
declare abstract class Crypto {
|
|
932
1017
|
/**
|
|
933
1018
|
* Available only in secure contexts.
|
|
@@ -935,7 +1020,7 @@ declare abstract class Crypto {
|
|
|
935
1020
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
936
1021
|
*/
|
|
937
1022
|
get subtle(): SubtleCrypto;
|
|
938
|
-
|
|
1023
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
939
1024
|
getRandomValues<
|
|
940
1025
|
T extends
|
|
941
1026
|
| Int8Array
|
|
@@ -955,39 +1040,50 @@ declare abstract class Crypto {
|
|
|
955
1040
|
randomUUID(): string;
|
|
956
1041
|
DigestStream: typeof DigestStream;
|
|
957
1042
|
}
|
|
1043
|
+
/**
|
|
1044
|
+
* 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).
|
|
1045
|
+
* Available only in secure contexts.
|
|
1046
|
+
*
|
|
1047
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1048
|
+
*/
|
|
958
1049
|
declare abstract class SubtleCrypto {
|
|
1050
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
959
1051
|
encrypt(
|
|
960
1052
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
961
1053
|
key: CryptoKey,
|
|
962
1054
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
963
1055
|
): Promise<ArrayBuffer>;
|
|
1056
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
964
1057
|
decrypt(
|
|
965
1058
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
966
1059
|
key: CryptoKey,
|
|
967
1060
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
968
1061
|
): Promise<ArrayBuffer>;
|
|
1062
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
969
1063
|
sign(
|
|
970
1064
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
971
1065
|
key: CryptoKey,
|
|
972
1066
|
data: ArrayBuffer | ArrayBufferView,
|
|
973
1067
|
): Promise<ArrayBuffer>;
|
|
1068
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
974
1069
|
verify(
|
|
975
1070
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
976
1071
|
key: CryptoKey,
|
|
977
1072
|
signature: ArrayBuffer | ArrayBufferView,
|
|
978
1073
|
data: ArrayBuffer | ArrayBufferView,
|
|
979
1074
|
): Promise<boolean>;
|
|
1075
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
980
1076
|
digest(
|
|
981
1077
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
982
1078
|
data: ArrayBuffer | ArrayBufferView,
|
|
983
1079
|
): Promise<ArrayBuffer>;
|
|
984
|
-
|
|
1080
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
985
1081
|
generateKey(
|
|
986
1082
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
987
1083
|
extractable: boolean,
|
|
988
1084
|
keyUsages: string[],
|
|
989
1085
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
990
|
-
|
|
1086
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
991
1087
|
deriveKey(
|
|
992
1088
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
993
1089
|
baseKey: CryptoKey,
|
|
@@ -995,12 +1091,13 @@ declare abstract class SubtleCrypto {
|
|
|
995
1091
|
extractable: boolean,
|
|
996
1092
|
keyUsages: string[],
|
|
997
1093
|
): Promise<CryptoKey>;
|
|
1094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
998
1095
|
deriveBits(
|
|
999
1096
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1000
1097
|
baseKey: CryptoKey,
|
|
1001
|
-
length
|
|
1098
|
+
length?: number | null,
|
|
1002
1099
|
): Promise<ArrayBuffer>;
|
|
1003
|
-
|
|
1100
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
1004
1101
|
importKey(
|
|
1005
1102
|
format: string,
|
|
1006
1103
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1008,14 +1105,16 @@ declare abstract class SubtleCrypto {
|
|
|
1008
1105
|
extractable: boolean,
|
|
1009
1106
|
keyUsages: string[],
|
|
1010
1107
|
): Promise<CryptoKey>;
|
|
1108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
1011
1109
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
1012
1111
|
wrapKey(
|
|
1013
1112
|
format: string,
|
|
1014
1113
|
key: CryptoKey,
|
|
1015
1114
|
wrappingKey: CryptoKey,
|
|
1016
1115
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1017
1116
|
): Promise<ArrayBuffer>;
|
|
1018
|
-
|
|
1117
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
1019
1118
|
unwrapKey(
|
|
1020
1119
|
format: string,
|
|
1021
1120
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1030,12 +1129,18 @@ declare abstract class SubtleCrypto {
|
|
|
1030
1129
|
b: ArrayBuffer | ArrayBufferView,
|
|
1031
1130
|
): boolean;
|
|
1032
1131
|
}
|
|
1132
|
+
/**
|
|
1133
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1134
|
+
* Available only in secure contexts.
|
|
1135
|
+
*
|
|
1136
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1137
|
+
*/
|
|
1033
1138
|
declare abstract class CryptoKey {
|
|
1034
|
-
|
|
1139
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1035
1140
|
readonly type: string;
|
|
1036
|
-
|
|
1141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1037
1142
|
readonly extractable: boolean;
|
|
1038
|
-
|
|
1143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1039
1144
|
readonly algorithm:
|
|
1040
1145
|
| CryptoKeyKeyAlgorithm
|
|
1041
1146
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1043,7 +1148,7 @@ declare abstract class CryptoKey {
|
|
|
1043
1148
|
| CryptoKeyRsaKeyAlgorithm
|
|
1044
1149
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1045
1150
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1046
|
-
|
|
1151
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1047
1152
|
readonly usages: string[];
|
|
1048
1153
|
}
|
|
1049
1154
|
interface CryptoKeyPair {
|
|
@@ -1151,6 +1256,11 @@ declare class DigestStream extends WritableStream<
|
|
|
1151
1256
|
get digest(): Promise<ArrayBuffer>;
|
|
1152
1257
|
get bytesWritten(): number | bigint;
|
|
1153
1258
|
}
|
|
1259
|
+
/**
|
|
1260
|
+
* 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.
|
|
1261
|
+
*
|
|
1262
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1263
|
+
*/
|
|
1154
1264
|
declare class TextDecoder {
|
|
1155
1265
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1156
1266
|
/**
|
|
@@ -1176,6 +1286,11 @@ declare class TextDecoder {
|
|
|
1176
1286
|
get fatal(): boolean;
|
|
1177
1287
|
get ignoreBOM(): boolean;
|
|
1178
1288
|
}
|
|
1289
|
+
/**
|
|
1290
|
+
* 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.
|
|
1291
|
+
*
|
|
1292
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1293
|
+
*/
|
|
1179
1294
|
declare class TextEncoder {
|
|
1180
1295
|
constructor();
|
|
1181
1296
|
/**
|
|
@@ -1206,17 +1321,22 @@ interface TextEncoderEncodeIntoResult {
|
|
|
1206
1321
|
read: number;
|
|
1207
1322
|
written: number;
|
|
1208
1323
|
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Events providing information related to errors in scripts or in files.
|
|
1326
|
+
*
|
|
1327
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1328
|
+
*/
|
|
1209
1329
|
declare class ErrorEvent extends Event {
|
|
1210
1330
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1211
|
-
|
|
1331
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1212
1332
|
get filename(): string;
|
|
1213
|
-
|
|
1333
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1214
1334
|
get message(): string;
|
|
1215
|
-
|
|
1335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1216
1336
|
get lineno(): number;
|
|
1217
|
-
|
|
1337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1218
1338
|
get colno(): number;
|
|
1219
|
-
|
|
1339
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1220
1340
|
get error(): any;
|
|
1221
1341
|
}
|
|
1222
1342
|
interface ErrorEventErrorEventInit {
|
|
@@ -1226,21 +1346,34 @@ interface ErrorEventErrorEventInit {
|
|
|
1226
1346
|
colno?: number;
|
|
1227
1347
|
error?: any;
|
|
1228
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* 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".
|
|
1351
|
+
*
|
|
1352
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1353
|
+
*/
|
|
1229
1354
|
declare class FormData {
|
|
1230
1355
|
constructor();
|
|
1356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1231
1357
|
append(name: string, value: string): void;
|
|
1358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1232
1359
|
append(name: string, value: Blob, filename?: string): void;
|
|
1360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1233
1361
|
delete(name: string): void;
|
|
1362
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1234
1363
|
get(name: string): (File | string) | null;
|
|
1364
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1235
1365
|
getAll(name: string): (File | string)[];
|
|
1366
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1236
1367
|
has(name: string): boolean;
|
|
1368
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1237
1369
|
set(name: string, value: string): void;
|
|
1370
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1238
1371
|
set(name: string, value: Blob, filename?: string): void;
|
|
1239
|
-
|
|
1372
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1240
1373
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1241
|
-
|
|
1374
|
+
/* Returns a list of keys in the list. */
|
|
1242
1375
|
keys(): IterableIterator<string>;
|
|
1243
|
-
|
|
1376
|
+
/* Returns a list of values in the list. */
|
|
1244
1377
|
values(): IterableIterator<File | string>;
|
|
1245
1378
|
forEach<This = unknown>(
|
|
1246
1379
|
callback: (
|
|
@@ -1326,10 +1459,15 @@ interface Text {
|
|
|
1326
1459
|
interface DocumentEnd {
|
|
1327
1460
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1328
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* 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.
|
|
1464
|
+
*
|
|
1465
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1466
|
+
*/
|
|
1329
1467
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1330
|
-
|
|
1468
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1331
1469
|
readonly request: Request;
|
|
1332
|
-
|
|
1470
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1333
1471
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1334
1472
|
passThroughOnException(): void;
|
|
1335
1473
|
}
|
|
@@ -1337,23 +1475,33 @@ type HeadersInit =
|
|
|
1337
1475
|
| Headers
|
|
1338
1476
|
| Iterable<Iterable<string>>
|
|
1339
1477
|
| Record<string, string>;
|
|
1478
|
+
/**
|
|
1479
|
+
* 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.
|
|
1480
|
+
*
|
|
1481
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1482
|
+
*/
|
|
1340
1483
|
declare class Headers {
|
|
1341
1484
|
constructor(init?: HeadersInit);
|
|
1485
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1342
1486
|
get(name: string): string | null;
|
|
1343
1487
|
getAll(name: string): string[];
|
|
1488
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1344
1489
|
has(name: string): boolean;
|
|
1490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1345
1491
|
set(name: string, value: string): void;
|
|
1492
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1346
1493
|
append(name: string, value: string): void;
|
|
1494
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1347
1495
|
delete(name: string): void;
|
|
1348
1496
|
forEach<This = unknown>(
|
|
1349
1497
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1350
1498
|
thisArg?: This,
|
|
1351
1499
|
): void;
|
|
1352
|
-
|
|
1500
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1353
1501
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1354
|
-
|
|
1502
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1355
1503
|
keys(): IterableIterator<string>;
|
|
1356
|
-
|
|
1504
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1357
1505
|
values(): IterableIterator<string>;
|
|
1358
1506
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1359
1507
|
}
|
|
@@ -1366,34 +1514,46 @@ type BodyInit =
|
|
|
1366
1514
|
| URLSearchParams
|
|
1367
1515
|
| FormData;
|
|
1368
1516
|
declare abstract class Body {
|
|
1517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1369
1518
|
get body(): ReadableStream | null;
|
|
1519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1370
1520
|
get bodyUsed(): boolean;
|
|
1521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1371
1522
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1372
1523
|
bytes(): Promise<Uint8Array>;
|
|
1524
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1373
1525
|
text(): Promise<string>;
|
|
1526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1374
1527
|
json<T>(): Promise<T>;
|
|
1528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1375
1529
|
formData(): Promise<FormData>;
|
|
1530
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1376
1531
|
blob(): Promise<Blob>;
|
|
1377
1532
|
}
|
|
1533
|
+
/**
|
|
1534
|
+
* This Fetch API interface represents the response to a request.
|
|
1535
|
+
*
|
|
1536
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1537
|
+
*/
|
|
1378
1538
|
declare class Response extends Body {
|
|
1379
1539
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1380
|
-
|
|
1540
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1381
1541
|
static redirect(url: string, status?: number): Response;
|
|
1382
|
-
|
|
1542
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1383
1543
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1384
|
-
|
|
1544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1385
1545
|
clone(): Response;
|
|
1386
|
-
|
|
1546
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1387
1547
|
get status(): number;
|
|
1388
|
-
|
|
1548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1389
1549
|
get statusText(): string;
|
|
1390
|
-
|
|
1550
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1391
1551
|
get headers(): Headers;
|
|
1392
|
-
|
|
1552
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1393
1553
|
get ok(): boolean;
|
|
1394
|
-
|
|
1554
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1395
1555
|
get redirected(): boolean;
|
|
1396
|
-
|
|
1556
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1397
1557
|
get url(): string;
|
|
1398
1558
|
get webSocket(): WebSocket | null;
|
|
1399
1559
|
get cf(): any | undefined;
|
|
@@ -1410,12 +1570,17 @@ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
|
1410
1570
|
| Request<CfHostMetadata, Cf>
|
|
1411
1571
|
| string
|
|
1412
1572
|
| URL;
|
|
1573
|
+
/**
|
|
1574
|
+
* This Fetch API interface represents a resource request.
|
|
1575
|
+
*
|
|
1576
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1577
|
+
*/
|
|
1413
1578
|
declare class Request<
|
|
1414
1579
|
CfHostMetadata = unknown,
|
|
1415
1580
|
Cf = CfProperties<CfHostMetadata>,
|
|
1416
1581
|
> extends Body {
|
|
1417
1582
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1418
|
-
|
|
1583
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1419
1584
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1420
1585
|
/**
|
|
1421
1586
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1461,21 +1626,29 @@ declare class Request<
|
|
|
1461
1626
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1462
1627
|
*/
|
|
1463
1628
|
get keepalive(): boolean;
|
|
1629
|
+
/**
|
|
1630
|
+
* Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
1631
|
+
*
|
|
1632
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1633
|
+
*/
|
|
1634
|
+
get cache(): string | undefined;
|
|
1464
1635
|
}
|
|
1465
1636
|
interface RequestInit<Cf = CfProperties> {
|
|
1466
|
-
|
|
1637
|
+
/* A string to set request's method. */
|
|
1467
1638
|
method?: string;
|
|
1468
|
-
|
|
1639
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1469
1640
|
headers?: HeadersInit;
|
|
1470
|
-
|
|
1641
|
+
/* A BodyInit object or null to set request's body. */
|
|
1471
1642
|
body?: BodyInit | null;
|
|
1472
|
-
|
|
1643
|
+
/* 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. */
|
|
1473
1644
|
redirect?: string;
|
|
1474
1645
|
fetcher?: Fetcher | null;
|
|
1475
1646
|
cf?: Cf;
|
|
1476
|
-
|
|
1647
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1648
|
+
cache?: string;
|
|
1649
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1477
1650
|
integrity?: string;
|
|
1478
|
-
|
|
1651
|
+
/* An AbortSignal to set request's signal. */
|
|
1479
1652
|
signal?: AbortSignal | null;
|
|
1480
1653
|
}
|
|
1481
1654
|
type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
|
|
@@ -1908,31 +2081,36 @@ type ReadableStreamReadResult<R = any> =
|
|
|
1908
2081
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1909
2082
|
*/
|
|
1910
2083
|
interface ReadableStream<R = any> {
|
|
1911
|
-
|
|
2084
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1912
2085
|
get locked(): boolean;
|
|
1913
|
-
|
|
2086
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1914
2087
|
cancel(reason?: any): Promise<void>;
|
|
1915
|
-
|
|
2088
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1916
2089
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1917
|
-
|
|
2090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1918
2091
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1919
|
-
|
|
2092
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1920
2093
|
pipeThrough<T>(
|
|
1921
2094
|
transform: ReadableWritablePair<T, R>,
|
|
1922
2095
|
options?: StreamPipeOptions,
|
|
1923
2096
|
): ReadableStream<T>;
|
|
1924
|
-
|
|
2097
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1925
2098
|
pipeTo(
|
|
1926
2099
|
destination: WritableStream<R>,
|
|
1927
2100
|
options?: StreamPipeOptions,
|
|
1928
2101
|
): Promise<void>;
|
|
1929
|
-
|
|
2102
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1930
2103
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1931
2104
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1932
2105
|
[Symbol.asyncIterator](
|
|
1933
2106
|
options?: ReadableStreamValuesOptions,
|
|
1934
2107
|
): AsyncIterableIterator<R>;
|
|
1935
2108
|
}
|
|
2109
|
+
/**
|
|
2110
|
+
* 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.
|
|
2111
|
+
*
|
|
2112
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2113
|
+
*/
|
|
1936
2114
|
declare const ReadableStream: {
|
|
1937
2115
|
prototype: ReadableStream;
|
|
1938
2116
|
new (
|
|
@@ -1944,24 +2122,26 @@ declare const ReadableStream: {
|
|
|
1944
2122
|
strategy?: QueuingStrategy<R>,
|
|
1945
2123
|
): ReadableStream<R>;
|
|
1946
2124
|
};
|
|
2125
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1947
2126
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
1948
2127
|
constructor(stream: ReadableStream);
|
|
1949
2128
|
get closed(): Promise<void>;
|
|
1950
2129
|
cancel(reason?: any): Promise<void>;
|
|
1951
|
-
|
|
2130
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1952
2131
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1953
|
-
|
|
2132
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1954
2133
|
releaseLock(): void;
|
|
1955
2134
|
}
|
|
2135
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1956
2136
|
declare class ReadableStreamBYOBReader {
|
|
1957
2137
|
constructor(stream: ReadableStream);
|
|
1958
2138
|
get closed(): Promise<void>;
|
|
1959
2139
|
cancel(reason?: any): Promise<void>;
|
|
1960
|
-
|
|
2140
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1961
2141
|
read<T extends ArrayBufferView>(
|
|
1962
2142
|
view: T,
|
|
1963
2143
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1964
|
-
|
|
2144
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1965
2145
|
releaseLock(): void;
|
|
1966
2146
|
readAtLeast<T extends ArrayBufferView>(
|
|
1967
2147
|
minElements: number,
|
|
@@ -1979,51 +2159,60 @@ interface ReadableStreamGetReaderOptions {
|
|
|
1979
2159
|
*/
|
|
1980
2160
|
mode: "byob";
|
|
1981
2161
|
}
|
|
2162
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1982
2163
|
declare abstract class ReadableStreamBYOBRequest {
|
|
1983
|
-
|
|
2164
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1984
2165
|
get view(): Uint8Array | null;
|
|
1985
|
-
|
|
2166
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1986
2167
|
respond(bytesWritten: number): void;
|
|
1987
|
-
|
|
2168
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1988
2169
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1989
2170
|
get atLeast(): number | null;
|
|
1990
2171
|
}
|
|
2172
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1991
2173
|
declare abstract class ReadableStreamDefaultController<R = any> {
|
|
1992
|
-
|
|
2174
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1993
2175
|
get desiredSize(): number | null;
|
|
1994
|
-
|
|
2176
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1995
2177
|
close(): void;
|
|
1996
|
-
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1997
2179
|
enqueue(chunk?: R): void;
|
|
1998
|
-
|
|
2180
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
1999
2181
|
error(reason: any): void;
|
|
2000
2182
|
}
|
|
2183
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
2001
2184
|
declare abstract class ReadableByteStreamController {
|
|
2002
|
-
|
|
2185
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
2003
2186
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2004
|
-
|
|
2187
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
2005
2188
|
get desiredSize(): number | null;
|
|
2006
|
-
|
|
2189
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
2007
2190
|
close(): void;
|
|
2008
|
-
|
|
2191
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
2009
2192
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2010
|
-
|
|
2193
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
2011
2194
|
error(reason: any): void;
|
|
2012
2195
|
}
|
|
2196
|
+
/**
|
|
2197
|
+
* 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.
|
|
2198
|
+
*
|
|
2199
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2200
|
+
*/
|
|
2013
2201
|
declare abstract class WritableStreamDefaultController {
|
|
2014
|
-
|
|
2202
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2015
2203
|
get signal(): AbortSignal;
|
|
2016
|
-
|
|
2204
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2017
2205
|
error(reason?: any): void;
|
|
2018
2206
|
}
|
|
2207
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2019
2208
|
declare abstract class TransformStreamDefaultController<O = any> {
|
|
2020
|
-
|
|
2209
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2021
2210
|
get desiredSize(): number | null;
|
|
2022
|
-
|
|
2211
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2023
2212
|
enqueue(chunk?: O): void;
|
|
2024
|
-
|
|
2213
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2025
2214
|
error(reason: any): void;
|
|
2026
|
-
|
|
2215
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2027
2216
|
terminate(): void;
|
|
2028
2217
|
}
|
|
2029
2218
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2035,46 +2224,57 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2035
2224
|
writable: WritableStream<W>;
|
|
2036
2225
|
readable: ReadableStream<R>;
|
|
2037
2226
|
}
|
|
2227
|
+
/**
|
|
2228
|
+
* 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.
|
|
2229
|
+
*
|
|
2230
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2231
|
+
*/
|
|
2038
2232
|
declare class WritableStream<W = any> {
|
|
2039
2233
|
constructor(
|
|
2040
2234
|
underlyingSink?: UnderlyingSink,
|
|
2041
2235
|
queuingStrategy?: QueuingStrategy,
|
|
2042
2236
|
);
|
|
2043
|
-
|
|
2237
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2044
2238
|
get locked(): boolean;
|
|
2045
|
-
|
|
2239
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2046
2240
|
abort(reason?: any): Promise<void>;
|
|
2047
|
-
|
|
2241
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2048
2242
|
close(): Promise<void>;
|
|
2049
|
-
|
|
2243
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2050
2244
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2051
2245
|
}
|
|
2246
|
+
/**
|
|
2247
|
+
* 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.
|
|
2248
|
+
*
|
|
2249
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2250
|
+
*/
|
|
2052
2251
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2053
2252
|
constructor(stream: WritableStream);
|
|
2054
|
-
|
|
2253
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2055
2254
|
get closed(): Promise<void>;
|
|
2056
|
-
|
|
2255
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2057
2256
|
get ready(): Promise<void>;
|
|
2058
|
-
|
|
2257
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2059
2258
|
get desiredSize(): number | null;
|
|
2060
|
-
|
|
2259
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2061
2260
|
abort(reason?: any): Promise<void>;
|
|
2062
|
-
|
|
2261
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2063
2262
|
close(): Promise<void>;
|
|
2064
|
-
|
|
2263
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2065
2264
|
write(chunk?: W): Promise<void>;
|
|
2066
|
-
|
|
2265
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2067
2266
|
releaseLock(): void;
|
|
2068
2267
|
}
|
|
2268
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2069
2269
|
declare class TransformStream<I = any, O = any> {
|
|
2070
2270
|
constructor(
|
|
2071
2271
|
transformer?: Transformer<I, O>,
|
|
2072
2272
|
writableStrategy?: QueuingStrategy<I>,
|
|
2073
2273
|
readableStrategy?: QueuingStrategy<O>,
|
|
2074
2274
|
);
|
|
2075
|
-
|
|
2275
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2076
2276
|
get readable(): ReadableStream<O>;
|
|
2077
|
-
|
|
2277
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2078
2278
|
get writable(): WritableStream<I>;
|
|
2079
2279
|
}
|
|
2080
2280
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2095,22 +2295,26 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2095
2295
|
interface ReadableStreamValuesOptions {
|
|
2096
2296
|
preventCancel?: boolean;
|
|
2097
2297
|
}
|
|
2298
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2098
2299
|
declare class CompressionStream extends TransformStream<
|
|
2099
2300
|
ArrayBuffer | ArrayBufferView,
|
|
2100
2301
|
Uint8Array
|
|
2101
2302
|
> {
|
|
2102
2303
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2103
2304
|
}
|
|
2305
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2104
2306
|
declare class DecompressionStream extends TransformStream<
|
|
2105
2307
|
ArrayBuffer | ArrayBufferView,
|
|
2106
2308
|
Uint8Array
|
|
2107
2309
|
> {
|
|
2108
2310
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2109
2311
|
}
|
|
2312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2110
2313
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2111
2314
|
constructor();
|
|
2112
2315
|
get encoding(): string;
|
|
2113
2316
|
}
|
|
2317
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2114
2318
|
declare class TextDecoderStream extends TransformStream<
|
|
2115
2319
|
ArrayBuffer | ArrayBufferView,
|
|
2116
2320
|
string
|
|
@@ -2124,20 +2328,30 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2124
2328
|
fatal?: boolean;
|
|
2125
2329
|
ignoreBOM?: boolean;
|
|
2126
2330
|
}
|
|
2331
|
+
/**
|
|
2332
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2333
|
+
*
|
|
2334
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2335
|
+
*/
|
|
2127
2336
|
declare class ByteLengthQueuingStrategy
|
|
2128
2337
|
implements QueuingStrategy<ArrayBufferView>
|
|
2129
2338
|
{
|
|
2130
2339
|
constructor(init: QueuingStrategyInit);
|
|
2131
|
-
|
|
2340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2132
2341
|
get highWaterMark(): number;
|
|
2133
|
-
|
|
2342
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2134
2343
|
get size(): (chunk?: any) => number;
|
|
2135
2344
|
}
|
|
2345
|
+
/**
|
|
2346
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2347
|
+
*
|
|
2348
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2349
|
+
*/
|
|
2136
2350
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2137
2351
|
constructor(init: QueuingStrategyInit);
|
|
2138
|
-
|
|
2352
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2139
2353
|
get highWaterMark(): number;
|
|
2140
|
-
|
|
2354
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2141
2355
|
get size(): (chunk?: any) => number;
|
|
2142
2356
|
}
|
|
2143
2357
|
interface QueuingStrategyInit {
|
|
@@ -2181,6 +2395,7 @@ interface TraceItem {
|
|
|
2181
2395
|
readonly dispatchNamespace?: string;
|
|
2182
2396
|
readonly scriptTags?: string[];
|
|
2183
2397
|
readonly outcome: string;
|
|
2398
|
+
readonly truncated: boolean;
|
|
2184
2399
|
}
|
|
2185
2400
|
interface TraceItemAlarmEventInfo {
|
|
2186
2401
|
readonly scheduledTime: Date;
|
|
@@ -2262,76 +2477,115 @@ interface TraceMetrics {
|
|
|
2262
2477
|
interface UnsafeTraceMetrics {
|
|
2263
2478
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2264
2479
|
}
|
|
2480
|
+
/**
|
|
2481
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2482
|
+
*
|
|
2483
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2484
|
+
*/
|
|
2265
2485
|
declare class URL {
|
|
2266
2486
|
constructor(url: string | URL, base?: string | URL);
|
|
2267
|
-
|
|
2487
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2268
2488
|
get origin(): string;
|
|
2269
|
-
|
|
2489
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2270
2490
|
get href(): string;
|
|
2271
|
-
|
|
2491
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2272
2492
|
set href(value: string);
|
|
2273
|
-
|
|
2493
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2274
2494
|
get protocol(): string;
|
|
2275
|
-
|
|
2495
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2276
2496
|
set protocol(value: string);
|
|
2277
|
-
|
|
2497
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2278
2498
|
get username(): string;
|
|
2279
|
-
|
|
2499
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2280
2500
|
set username(value: string);
|
|
2281
|
-
|
|
2501
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2282
2502
|
get password(): string;
|
|
2283
|
-
|
|
2503
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2284
2504
|
set password(value: string);
|
|
2285
|
-
|
|
2505
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2286
2506
|
get host(): string;
|
|
2287
|
-
|
|
2507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2288
2508
|
set host(value: string);
|
|
2289
|
-
|
|
2509
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2290
2510
|
get hostname(): string;
|
|
2291
|
-
|
|
2511
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2292
2512
|
set hostname(value: string);
|
|
2293
|
-
|
|
2513
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2294
2514
|
get port(): string;
|
|
2295
|
-
|
|
2515
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2296
2516
|
set port(value: string);
|
|
2297
|
-
|
|
2517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2298
2518
|
get pathname(): string;
|
|
2299
|
-
|
|
2519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2300
2520
|
set pathname(value: string);
|
|
2301
|
-
|
|
2521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2302
2522
|
get search(): string;
|
|
2303
|
-
|
|
2523
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2304
2524
|
set search(value: string);
|
|
2305
|
-
|
|
2525
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2306
2526
|
get hash(): string;
|
|
2307
|
-
|
|
2527
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2308
2528
|
set hash(value: string);
|
|
2309
|
-
|
|
2529
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2310
2530
|
get searchParams(): URLSearchParams;
|
|
2311
|
-
|
|
2531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2312
2532
|
toJSON(): string;
|
|
2533
|
+
/*function toString() { [native code] }*/
|
|
2313
2534
|
toString(): string;
|
|
2314
|
-
|
|
2535
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
|
|
2315
2536
|
static canParse(url: string, base?: string): boolean;
|
|
2316
2537
|
static parse(url: string, base?: string): URL | null;
|
|
2317
2538
|
}
|
|
2539
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2318
2540
|
declare class URLSearchParams {
|
|
2319
2541
|
constructor(
|
|
2320
2542
|
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
2321
2543
|
);
|
|
2544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2322
2545
|
get size(): number;
|
|
2546
|
+
/**
|
|
2547
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2548
|
+
*
|
|
2549
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2550
|
+
*/
|
|
2323
2551
|
append(name: string, value: string): void;
|
|
2552
|
+
/**
|
|
2553
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2554
|
+
*
|
|
2555
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2556
|
+
*/
|
|
2324
2557
|
delete(name: string): void;
|
|
2558
|
+
/**
|
|
2559
|
+
* Returns the first value associated to the given search parameter.
|
|
2560
|
+
*
|
|
2561
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2562
|
+
*/
|
|
2325
2563
|
get(name: string): string | null;
|
|
2564
|
+
/**
|
|
2565
|
+
* Returns all the values association with a given search parameter.
|
|
2566
|
+
*
|
|
2567
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2568
|
+
*/
|
|
2326
2569
|
getAll(name: string): string[];
|
|
2570
|
+
/**
|
|
2571
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2572
|
+
*
|
|
2573
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2574
|
+
*/
|
|
2327
2575
|
has(name: string): boolean;
|
|
2576
|
+
/**
|
|
2577
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2578
|
+
*
|
|
2579
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2580
|
+
*/
|
|
2328
2581
|
set(name: string, value: string): void;
|
|
2582
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2329
2583
|
sort(): void;
|
|
2330
|
-
|
|
2584
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2331
2585
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2332
|
-
|
|
2586
|
+
/* Returns a list of keys in the search params. */
|
|
2333
2587
|
keys(): IterableIterator<string>;
|
|
2334
|
-
|
|
2588
|
+
/* Returns a list of values in the search params. */
|
|
2335
2589
|
values(): IterableIterator<string>;
|
|
2336
2590
|
forEach<This = unknown>(
|
|
2337
2591
|
callback: (
|
|
@@ -2342,6 +2596,7 @@ declare class URLSearchParams {
|
|
|
2342
2596
|
) => void,
|
|
2343
2597
|
thisArg?: This,
|
|
2344
2598
|
): void;
|
|
2599
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2345
2600
|
toString(): string;
|
|
2346
2601
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2347
2602
|
}
|
|
@@ -2394,6 +2649,11 @@ interface URLPatternURLPatternResult {
|
|
|
2394
2649
|
interface URLPatternURLPatternOptions {
|
|
2395
2650
|
ignoreCase?: boolean;
|
|
2396
2651
|
}
|
|
2652
|
+
/**
|
|
2653
|
+
* 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.
|
|
2654
|
+
*
|
|
2655
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2656
|
+
*/
|
|
2397
2657
|
declare class CloseEvent extends Event {
|
|
2398
2658
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2399
2659
|
/**
|
|
@@ -2420,8 +2680,18 @@ interface CloseEventInit {
|
|
|
2420
2680
|
reason?: string;
|
|
2421
2681
|
wasClean?: boolean;
|
|
2422
2682
|
}
|
|
2683
|
+
/**
|
|
2684
|
+
* A message received by a target object.
|
|
2685
|
+
*
|
|
2686
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2687
|
+
*/
|
|
2423
2688
|
declare class MessageEvent extends Event {
|
|
2424
2689
|
constructor(type: string, initializer: MessageEventInit);
|
|
2690
|
+
/**
|
|
2691
|
+
* Returns the data of the message.
|
|
2692
|
+
*
|
|
2693
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2694
|
+
*/
|
|
2425
2695
|
readonly data: ArrayBuffer | string;
|
|
2426
2696
|
}
|
|
2427
2697
|
interface MessageEventInit {
|
|
@@ -2433,6 +2703,11 @@ type WebSocketEventMap = {
|
|
|
2433
2703
|
open: Event;
|
|
2434
2704
|
error: ErrorEvent;
|
|
2435
2705
|
};
|
|
2706
|
+
/**
|
|
2707
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2708
|
+
*
|
|
2709
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2710
|
+
*/
|
|
2436
2711
|
declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2437
2712
|
constructor(url: string, protocols?: string[] | string);
|
|
2438
2713
|
accept(): void;
|
|
@@ -3025,6 +3300,7 @@ interface GPUOrigin3DDict {
|
|
|
3025
3300
|
y?: number;
|
|
3026
3301
|
z?: number;
|
|
3027
3302
|
}
|
|
3303
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3028
3304
|
declare class EventSource {
|
|
3029
3305
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3030
3306
|
/**
|
|
@@ -3051,17 +3327,17 @@ declare class EventSource {
|
|
|
3051
3327
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3052
3328
|
*/
|
|
3053
3329
|
get readyState(): number;
|
|
3054
|
-
|
|
3330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3055
3331
|
get onopen(): any | null;
|
|
3056
|
-
|
|
3332
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3057
3333
|
set onopen(value: any | null);
|
|
3058
|
-
|
|
3334
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3059
3335
|
get onmessage(): any | null;
|
|
3060
|
-
|
|
3336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3061
3337
|
set onmessage(value: any | null);
|
|
3062
|
-
|
|
3338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3063
3339
|
get onerror(): any | null;
|
|
3064
|
-
|
|
3340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3065
3341
|
set onerror(value: any | null);
|
|
3066
3342
|
static readonly CONNECTING: number;
|
|
3067
3343
|
static readonly OPEN: number;
|
|
@@ -4428,6 +4704,12 @@ interface ForwardableEmailMessage extends EmailMessage {
|
|
|
4428
4704
|
* @returns A promise that resolves when the email message is forwarded.
|
|
4429
4705
|
*/
|
|
4430
4706
|
forward(rcptTo: string, headers?: Headers): Promise<void>;
|
|
4707
|
+
/**
|
|
4708
|
+
* Reply to the sender of this email message with a new EmailMessage object.
|
|
4709
|
+
* @param message The reply message.
|
|
4710
|
+
* @returns A promise that resolves when the email message is replied.
|
|
4711
|
+
*/
|
|
4712
|
+
reply(message: EmailMessage): Promise<void>;
|
|
4431
4713
|
}
|
|
4432
4714
|
/**
|
|
4433
4715
|
* A binding that allows a Worker to send email messages.
|