@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/2023-03-01/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,24 +1475,35 @@ 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/getSetCookie) */
|
|
1344
1489
|
getSetCookie(): string[];
|
|
1490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1345
1491
|
has(name: string): boolean;
|
|
1492
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1346
1493
|
set(name: string, value: string): void;
|
|
1494
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1347
1495
|
append(name: string, value: string): void;
|
|
1496
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1348
1497
|
delete(name: string): void;
|
|
1349
1498
|
forEach<This = unknown>(
|
|
1350
1499
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1351
1500
|
thisArg?: This,
|
|
1352
1501
|
): void;
|
|
1353
|
-
|
|
1502
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1354
1503
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1355
|
-
|
|
1504
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1356
1505
|
keys(): IterableIterator<string>;
|
|
1357
|
-
|
|
1506
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1358
1507
|
values(): IterableIterator<string>;
|
|
1359
1508
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1360
1509
|
}
|
|
@@ -1367,34 +1516,46 @@ type BodyInit =
|
|
|
1367
1516
|
| URLSearchParams
|
|
1368
1517
|
| FormData;
|
|
1369
1518
|
declare abstract class Body {
|
|
1519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1370
1520
|
get body(): ReadableStream | null;
|
|
1521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1371
1522
|
get bodyUsed(): boolean;
|
|
1523
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1372
1524
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1373
1525
|
bytes(): Promise<Uint8Array>;
|
|
1526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1374
1527
|
text(): Promise<string>;
|
|
1528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1375
1529
|
json<T>(): Promise<T>;
|
|
1530
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1376
1531
|
formData(): Promise<FormData>;
|
|
1532
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1377
1533
|
blob(): Promise<Blob>;
|
|
1378
1534
|
}
|
|
1535
|
+
/**
|
|
1536
|
+
* This Fetch API interface represents the response to a request.
|
|
1537
|
+
*
|
|
1538
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1539
|
+
*/
|
|
1379
1540
|
declare class Response extends Body {
|
|
1380
1541
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1381
|
-
|
|
1542
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1382
1543
|
static redirect(url: string, status?: number): Response;
|
|
1383
|
-
|
|
1544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1384
1545
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1385
|
-
|
|
1546
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1386
1547
|
clone(): Response;
|
|
1387
|
-
|
|
1548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1388
1549
|
get status(): number;
|
|
1389
|
-
|
|
1550
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1390
1551
|
get statusText(): string;
|
|
1391
|
-
|
|
1552
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1392
1553
|
get headers(): Headers;
|
|
1393
|
-
|
|
1554
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1394
1555
|
get ok(): boolean;
|
|
1395
|
-
|
|
1556
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1396
1557
|
get redirected(): boolean;
|
|
1397
|
-
|
|
1558
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1398
1559
|
get url(): string;
|
|
1399
1560
|
get webSocket(): WebSocket | null;
|
|
1400
1561
|
get cf(): any | undefined;
|
|
@@ -1411,12 +1572,17 @@ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
|
1411
1572
|
| Request<CfHostMetadata, Cf>
|
|
1412
1573
|
| string
|
|
1413
1574
|
| URL;
|
|
1575
|
+
/**
|
|
1576
|
+
* This Fetch API interface represents a resource request.
|
|
1577
|
+
*
|
|
1578
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1579
|
+
*/
|
|
1414
1580
|
declare class Request<
|
|
1415
1581
|
CfHostMetadata = unknown,
|
|
1416
1582
|
Cf = CfProperties<CfHostMetadata>,
|
|
1417
1583
|
> extends Body {
|
|
1418
1584
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1419
|
-
|
|
1585
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1420
1586
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1421
1587
|
/**
|
|
1422
1588
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1462,21 +1628,29 @@ declare class Request<
|
|
|
1462
1628
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1463
1629
|
*/
|
|
1464
1630
|
get keepalive(): boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
1633
|
+
*
|
|
1634
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1635
|
+
*/
|
|
1636
|
+
get cache(): string | undefined;
|
|
1465
1637
|
}
|
|
1466
1638
|
interface RequestInit<Cf = CfProperties> {
|
|
1467
|
-
|
|
1639
|
+
/* A string to set request's method. */
|
|
1468
1640
|
method?: string;
|
|
1469
|
-
|
|
1641
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1470
1642
|
headers?: HeadersInit;
|
|
1471
|
-
|
|
1643
|
+
/* A BodyInit object or null to set request's body. */
|
|
1472
1644
|
body?: BodyInit | null;
|
|
1473
|
-
|
|
1645
|
+
/* 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. */
|
|
1474
1646
|
redirect?: string;
|
|
1475
1647
|
fetcher?: Fetcher | null;
|
|
1476
1648
|
cf?: Cf;
|
|
1477
|
-
|
|
1649
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1650
|
+
cache?: string;
|
|
1651
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1478
1652
|
integrity?: string;
|
|
1479
|
-
|
|
1653
|
+
/* An AbortSignal to set request's signal. */
|
|
1480
1654
|
signal?: AbortSignal | null;
|
|
1481
1655
|
}
|
|
1482
1656
|
type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
|
|
@@ -1909,31 +2083,36 @@ type ReadableStreamReadResult<R = any> =
|
|
|
1909
2083
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1910
2084
|
*/
|
|
1911
2085
|
interface ReadableStream<R = any> {
|
|
1912
|
-
|
|
2086
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1913
2087
|
get locked(): boolean;
|
|
1914
|
-
|
|
2088
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1915
2089
|
cancel(reason?: any): Promise<void>;
|
|
1916
|
-
|
|
2090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1917
2091
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1918
|
-
|
|
2092
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1919
2093
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1920
|
-
|
|
2094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1921
2095
|
pipeThrough<T>(
|
|
1922
2096
|
transform: ReadableWritablePair<T, R>,
|
|
1923
2097
|
options?: StreamPipeOptions,
|
|
1924
2098
|
): ReadableStream<T>;
|
|
1925
|
-
|
|
2099
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1926
2100
|
pipeTo(
|
|
1927
2101
|
destination: WritableStream<R>,
|
|
1928
2102
|
options?: StreamPipeOptions,
|
|
1929
2103
|
): Promise<void>;
|
|
1930
|
-
|
|
2104
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1931
2105
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1932
2106
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1933
2107
|
[Symbol.asyncIterator](
|
|
1934
2108
|
options?: ReadableStreamValuesOptions,
|
|
1935
2109
|
): AsyncIterableIterator<R>;
|
|
1936
2110
|
}
|
|
2111
|
+
/**
|
|
2112
|
+
* 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.
|
|
2113
|
+
*
|
|
2114
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2115
|
+
*/
|
|
1937
2116
|
declare const ReadableStream: {
|
|
1938
2117
|
prototype: ReadableStream;
|
|
1939
2118
|
new (
|
|
@@ -1945,24 +2124,26 @@ declare const ReadableStream: {
|
|
|
1945
2124
|
strategy?: QueuingStrategy<R>,
|
|
1946
2125
|
): ReadableStream<R>;
|
|
1947
2126
|
};
|
|
2127
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1948
2128
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
1949
2129
|
constructor(stream: ReadableStream);
|
|
1950
2130
|
get closed(): Promise<void>;
|
|
1951
2131
|
cancel(reason?: any): Promise<void>;
|
|
1952
|
-
|
|
2132
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1953
2133
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1954
|
-
|
|
2134
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1955
2135
|
releaseLock(): void;
|
|
1956
2136
|
}
|
|
2137
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1957
2138
|
declare class ReadableStreamBYOBReader {
|
|
1958
2139
|
constructor(stream: ReadableStream);
|
|
1959
2140
|
get closed(): Promise<void>;
|
|
1960
2141
|
cancel(reason?: any): Promise<void>;
|
|
1961
|
-
|
|
2142
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1962
2143
|
read<T extends ArrayBufferView>(
|
|
1963
2144
|
view: T,
|
|
1964
2145
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1965
|
-
|
|
2146
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1966
2147
|
releaseLock(): void;
|
|
1967
2148
|
readAtLeast<T extends ArrayBufferView>(
|
|
1968
2149
|
minElements: number,
|
|
@@ -1980,51 +2161,60 @@ interface ReadableStreamGetReaderOptions {
|
|
|
1980
2161
|
*/
|
|
1981
2162
|
mode: "byob";
|
|
1982
2163
|
}
|
|
2164
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1983
2165
|
declare abstract class ReadableStreamBYOBRequest {
|
|
1984
|
-
|
|
2166
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1985
2167
|
get view(): Uint8Array | null;
|
|
1986
|
-
|
|
2168
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1987
2169
|
respond(bytesWritten: number): void;
|
|
1988
|
-
|
|
2170
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1989
2171
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1990
2172
|
get atLeast(): number | null;
|
|
1991
2173
|
}
|
|
2174
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1992
2175
|
declare abstract class ReadableStreamDefaultController<R = any> {
|
|
1993
|
-
|
|
2176
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1994
2177
|
get desiredSize(): number | null;
|
|
1995
|
-
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1996
2179
|
close(): void;
|
|
1997
|
-
|
|
2180
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1998
2181
|
enqueue(chunk?: R): void;
|
|
1999
|
-
|
|
2182
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
2000
2183
|
error(reason: any): void;
|
|
2001
2184
|
}
|
|
2185
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
2002
2186
|
declare abstract class ReadableByteStreamController {
|
|
2003
|
-
|
|
2187
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
2004
2188
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2005
|
-
|
|
2189
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
2006
2190
|
get desiredSize(): number | null;
|
|
2007
|
-
|
|
2191
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
2008
2192
|
close(): void;
|
|
2009
|
-
|
|
2193
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
2010
2194
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2011
|
-
|
|
2195
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
2012
2196
|
error(reason: any): void;
|
|
2013
2197
|
}
|
|
2198
|
+
/**
|
|
2199
|
+
* 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.
|
|
2200
|
+
*
|
|
2201
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2202
|
+
*/
|
|
2014
2203
|
declare abstract class WritableStreamDefaultController {
|
|
2015
|
-
|
|
2204
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2016
2205
|
get signal(): AbortSignal;
|
|
2017
|
-
|
|
2206
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2018
2207
|
error(reason?: any): void;
|
|
2019
2208
|
}
|
|
2209
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2020
2210
|
declare abstract class TransformStreamDefaultController<O = any> {
|
|
2021
|
-
|
|
2211
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2022
2212
|
get desiredSize(): number | null;
|
|
2023
|
-
|
|
2213
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2024
2214
|
enqueue(chunk?: O): void;
|
|
2025
|
-
|
|
2215
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2026
2216
|
error(reason: any): void;
|
|
2027
|
-
|
|
2217
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2028
2218
|
terminate(): void;
|
|
2029
2219
|
}
|
|
2030
2220
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2036,46 +2226,57 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2036
2226
|
writable: WritableStream<W>;
|
|
2037
2227
|
readable: ReadableStream<R>;
|
|
2038
2228
|
}
|
|
2229
|
+
/**
|
|
2230
|
+
* 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.
|
|
2231
|
+
*
|
|
2232
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2233
|
+
*/
|
|
2039
2234
|
declare class WritableStream<W = any> {
|
|
2040
2235
|
constructor(
|
|
2041
2236
|
underlyingSink?: UnderlyingSink,
|
|
2042
2237
|
queuingStrategy?: QueuingStrategy,
|
|
2043
2238
|
);
|
|
2044
|
-
|
|
2239
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2045
2240
|
get locked(): boolean;
|
|
2046
|
-
|
|
2241
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2047
2242
|
abort(reason?: any): Promise<void>;
|
|
2048
|
-
|
|
2243
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2049
2244
|
close(): Promise<void>;
|
|
2050
|
-
|
|
2245
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2051
2246
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2052
2247
|
}
|
|
2248
|
+
/**
|
|
2249
|
+
* 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.
|
|
2250
|
+
*
|
|
2251
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2252
|
+
*/
|
|
2053
2253
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2054
2254
|
constructor(stream: WritableStream);
|
|
2055
|
-
|
|
2255
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2056
2256
|
get closed(): Promise<void>;
|
|
2057
|
-
|
|
2257
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2058
2258
|
get ready(): Promise<void>;
|
|
2059
|
-
|
|
2259
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2060
2260
|
get desiredSize(): number | null;
|
|
2061
|
-
|
|
2261
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2062
2262
|
abort(reason?: any): Promise<void>;
|
|
2063
|
-
|
|
2263
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2064
2264
|
close(): Promise<void>;
|
|
2065
|
-
|
|
2265
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2066
2266
|
write(chunk?: W): Promise<void>;
|
|
2067
|
-
|
|
2267
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2068
2268
|
releaseLock(): void;
|
|
2069
2269
|
}
|
|
2270
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2070
2271
|
declare class TransformStream<I = any, O = any> {
|
|
2071
2272
|
constructor(
|
|
2072
2273
|
transformer?: Transformer<I, O>,
|
|
2073
2274
|
writableStrategy?: QueuingStrategy<I>,
|
|
2074
2275
|
readableStrategy?: QueuingStrategy<O>,
|
|
2075
2276
|
);
|
|
2076
|
-
|
|
2277
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2077
2278
|
get readable(): ReadableStream<O>;
|
|
2078
|
-
|
|
2279
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2079
2280
|
get writable(): WritableStream<I>;
|
|
2080
2281
|
}
|
|
2081
2282
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2096,22 +2297,26 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2096
2297
|
interface ReadableStreamValuesOptions {
|
|
2097
2298
|
preventCancel?: boolean;
|
|
2098
2299
|
}
|
|
2300
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2099
2301
|
declare class CompressionStream extends TransformStream<
|
|
2100
2302
|
ArrayBuffer | ArrayBufferView,
|
|
2101
2303
|
Uint8Array
|
|
2102
2304
|
> {
|
|
2103
2305
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2104
2306
|
}
|
|
2307
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2105
2308
|
declare class DecompressionStream extends TransformStream<
|
|
2106
2309
|
ArrayBuffer | ArrayBufferView,
|
|
2107
2310
|
Uint8Array
|
|
2108
2311
|
> {
|
|
2109
2312
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2110
2313
|
}
|
|
2314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2111
2315
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2112
2316
|
constructor();
|
|
2113
2317
|
get encoding(): string;
|
|
2114
2318
|
}
|
|
2319
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2115
2320
|
declare class TextDecoderStream extends TransformStream<
|
|
2116
2321
|
ArrayBuffer | ArrayBufferView,
|
|
2117
2322
|
string
|
|
@@ -2125,20 +2330,30 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2125
2330
|
fatal?: boolean;
|
|
2126
2331
|
ignoreBOM?: boolean;
|
|
2127
2332
|
}
|
|
2333
|
+
/**
|
|
2334
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2335
|
+
*
|
|
2336
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2337
|
+
*/
|
|
2128
2338
|
declare class ByteLengthQueuingStrategy
|
|
2129
2339
|
implements QueuingStrategy<ArrayBufferView>
|
|
2130
2340
|
{
|
|
2131
2341
|
constructor(init: QueuingStrategyInit);
|
|
2132
|
-
|
|
2342
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2133
2343
|
get highWaterMark(): number;
|
|
2134
|
-
|
|
2344
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2135
2345
|
get size(): (chunk?: any) => number;
|
|
2136
2346
|
}
|
|
2347
|
+
/**
|
|
2348
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2349
|
+
*
|
|
2350
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2351
|
+
*/
|
|
2137
2352
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2138
2353
|
constructor(init: QueuingStrategyInit);
|
|
2139
|
-
|
|
2354
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2140
2355
|
get highWaterMark(): number;
|
|
2141
|
-
|
|
2356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2142
2357
|
get size(): (chunk?: any) => number;
|
|
2143
2358
|
}
|
|
2144
2359
|
interface QueuingStrategyInit {
|
|
@@ -2182,6 +2397,7 @@ interface TraceItem {
|
|
|
2182
2397
|
readonly dispatchNamespace?: string;
|
|
2183
2398
|
readonly scriptTags?: string[];
|
|
2184
2399
|
readonly outcome: string;
|
|
2400
|
+
readonly truncated: boolean;
|
|
2185
2401
|
}
|
|
2186
2402
|
interface TraceItemAlarmEventInfo {
|
|
2187
2403
|
readonly scheduledTime: Date;
|
|
@@ -2263,76 +2479,115 @@ interface TraceMetrics {
|
|
|
2263
2479
|
interface UnsafeTraceMetrics {
|
|
2264
2480
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2265
2481
|
}
|
|
2482
|
+
/**
|
|
2483
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2484
|
+
*
|
|
2485
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2486
|
+
*/
|
|
2266
2487
|
declare class URL {
|
|
2267
2488
|
constructor(url: string | URL, base?: string | URL);
|
|
2268
|
-
|
|
2489
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2269
2490
|
get origin(): string;
|
|
2270
|
-
|
|
2491
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2271
2492
|
get href(): string;
|
|
2272
|
-
|
|
2493
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2273
2494
|
set href(value: string);
|
|
2274
|
-
|
|
2495
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2275
2496
|
get protocol(): string;
|
|
2276
|
-
|
|
2497
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2277
2498
|
set protocol(value: string);
|
|
2278
|
-
|
|
2499
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2279
2500
|
get username(): string;
|
|
2280
|
-
|
|
2501
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2281
2502
|
set username(value: string);
|
|
2282
|
-
|
|
2503
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2283
2504
|
get password(): string;
|
|
2284
|
-
|
|
2505
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2285
2506
|
set password(value: string);
|
|
2286
|
-
|
|
2507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2287
2508
|
get host(): string;
|
|
2288
|
-
|
|
2509
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2289
2510
|
set host(value: string);
|
|
2290
|
-
|
|
2511
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2291
2512
|
get hostname(): string;
|
|
2292
|
-
|
|
2513
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2293
2514
|
set hostname(value: string);
|
|
2294
|
-
|
|
2515
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2295
2516
|
get port(): string;
|
|
2296
|
-
|
|
2517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2297
2518
|
set port(value: string);
|
|
2298
|
-
|
|
2519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2299
2520
|
get pathname(): string;
|
|
2300
|
-
|
|
2521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2301
2522
|
set pathname(value: string);
|
|
2302
|
-
|
|
2523
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2303
2524
|
get search(): string;
|
|
2304
|
-
|
|
2525
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2305
2526
|
set search(value: string);
|
|
2306
|
-
|
|
2527
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2307
2528
|
get hash(): string;
|
|
2308
|
-
|
|
2529
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2309
2530
|
set hash(value: string);
|
|
2310
|
-
|
|
2531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2311
2532
|
get searchParams(): URLSearchParams;
|
|
2312
|
-
|
|
2533
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2313
2534
|
toJSON(): string;
|
|
2535
|
+
/*function toString() { [native code] }*/
|
|
2314
2536
|
toString(): string;
|
|
2315
|
-
|
|
2537
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
|
|
2316
2538
|
static canParse(url: string, base?: string): boolean;
|
|
2317
2539
|
static parse(url: string, base?: string): URL | null;
|
|
2318
2540
|
}
|
|
2541
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2319
2542
|
declare class URLSearchParams {
|
|
2320
2543
|
constructor(
|
|
2321
2544
|
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
2322
2545
|
);
|
|
2546
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2323
2547
|
get size(): number;
|
|
2548
|
+
/**
|
|
2549
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2550
|
+
*
|
|
2551
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2552
|
+
*/
|
|
2324
2553
|
append(name: string, value: string): void;
|
|
2554
|
+
/**
|
|
2555
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2556
|
+
*
|
|
2557
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2558
|
+
*/
|
|
2325
2559
|
delete(name: string): void;
|
|
2560
|
+
/**
|
|
2561
|
+
* Returns the first value associated to the given search parameter.
|
|
2562
|
+
*
|
|
2563
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2564
|
+
*/
|
|
2326
2565
|
get(name: string): string | null;
|
|
2566
|
+
/**
|
|
2567
|
+
* Returns all the values association with a given search parameter.
|
|
2568
|
+
*
|
|
2569
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2570
|
+
*/
|
|
2327
2571
|
getAll(name: string): string[];
|
|
2572
|
+
/**
|
|
2573
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2574
|
+
*
|
|
2575
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2576
|
+
*/
|
|
2328
2577
|
has(name: string): boolean;
|
|
2578
|
+
/**
|
|
2579
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2580
|
+
*
|
|
2581
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2582
|
+
*/
|
|
2329
2583
|
set(name: string, value: string): void;
|
|
2584
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2330
2585
|
sort(): void;
|
|
2331
|
-
|
|
2586
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2332
2587
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2333
|
-
|
|
2588
|
+
/* Returns a list of keys in the search params. */
|
|
2334
2589
|
keys(): IterableIterator<string>;
|
|
2335
|
-
|
|
2590
|
+
/* Returns a list of values in the search params. */
|
|
2336
2591
|
values(): IterableIterator<string>;
|
|
2337
2592
|
forEach<This = unknown>(
|
|
2338
2593
|
callback: (
|
|
@@ -2343,6 +2598,7 @@ declare class URLSearchParams {
|
|
|
2343
2598
|
) => void,
|
|
2344
2599
|
thisArg?: This,
|
|
2345
2600
|
): void;
|
|
2601
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2346
2602
|
toString(): string;
|
|
2347
2603
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2348
2604
|
}
|
|
@@ -2395,6 +2651,11 @@ interface URLPatternURLPatternResult {
|
|
|
2395
2651
|
interface URLPatternURLPatternOptions {
|
|
2396
2652
|
ignoreCase?: boolean;
|
|
2397
2653
|
}
|
|
2654
|
+
/**
|
|
2655
|
+
* 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.
|
|
2656
|
+
*
|
|
2657
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2658
|
+
*/
|
|
2398
2659
|
declare class CloseEvent extends Event {
|
|
2399
2660
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2400
2661
|
/**
|
|
@@ -2421,8 +2682,18 @@ interface CloseEventInit {
|
|
|
2421
2682
|
reason?: string;
|
|
2422
2683
|
wasClean?: boolean;
|
|
2423
2684
|
}
|
|
2685
|
+
/**
|
|
2686
|
+
* A message received by a target object.
|
|
2687
|
+
*
|
|
2688
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2689
|
+
*/
|
|
2424
2690
|
declare class MessageEvent extends Event {
|
|
2425
2691
|
constructor(type: string, initializer: MessageEventInit);
|
|
2692
|
+
/**
|
|
2693
|
+
* Returns the data of the message.
|
|
2694
|
+
*
|
|
2695
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2696
|
+
*/
|
|
2426
2697
|
readonly data: ArrayBuffer | string;
|
|
2427
2698
|
}
|
|
2428
2699
|
interface MessageEventInit {
|
|
@@ -2434,6 +2705,11 @@ type WebSocketEventMap = {
|
|
|
2434
2705
|
open: Event;
|
|
2435
2706
|
error: ErrorEvent;
|
|
2436
2707
|
};
|
|
2708
|
+
/**
|
|
2709
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2710
|
+
*
|
|
2711
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2712
|
+
*/
|
|
2437
2713
|
declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2438
2714
|
constructor(url: string, protocols?: string[] | string);
|
|
2439
2715
|
accept(): void;
|
|
@@ -3026,6 +3302,7 @@ interface GPUOrigin3DDict {
|
|
|
3026
3302
|
y?: number;
|
|
3027
3303
|
z?: number;
|
|
3028
3304
|
}
|
|
3305
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3029
3306
|
declare class EventSource {
|
|
3030
3307
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3031
3308
|
/**
|
|
@@ -3052,17 +3329,17 @@ declare class EventSource {
|
|
|
3052
3329
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3053
3330
|
*/
|
|
3054
3331
|
get readyState(): number;
|
|
3055
|
-
|
|
3332
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3056
3333
|
get onopen(): any | null;
|
|
3057
|
-
|
|
3334
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3058
3335
|
set onopen(value: any | null);
|
|
3059
|
-
|
|
3336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3060
3337
|
get onmessage(): any | null;
|
|
3061
|
-
|
|
3338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3062
3339
|
set onmessage(value: any | null);
|
|
3063
|
-
|
|
3340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3064
3341
|
get onerror(): any | null;
|
|
3065
|
-
|
|
3342
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3066
3343
|
set onerror(value: any | null);
|
|
3067
3344
|
static readonly CONNECTING: number;
|
|
3068
3345
|
static readonly OPEN: number;
|
|
@@ -4429,6 +4706,12 @@ interface ForwardableEmailMessage extends EmailMessage {
|
|
|
4429
4706
|
* @returns A promise that resolves when the email message is forwarded.
|
|
4430
4707
|
*/
|
|
4431
4708
|
forward(rcptTo: string, headers?: Headers): Promise<void>;
|
|
4709
|
+
/**
|
|
4710
|
+
* Reply to the sender of this email message with a new EmailMessage object.
|
|
4711
|
+
* @param message The reply message.
|
|
4712
|
+
* @returns A promise that resolves when the email message is replied.
|
|
4713
|
+
*/
|
|
4714
|
+
reply(message: EmailMessage): Promise<void>;
|
|
4432
4715
|
}
|
|
4433
4716
|
/**
|
|
4434
4717
|
* A binding that allows a Worker to send email messages.
|