@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/2021-11-03/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
|
*/
|
|
@@ -310,54 +316,73 @@ declare function removeEventListener<
|
|
|
310
316
|
declare function dispatchEvent(
|
|
311
317
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
312
318
|
): boolean;
|
|
313
|
-
|
|
319
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
314
320
|
declare function btoa(data: string): string;
|
|
315
|
-
|
|
321
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
316
322
|
declare function atob(data: string): string;
|
|
317
|
-
|
|
323
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
318
324
|
declare function setTimeout(
|
|
319
325
|
callback: (...args: any[]) => void,
|
|
320
326
|
msDelay?: number,
|
|
321
327
|
): number;
|
|
322
|
-
|
|
328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
323
329
|
declare function setTimeout<Args extends any[]>(
|
|
324
330
|
callback: (...args: Args) => void,
|
|
325
331
|
msDelay?: number,
|
|
326
332
|
...args: Args
|
|
327
333
|
): number;
|
|
328
|
-
|
|
334
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
329
335
|
declare function clearTimeout(timeoutId: number | null): void;
|
|
330
|
-
|
|
336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
331
337
|
declare function setInterval(
|
|
332
338
|
callback: (...args: any[]) => void,
|
|
333
339
|
msDelay?: number,
|
|
334
340
|
): number;
|
|
335
|
-
|
|
341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
336
342
|
declare function setInterval<Args extends any[]>(
|
|
337
343
|
callback: (...args: Args) => void,
|
|
338
344
|
msDelay?: number,
|
|
339
345
|
...args: Args
|
|
340
346
|
): number;
|
|
341
|
-
|
|
347
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
342
348
|
declare function clearInterval(timeoutId: number | null): void;
|
|
343
|
-
|
|
349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
344
350
|
declare function queueMicrotask(task: Function): void;
|
|
345
|
-
|
|
351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
346
352
|
declare function structuredClone<T>(
|
|
347
353
|
value: T,
|
|
348
354
|
options?: StructuredSerializeOptions,
|
|
349
355
|
): T;
|
|
350
|
-
|
|
356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
351
357
|
declare function reportError(error: any): void;
|
|
352
|
-
|
|
358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
353
359
|
declare function fetch(
|
|
354
360
|
input: RequestInfo,
|
|
355
361
|
init?: RequestInit<RequestInitCfProperties>,
|
|
356
362
|
): Promise<Response>;
|
|
357
363
|
declare const self: ServiceWorkerGlobalScope;
|
|
364
|
+
/**
|
|
365
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
366
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
367
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
368
|
+
* compared to those implemented in most browsers.
|
|
369
|
+
*
|
|
370
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
371
|
+
*/
|
|
358
372
|
declare const crypto: Crypto;
|
|
373
|
+
/**
|
|
374
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
375
|
+
*
|
|
376
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
377
|
+
*/
|
|
359
378
|
declare const caches: CacheStorage;
|
|
360
379
|
declare const scheduler: Scheduler;
|
|
380
|
+
/**
|
|
381
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
382
|
+
* as well as timing of subrequests and other operations.
|
|
383
|
+
*
|
|
384
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
385
|
+
*/
|
|
361
386
|
declare const performance: Performance;
|
|
362
387
|
declare const origin: string;
|
|
363
388
|
interface TestController {}
|
|
@@ -411,21 +436,23 @@ interface ExportedHandler<
|
|
|
411
436
|
interface StructuredSerializeOptions {
|
|
412
437
|
transfer?: any[];
|
|
413
438
|
}
|
|
439
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
414
440
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
415
|
-
|
|
441
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
416
442
|
readonly promise: Promise<any>;
|
|
417
|
-
|
|
443
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
418
444
|
readonly reason: any;
|
|
419
445
|
}
|
|
420
446
|
/**
|
|
421
|
-
*
|
|
447
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
448
|
+
* as well as timing of subrequests and other operations.
|
|
422
449
|
*
|
|
423
|
-
* [
|
|
450
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
424
451
|
*/
|
|
425
452
|
interface Performance {
|
|
426
|
-
|
|
453
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
427
454
|
readonly timeOrigin: number;
|
|
428
|
-
|
|
455
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
429
456
|
now(): number;
|
|
430
457
|
}
|
|
431
458
|
interface AlarmInvocationInfo {
|
|
@@ -614,6 +641,11 @@ interface AnalyticsEngineDataPoint {
|
|
|
614
641
|
doubles?: number[];
|
|
615
642
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
616
643
|
}
|
|
644
|
+
/**
|
|
645
|
+
* An event which takes place in the DOM.
|
|
646
|
+
*
|
|
647
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
648
|
+
*/
|
|
617
649
|
declare class Event {
|
|
618
650
|
constructor(type: string, init?: EventInit);
|
|
619
651
|
/**
|
|
@@ -731,6 +763,11 @@ interface EventListenerObject<EventType extends Event = Event> {
|
|
|
731
763
|
type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
732
764
|
| EventListener<EventType>
|
|
733
765
|
| EventListenerObject<EventType>;
|
|
766
|
+
/**
|
|
767
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
768
|
+
*
|
|
769
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
770
|
+
*/
|
|
734
771
|
declare class EventTarget<
|
|
735
772
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
736
773
|
> {
|
|
@@ -786,6 +823,11 @@ interface EventTargetAddEventListenerOptions {
|
|
|
786
823
|
interface EventTargetHandlerObject {
|
|
787
824
|
handleEvent: (event: Event) => any | undefined;
|
|
788
825
|
}
|
|
826
|
+
/**
|
|
827
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
828
|
+
*
|
|
829
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
830
|
+
*/
|
|
789
831
|
declare class AbortController {
|
|
790
832
|
constructor();
|
|
791
833
|
/**
|
|
@@ -801,11 +843,17 @@ declare class AbortController {
|
|
|
801
843
|
*/
|
|
802
844
|
abort(reason?: any): void;
|
|
803
845
|
}
|
|
846
|
+
/**
|
|
847
|
+
* 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.
|
|
848
|
+
*
|
|
849
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
850
|
+
*/
|
|
804
851
|
declare abstract class AbortSignal extends EventTarget {
|
|
805
|
-
|
|
852
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
806
853
|
static abort(reason?: any): AbortSignal;
|
|
807
|
-
|
|
854
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
808
855
|
static timeout(delay: number): AbortSignal;
|
|
856
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
809
857
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
810
858
|
/**
|
|
811
859
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -813,13 +861,13 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
813
861
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
814
862
|
*/
|
|
815
863
|
readonly aborted: boolean;
|
|
816
|
-
|
|
864
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
817
865
|
readonly reason: any;
|
|
818
|
-
|
|
866
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
819
867
|
get onabort(): any | null;
|
|
820
|
-
|
|
868
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
821
869
|
set onabort(value: any | null);
|
|
822
|
-
|
|
870
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
823
871
|
throwIfAborted(): void;
|
|
824
872
|
}
|
|
825
873
|
interface Scheduler {
|
|
@@ -828,10 +876,16 @@ interface Scheduler {
|
|
|
828
876
|
interface SchedulerWaitOptions {
|
|
829
877
|
signal?: AbortSignal;
|
|
830
878
|
}
|
|
879
|
+
/**
|
|
880
|
+
* 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.
|
|
881
|
+
*
|
|
882
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
883
|
+
*/
|
|
831
884
|
declare abstract class ExtendableEvent extends Event {
|
|
832
|
-
|
|
885
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
833
886
|
waitUntil(promise: Promise<any>): void;
|
|
834
887
|
}
|
|
888
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
835
889
|
declare class CustomEvent<T = any> extends Event {
|
|
836
890
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
837
891
|
/**
|
|
@@ -847,59 +901,90 @@ interface CustomEventCustomEventInit {
|
|
|
847
901
|
composed?: boolean;
|
|
848
902
|
detail?: any;
|
|
849
903
|
}
|
|
904
|
+
/**
|
|
905
|
+
* 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.
|
|
906
|
+
*
|
|
907
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
908
|
+
*/
|
|
850
909
|
declare class Blob {
|
|
851
910
|
constructor(
|
|
852
911
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
853
912
|
options?: BlobOptions,
|
|
854
913
|
);
|
|
855
|
-
|
|
914
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
856
915
|
readonly size: number;
|
|
857
|
-
|
|
916
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
858
917
|
readonly type: string;
|
|
859
|
-
|
|
918
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
860
919
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
861
|
-
|
|
920
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
862
921
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
863
922
|
bytes(): Promise<Uint8Array>;
|
|
864
|
-
|
|
923
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
865
924
|
text(): Promise<string>;
|
|
866
|
-
|
|
925
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
867
926
|
stream(): ReadableStream;
|
|
868
927
|
}
|
|
869
928
|
interface BlobOptions {
|
|
870
929
|
type?: string;
|
|
871
930
|
}
|
|
931
|
+
/**
|
|
932
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
933
|
+
*
|
|
934
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
935
|
+
*/
|
|
872
936
|
declare class File extends Blob {
|
|
873
937
|
constructor(
|
|
874
938
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
875
939
|
name: string,
|
|
876
940
|
options?: FileOptions,
|
|
877
941
|
);
|
|
878
|
-
|
|
942
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
879
943
|
readonly name: string;
|
|
880
|
-
|
|
944
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
881
945
|
readonly lastModified: number;
|
|
882
946
|
}
|
|
883
947
|
interface FileOptions {
|
|
884
948
|
type?: string;
|
|
885
949
|
lastModified?: number;
|
|
886
950
|
}
|
|
951
|
+
/**
|
|
952
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
953
|
+
*
|
|
954
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
955
|
+
*/
|
|
887
956
|
declare abstract class CacheStorage {
|
|
888
|
-
|
|
957
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
889
958
|
open(cacheName: string): Promise<Cache>;
|
|
890
959
|
readonly default: Cache;
|
|
891
960
|
}
|
|
961
|
+
/**
|
|
962
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
963
|
+
*
|
|
964
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
965
|
+
*/
|
|
892
966
|
declare abstract class Cache {
|
|
967
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
893
968
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
969
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
894
970
|
match(
|
|
895
971
|
request: RequestInfo,
|
|
896
972
|
options?: CacheQueryOptions,
|
|
897
973
|
): Promise<Response | undefined>;
|
|
974
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
898
975
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
899
976
|
}
|
|
900
977
|
interface CacheQueryOptions {
|
|
901
978
|
ignoreMethod?: boolean;
|
|
902
979
|
}
|
|
980
|
+
/**
|
|
981
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
982
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
983
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
984
|
+
* compared to those implemented in most browsers.
|
|
985
|
+
*
|
|
986
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
987
|
+
*/
|
|
903
988
|
declare abstract class Crypto {
|
|
904
989
|
/**
|
|
905
990
|
* Available only in secure contexts.
|
|
@@ -907,7 +992,7 @@ declare abstract class Crypto {
|
|
|
907
992
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
908
993
|
*/
|
|
909
994
|
readonly subtle: SubtleCrypto;
|
|
910
|
-
|
|
995
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
911
996
|
getRandomValues<
|
|
912
997
|
T extends
|
|
913
998
|
| Int8Array
|
|
@@ -927,39 +1012,50 @@ declare abstract class Crypto {
|
|
|
927
1012
|
randomUUID(): string;
|
|
928
1013
|
DigestStream: typeof DigestStream;
|
|
929
1014
|
}
|
|
1015
|
+
/**
|
|
1016
|
+
* 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).
|
|
1017
|
+
* Available only in secure contexts.
|
|
1018
|
+
*
|
|
1019
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1020
|
+
*/
|
|
930
1021
|
declare abstract class SubtleCrypto {
|
|
1022
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
931
1023
|
encrypt(
|
|
932
1024
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
933
1025
|
key: CryptoKey,
|
|
934
1026
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
935
1027
|
): Promise<ArrayBuffer>;
|
|
1028
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
936
1029
|
decrypt(
|
|
937
1030
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
938
1031
|
key: CryptoKey,
|
|
939
1032
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
940
1033
|
): Promise<ArrayBuffer>;
|
|
1034
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
941
1035
|
sign(
|
|
942
1036
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
943
1037
|
key: CryptoKey,
|
|
944
1038
|
data: ArrayBuffer | ArrayBufferView,
|
|
945
1039
|
): Promise<ArrayBuffer>;
|
|
1040
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
946
1041
|
verify(
|
|
947
1042
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
948
1043
|
key: CryptoKey,
|
|
949
1044
|
signature: ArrayBuffer | ArrayBufferView,
|
|
950
1045
|
data: ArrayBuffer | ArrayBufferView,
|
|
951
1046
|
): Promise<boolean>;
|
|
1047
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
952
1048
|
digest(
|
|
953
1049
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
954
1050
|
data: ArrayBuffer | ArrayBufferView,
|
|
955
1051
|
): Promise<ArrayBuffer>;
|
|
956
|
-
|
|
1052
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
957
1053
|
generateKey(
|
|
958
1054
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
959
1055
|
extractable: boolean,
|
|
960
1056
|
keyUsages: string[],
|
|
961
1057
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
962
|
-
|
|
1058
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
963
1059
|
deriveKey(
|
|
964
1060
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
965
1061
|
baseKey: CryptoKey,
|
|
@@ -967,12 +1063,13 @@ declare abstract class SubtleCrypto {
|
|
|
967
1063
|
extractable: boolean,
|
|
968
1064
|
keyUsages: string[],
|
|
969
1065
|
): Promise<CryptoKey>;
|
|
1066
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
970
1067
|
deriveBits(
|
|
971
1068
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
972
1069
|
baseKey: CryptoKey,
|
|
973
|
-
length
|
|
1070
|
+
length?: number | null,
|
|
974
1071
|
): Promise<ArrayBuffer>;
|
|
975
|
-
|
|
1072
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
976
1073
|
importKey(
|
|
977
1074
|
format: string,
|
|
978
1075
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -980,14 +1077,16 @@ declare abstract class SubtleCrypto {
|
|
|
980
1077
|
extractable: boolean,
|
|
981
1078
|
keyUsages: string[],
|
|
982
1079
|
): Promise<CryptoKey>;
|
|
1080
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
983
1081
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1082
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
984
1083
|
wrapKey(
|
|
985
1084
|
format: string,
|
|
986
1085
|
key: CryptoKey,
|
|
987
1086
|
wrappingKey: CryptoKey,
|
|
988
1087
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
989
1088
|
): Promise<ArrayBuffer>;
|
|
990
|
-
|
|
1089
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
991
1090
|
unwrapKey(
|
|
992
1091
|
format: string,
|
|
993
1092
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1002,12 +1101,18 @@ declare abstract class SubtleCrypto {
|
|
|
1002
1101
|
b: ArrayBuffer | ArrayBufferView,
|
|
1003
1102
|
): boolean;
|
|
1004
1103
|
}
|
|
1104
|
+
/**
|
|
1105
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1106
|
+
* Available only in secure contexts.
|
|
1107
|
+
*
|
|
1108
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1109
|
+
*/
|
|
1005
1110
|
declare abstract class CryptoKey {
|
|
1006
|
-
|
|
1111
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1007
1112
|
readonly type: string;
|
|
1008
|
-
|
|
1113
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1009
1114
|
readonly extractable: boolean;
|
|
1010
|
-
|
|
1115
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1011
1116
|
readonly algorithm:
|
|
1012
1117
|
| CryptoKeyKeyAlgorithm
|
|
1013
1118
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1015,7 +1120,7 @@ declare abstract class CryptoKey {
|
|
|
1015
1120
|
| CryptoKeyRsaKeyAlgorithm
|
|
1016
1121
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1017
1122
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1018
|
-
|
|
1123
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1019
1124
|
readonly usages: string[];
|
|
1020
1125
|
}
|
|
1021
1126
|
interface CryptoKeyPair {
|
|
@@ -1123,6 +1228,11 @@ declare class DigestStream extends WritableStream<
|
|
|
1123
1228
|
readonly digest: Promise<ArrayBuffer>;
|
|
1124
1229
|
get bytesWritten(): number | bigint;
|
|
1125
1230
|
}
|
|
1231
|
+
/**
|
|
1232
|
+
* 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.
|
|
1233
|
+
*
|
|
1234
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1235
|
+
*/
|
|
1126
1236
|
declare class TextDecoder {
|
|
1127
1237
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1128
1238
|
/**
|
|
@@ -1148,6 +1258,11 @@ declare class TextDecoder {
|
|
|
1148
1258
|
readonly fatal: boolean;
|
|
1149
1259
|
readonly ignoreBOM: boolean;
|
|
1150
1260
|
}
|
|
1261
|
+
/**
|
|
1262
|
+
* 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.
|
|
1263
|
+
*
|
|
1264
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1265
|
+
*/
|
|
1151
1266
|
declare class TextEncoder {
|
|
1152
1267
|
constructor();
|
|
1153
1268
|
/**
|
|
@@ -1178,17 +1293,22 @@ interface TextEncoderEncodeIntoResult {
|
|
|
1178
1293
|
read: number;
|
|
1179
1294
|
written: number;
|
|
1180
1295
|
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Events providing information related to errors in scripts or in files.
|
|
1298
|
+
*
|
|
1299
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1300
|
+
*/
|
|
1181
1301
|
declare class ErrorEvent extends Event {
|
|
1182
1302
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1183
|
-
|
|
1303
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1184
1304
|
get filename(): string;
|
|
1185
|
-
|
|
1305
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1186
1306
|
get message(): string;
|
|
1187
|
-
|
|
1307
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1188
1308
|
get lineno(): number;
|
|
1189
|
-
|
|
1309
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1190
1310
|
get colno(): number;
|
|
1191
|
-
|
|
1311
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1192
1312
|
get error(): any;
|
|
1193
1313
|
}
|
|
1194
1314
|
interface ErrorEventErrorEventInit {
|
|
@@ -1198,21 +1318,34 @@ interface ErrorEventErrorEventInit {
|
|
|
1198
1318
|
colno?: number;
|
|
1199
1319
|
error?: any;
|
|
1200
1320
|
}
|
|
1321
|
+
/**
|
|
1322
|
+
* 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".
|
|
1323
|
+
*
|
|
1324
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1325
|
+
*/
|
|
1201
1326
|
declare class FormData {
|
|
1202
1327
|
constructor();
|
|
1328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1203
1329
|
append(name: string, value: string): void;
|
|
1330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1204
1331
|
append(name: string, value: Blob, filename?: string): void;
|
|
1332
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1205
1333
|
delete(name: string): void;
|
|
1334
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1206
1335
|
get(name: string): (File | string) | null;
|
|
1336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1207
1337
|
getAll(name: string): (File | string)[];
|
|
1338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1208
1339
|
has(name: string): boolean;
|
|
1340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1209
1341
|
set(name: string, value: string): void;
|
|
1342
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1210
1343
|
set(name: string, value: Blob, filename?: string): void;
|
|
1211
|
-
|
|
1344
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1212
1345
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1213
|
-
|
|
1346
|
+
/* Returns a list of keys in the list. */
|
|
1214
1347
|
keys(): IterableIterator<string>;
|
|
1215
|
-
|
|
1348
|
+
/* Returns a list of values in the list. */
|
|
1216
1349
|
values(): IterableIterator<File | string>;
|
|
1217
1350
|
forEach<This = unknown>(
|
|
1218
1351
|
callback: (
|
|
@@ -1298,10 +1431,15 @@ interface Text {
|
|
|
1298
1431
|
interface DocumentEnd {
|
|
1299
1432
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1300
1433
|
}
|
|
1434
|
+
/**
|
|
1435
|
+
* 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.
|
|
1436
|
+
*
|
|
1437
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1438
|
+
*/
|
|
1301
1439
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1302
|
-
|
|
1440
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1303
1441
|
readonly request: Request;
|
|
1304
|
-
|
|
1442
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1305
1443
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1306
1444
|
passThroughOnException(): void;
|
|
1307
1445
|
}
|
|
@@ -1309,23 +1447,33 @@ type HeadersInit =
|
|
|
1309
1447
|
| Headers
|
|
1310
1448
|
| Iterable<Iterable<string>>
|
|
1311
1449
|
| Record<string, string>;
|
|
1450
|
+
/**
|
|
1451
|
+
* 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.
|
|
1452
|
+
*
|
|
1453
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1454
|
+
*/
|
|
1312
1455
|
declare class Headers {
|
|
1313
1456
|
constructor(init?: HeadersInit);
|
|
1457
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1314
1458
|
get(name: string): string | null;
|
|
1315
1459
|
getAll(name: string): string[];
|
|
1460
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1316
1461
|
has(name: string): boolean;
|
|
1462
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1317
1463
|
set(name: string, value: string): void;
|
|
1464
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1318
1465
|
append(name: string, value: string): void;
|
|
1466
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1319
1467
|
delete(name: string): void;
|
|
1320
1468
|
forEach<This = unknown>(
|
|
1321
1469
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1322
1470
|
thisArg?: This,
|
|
1323
1471
|
): void;
|
|
1324
|
-
|
|
1472
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1325
1473
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1326
|
-
|
|
1474
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1327
1475
|
keys(): IterableIterator<string>;
|
|
1328
|
-
|
|
1476
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1329
1477
|
values(): IterableIterator<string>;
|
|
1330
1478
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1331
1479
|
}
|
|
@@ -1338,34 +1486,46 @@ type BodyInit =
|
|
|
1338
1486
|
| URLSearchParams
|
|
1339
1487
|
| FormData;
|
|
1340
1488
|
declare abstract class Body {
|
|
1489
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1341
1490
|
readonly body: ReadableStream | null;
|
|
1491
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1342
1492
|
readonly bodyUsed: boolean;
|
|
1493
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1343
1494
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1344
1495
|
bytes(): Promise<Uint8Array>;
|
|
1496
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1345
1497
|
text(): Promise<string>;
|
|
1498
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1346
1499
|
json<T>(): Promise<T>;
|
|
1500
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1347
1501
|
formData(): Promise<FormData>;
|
|
1502
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1348
1503
|
blob(): Promise<Blob>;
|
|
1349
1504
|
}
|
|
1505
|
+
/**
|
|
1506
|
+
* This Fetch API interface represents the response to a request.
|
|
1507
|
+
*
|
|
1508
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1509
|
+
*/
|
|
1350
1510
|
declare class Response extends Body {
|
|
1351
1511
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1352
|
-
|
|
1512
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1353
1513
|
static redirect(url: string, status?: number): Response;
|
|
1354
|
-
|
|
1514
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1355
1515
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1356
|
-
|
|
1516
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1357
1517
|
clone(): Response;
|
|
1358
|
-
|
|
1518
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1359
1519
|
readonly status: number;
|
|
1360
|
-
|
|
1520
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1361
1521
|
readonly statusText: string;
|
|
1362
|
-
|
|
1522
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1363
1523
|
readonly headers: Headers;
|
|
1364
|
-
|
|
1524
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1365
1525
|
readonly ok: boolean;
|
|
1366
|
-
|
|
1526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1367
1527
|
readonly redirected: boolean;
|
|
1368
|
-
|
|
1528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1369
1529
|
readonly url: string;
|
|
1370
1530
|
readonly webSocket: WebSocket | null;
|
|
1371
1531
|
readonly cf?: any;
|
|
@@ -1382,12 +1542,17 @@ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
|
1382
1542
|
| Request<CfHostMetadata, Cf>
|
|
1383
1543
|
| string
|
|
1384
1544
|
| URL;
|
|
1545
|
+
/**
|
|
1546
|
+
* This Fetch API interface represents a resource request.
|
|
1547
|
+
*
|
|
1548
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1549
|
+
*/
|
|
1385
1550
|
declare class Request<
|
|
1386
1551
|
CfHostMetadata = unknown,
|
|
1387
1552
|
Cf = CfProperties<CfHostMetadata>,
|
|
1388
1553
|
> extends Body {
|
|
1389
1554
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1390
|
-
|
|
1555
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1391
1556
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1392
1557
|
/**
|
|
1393
1558
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1435,19 +1600,21 @@ declare class Request<
|
|
|
1435
1600
|
readonly keepalive: boolean;
|
|
1436
1601
|
}
|
|
1437
1602
|
interface RequestInit<Cf = CfProperties> {
|
|
1438
|
-
|
|
1603
|
+
/* A string to set request's method. */
|
|
1439
1604
|
method?: string;
|
|
1440
|
-
|
|
1605
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1441
1606
|
headers?: HeadersInit;
|
|
1442
|
-
|
|
1607
|
+
/* A BodyInit object or null to set request's body. */
|
|
1443
1608
|
body?: BodyInit | null;
|
|
1444
|
-
|
|
1609
|
+
/* 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. */
|
|
1445
1610
|
redirect?: string;
|
|
1446
1611
|
fetcher?: Fetcher | null;
|
|
1447
1612
|
cf?: Cf;
|
|
1448
|
-
|
|
1613
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1614
|
+
cache?: string;
|
|
1615
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1449
1616
|
integrity?: string;
|
|
1450
|
-
|
|
1617
|
+
/* An AbortSignal to set request's signal. */
|
|
1451
1618
|
signal?: AbortSignal | null;
|
|
1452
1619
|
}
|
|
1453
1620
|
type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
|
|
@@ -1879,31 +2046,36 @@ type ReadableStreamReadResult<R = any> =
|
|
|
1879
2046
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1880
2047
|
*/
|
|
1881
2048
|
interface ReadableStream<R = any> {
|
|
1882
|
-
|
|
2049
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1883
2050
|
readonly locked: boolean;
|
|
1884
|
-
|
|
2051
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1885
2052
|
cancel(reason?: any): Promise<void>;
|
|
1886
|
-
|
|
2053
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1887
2054
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1888
|
-
|
|
2055
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1889
2056
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1890
|
-
|
|
2057
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1891
2058
|
pipeThrough<T>(
|
|
1892
2059
|
transform: ReadableWritablePair<T, R>,
|
|
1893
2060
|
options?: StreamPipeOptions,
|
|
1894
2061
|
): ReadableStream<T>;
|
|
1895
|
-
|
|
2062
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1896
2063
|
pipeTo(
|
|
1897
2064
|
destination: WritableStream<R>,
|
|
1898
2065
|
options?: StreamPipeOptions,
|
|
1899
2066
|
): Promise<void>;
|
|
1900
|
-
|
|
2067
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1901
2068
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1902
2069
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1903
2070
|
[Symbol.asyncIterator](
|
|
1904
2071
|
options?: ReadableStreamValuesOptions,
|
|
1905
2072
|
): AsyncIterableIterator<R>;
|
|
1906
2073
|
}
|
|
2074
|
+
/**
|
|
2075
|
+
* 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.
|
|
2076
|
+
*
|
|
2077
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2078
|
+
*/
|
|
1907
2079
|
declare const ReadableStream: {
|
|
1908
2080
|
prototype: ReadableStream;
|
|
1909
2081
|
new (
|
|
@@ -1915,24 +2087,26 @@ declare const ReadableStream: {
|
|
|
1915
2087
|
strategy?: QueuingStrategy<R>,
|
|
1916
2088
|
): ReadableStream<R>;
|
|
1917
2089
|
};
|
|
2090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1918
2091
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
1919
2092
|
constructor(stream: ReadableStream);
|
|
1920
2093
|
readonly closed: Promise<void>;
|
|
1921
2094
|
cancel(reason?: any): Promise<void>;
|
|
1922
|
-
|
|
2095
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1923
2096
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1924
|
-
|
|
2097
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1925
2098
|
releaseLock(): void;
|
|
1926
2099
|
}
|
|
2100
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1927
2101
|
declare class ReadableStreamBYOBReader {
|
|
1928
2102
|
constructor(stream: ReadableStream);
|
|
1929
2103
|
readonly closed: Promise<void>;
|
|
1930
2104
|
cancel(reason?: any): Promise<void>;
|
|
1931
|
-
|
|
2105
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1932
2106
|
read<T extends ArrayBufferView>(
|
|
1933
2107
|
view: T,
|
|
1934
2108
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1935
|
-
|
|
2109
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1936
2110
|
releaseLock(): void;
|
|
1937
2111
|
readAtLeast<T extends ArrayBufferView>(
|
|
1938
2112
|
minElements: number,
|
|
@@ -1950,38 +2124,38 @@ interface ReadableStreamGetReaderOptions {
|
|
|
1950
2124
|
*/
|
|
1951
2125
|
mode: "byob";
|
|
1952
2126
|
}
|
|
1953
|
-
|
|
2127
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1954
2128
|
interface ReadableStreamBYOBRequest {
|
|
1955
|
-
|
|
2129
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1956
2130
|
get view(): Uint8Array | null;
|
|
1957
|
-
|
|
2131
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1958
2132
|
respond(bytesWritten: number): void;
|
|
1959
|
-
|
|
2133
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1960
2134
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1961
2135
|
get atLeast(): number | null;
|
|
1962
2136
|
}
|
|
1963
|
-
|
|
2137
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1964
2138
|
interface ReadableStreamDefaultController<R = any> {
|
|
1965
|
-
|
|
2139
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1966
2140
|
get desiredSize(): number | null;
|
|
1967
|
-
|
|
2141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1968
2142
|
close(): void;
|
|
1969
|
-
|
|
2143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1970
2144
|
enqueue(chunk?: R): void;
|
|
1971
|
-
|
|
2145
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
1972
2146
|
error(reason: any): void;
|
|
1973
2147
|
}
|
|
1974
|
-
|
|
2148
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
1975
2149
|
interface ReadableByteStreamController {
|
|
1976
|
-
|
|
2150
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
1977
2151
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
1978
|
-
|
|
2152
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
1979
2153
|
get desiredSize(): number | null;
|
|
1980
|
-
|
|
2154
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
1981
2155
|
close(): void;
|
|
1982
|
-
|
|
2156
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
1983
2157
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
1984
|
-
|
|
2158
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
1985
2159
|
error(reason: any): void;
|
|
1986
2160
|
}
|
|
1987
2161
|
/**
|
|
@@ -1990,20 +2164,20 @@ interface ReadableByteStreamController {
|
|
|
1990
2164
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
1991
2165
|
*/
|
|
1992
2166
|
interface WritableStreamDefaultController {
|
|
1993
|
-
|
|
2167
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
1994
2168
|
get signal(): AbortSignal;
|
|
1995
|
-
|
|
2169
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
1996
2170
|
error(reason?: any): void;
|
|
1997
2171
|
}
|
|
1998
|
-
|
|
2172
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
1999
2173
|
interface TransformStreamDefaultController<O = any> {
|
|
2000
|
-
|
|
2174
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2001
2175
|
get desiredSize(): number | null;
|
|
2002
|
-
|
|
2176
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2003
2177
|
enqueue(chunk?: O): void;
|
|
2004
|
-
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2005
2179
|
error(reason: any): void;
|
|
2006
|
-
|
|
2180
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2007
2181
|
terminate(): void;
|
|
2008
2182
|
}
|
|
2009
2183
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2015,46 +2189,57 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2015
2189
|
writable: WritableStream<W>;
|
|
2016
2190
|
readable: ReadableStream<R>;
|
|
2017
2191
|
}
|
|
2192
|
+
/**
|
|
2193
|
+
* 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.
|
|
2194
|
+
*
|
|
2195
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2196
|
+
*/
|
|
2018
2197
|
declare class WritableStream<W = any> {
|
|
2019
2198
|
constructor(
|
|
2020
2199
|
underlyingSink?: UnderlyingSink,
|
|
2021
2200
|
queuingStrategy?: QueuingStrategy,
|
|
2022
2201
|
);
|
|
2023
|
-
|
|
2202
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2024
2203
|
readonly locked: boolean;
|
|
2025
|
-
|
|
2204
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2026
2205
|
abort(reason?: any): Promise<void>;
|
|
2027
|
-
|
|
2206
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2028
2207
|
close(): Promise<void>;
|
|
2029
|
-
|
|
2208
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2030
2209
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2031
2210
|
}
|
|
2211
|
+
/**
|
|
2212
|
+
* 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.
|
|
2213
|
+
*
|
|
2214
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2215
|
+
*/
|
|
2032
2216
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2033
2217
|
constructor(stream: WritableStream);
|
|
2034
|
-
|
|
2218
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2035
2219
|
readonly closed: Promise<void>;
|
|
2036
|
-
|
|
2220
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2037
2221
|
readonly ready: Promise<void>;
|
|
2038
|
-
|
|
2222
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2039
2223
|
readonly desiredSize: number | null;
|
|
2040
|
-
|
|
2224
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2041
2225
|
abort(reason?: any): Promise<void>;
|
|
2042
|
-
|
|
2226
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2043
2227
|
close(): Promise<void>;
|
|
2044
|
-
|
|
2228
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2045
2229
|
write(chunk?: W): Promise<void>;
|
|
2046
|
-
|
|
2230
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2047
2231
|
releaseLock(): void;
|
|
2048
2232
|
}
|
|
2233
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2049
2234
|
declare class TransformStream<I = any, O = any> {
|
|
2050
2235
|
constructor(
|
|
2051
2236
|
transformer?: Transformer<I, O>,
|
|
2052
2237
|
writableStrategy?: QueuingStrategy<I>,
|
|
2053
2238
|
readableStrategy?: QueuingStrategy<O>,
|
|
2054
2239
|
);
|
|
2055
|
-
|
|
2240
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2056
2241
|
readonly readable: ReadableStream<O>;
|
|
2057
|
-
|
|
2242
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2058
2243
|
readonly writable: WritableStream<I>;
|
|
2059
2244
|
}
|
|
2060
2245
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2075,22 +2260,26 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2075
2260
|
interface ReadableStreamValuesOptions {
|
|
2076
2261
|
preventCancel?: boolean;
|
|
2077
2262
|
}
|
|
2263
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2078
2264
|
declare class CompressionStream extends TransformStream<
|
|
2079
2265
|
ArrayBuffer | ArrayBufferView,
|
|
2080
2266
|
Uint8Array
|
|
2081
2267
|
> {
|
|
2082
2268
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2083
2269
|
}
|
|
2270
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2084
2271
|
declare class DecompressionStream extends TransformStream<
|
|
2085
2272
|
ArrayBuffer | ArrayBufferView,
|
|
2086
2273
|
Uint8Array
|
|
2087
2274
|
> {
|
|
2088
2275
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2089
2276
|
}
|
|
2277
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2090
2278
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2091
2279
|
constructor();
|
|
2092
2280
|
get encoding(): string;
|
|
2093
2281
|
}
|
|
2282
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2094
2283
|
declare class TextDecoderStream extends TransformStream<
|
|
2095
2284
|
ArrayBuffer | ArrayBufferView,
|
|
2096
2285
|
string
|
|
@@ -2104,20 +2293,30 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2104
2293
|
fatal?: boolean;
|
|
2105
2294
|
ignoreBOM?: boolean;
|
|
2106
2295
|
}
|
|
2296
|
+
/**
|
|
2297
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2298
|
+
*
|
|
2299
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2300
|
+
*/
|
|
2107
2301
|
declare class ByteLengthQueuingStrategy
|
|
2108
2302
|
implements QueuingStrategy<ArrayBufferView>
|
|
2109
2303
|
{
|
|
2110
2304
|
constructor(init: QueuingStrategyInit);
|
|
2111
|
-
|
|
2305
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2112
2306
|
get highWaterMark(): number;
|
|
2113
|
-
|
|
2307
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2114
2308
|
get size(): (chunk?: any) => number;
|
|
2115
2309
|
}
|
|
2310
|
+
/**
|
|
2311
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2312
|
+
*
|
|
2313
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2314
|
+
*/
|
|
2116
2315
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2117
2316
|
constructor(init: QueuingStrategyInit);
|
|
2118
|
-
|
|
2317
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2119
2318
|
get highWaterMark(): number;
|
|
2120
|
-
|
|
2319
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2121
2320
|
get size(): (chunk?: any) => number;
|
|
2122
2321
|
}
|
|
2123
2322
|
interface QueuingStrategyInit {
|
|
@@ -2161,6 +2360,7 @@ interface TraceItem {
|
|
|
2161
2360
|
readonly dispatchNamespace?: string;
|
|
2162
2361
|
readonly scriptTags?: string[];
|
|
2163
2362
|
readonly outcome: string;
|
|
2363
|
+
readonly truncated: boolean;
|
|
2164
2364
|
}
|
|
2165
2365
|
interface TraceItemAlarmEventInfo {
|
|
2166
2366
|
readonly scheduledTime: Date;
|
|
@@ -2242,36 +2442,43 @@ interface TraceMetrics {
|
|
|
2242
2442
|
interface UnsafeTraceMetrics {
|
|
2243
2443
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2244
2444
|
}
|
|
2445
|
+
/**
|
|
2446
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2447
|
+
*
|
|
2448
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2449
|
+
*/
|
|
2245
2450
|
declare class URL {
|
|
2246
2451
|
constructor(url: string | URL, base?: string | URL);
|
|
2247
|
-
|
|
2452
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2248
2453
|
href: string;
|
|
2249
|
-
|
|
2454
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2250
2455
|
readonly origin: string;
|
|
2251
|
-
|
|
2456
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2252
2457
|
protocol: string;
|
|
2253
|
-
|
|
2458
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2254
2459
|
username: string;
|
|
2255
|
-
|
|
2460
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2256
2461
|
password: string;
|
|
2257
|
-
|
|
2462
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2258
2463
|
host: string;
|
|
2259
|
-
|
|
2464
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2260
2465
|
hostname: string;
|
|
2261
|
-
|
|
2466
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2262
2467
|
port: string;
|
|
2263
|
-
|
|
2468
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2264
2469
|
pathname: string;
|
|
2265
|
-
|
|
2470
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2266
2471
|
search: string;
|
|
2267
|
-
|
|
2472
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2268
2473
|
readonly searchParams: URLSearchParams;
|
|
2269
|
-
|
|
2474
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2270
2475
|
hash: string;
|
|
2476
|
+
/*function toString() { [native code] }*/
|
|
2271
2477
|
toString(): string;
|
|
2272
|
-
|
|
2478
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2273
2479
|
toJSON(): string;
|
|
2274
2480
|
}
|
|
2481
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2275
2482
|
declare class URLSearchParams {
|
|
2276
2483
|
constructor(
|
|
2277
2484
|
init?:
|
|
@@ -2280,19 +2487,51 @@ declare class URLSearchParams {
|
|
|
2280
2487
|
| Record<string, string>
|
|
2281
2488
|
| [key: string, value: string][],
|
|
2282
2489
|
);
|
|
2490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2283
2491
|
get size(): number;
|
|
2492
|
+
/**
|
|
2493
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2494
|
+
*
|
|
2495
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2496
|
+
*/
|
|
2284
2497
|
append(name: string, value: string): void;
|
|
2498
|
+
/**
|
|
2499
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2500
|
+
*
|
|
2501
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2502
|
+
*/
|
|
2285
2503
|
delete(name: string): void;
|
|
2504
|
+
/**
|
|
2505
|
+
* Returns the first value associated to the given search parameter.
|
|
2506
|
+
*
|
|
2507
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2508
|
+
*/
|
|
2286
2509
|
get(name: string): string | null;
|
|
2510
|
+
/**
|
|
2511
|
+
* Returns all the values association with a given search parameter.
|
|
2512
|
+
*
|
|
2513
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2514
|
+
*/
|
|
2287
2515
|
getAll(name: string): string[];
|
|
2516
|
+
/**
|
|
2517
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2518
|
+
*
|
|
2519
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2520
|
+
*/
|
|
2288
2521
|
has(name: string): boolean;
|
|
2522
|
+
/**
|
|
2523
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2524
|
+
*
|
|
2525
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2526
|
+
*/
|
|
2289
2527
|
set(name: string, value: string): void;
|
|
2528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2290
2529
|
sort(): void;
|
|
2291
|
-
|
|
2530
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2292
2531
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2293
|
-
|
|
2532
|
+
/* Returns a list of keys in the search params. */
|
|
2294
2533
|
keys(): IterableIterator<string>;
|
|
2295
|
-
|
|
2534
|
+
/* Returns a list of values in the search params. */
|
|
2296
2535
|
values(): IterableIterator<string>;
|
|
2297
2536
|
forEach<This = unknown>(
|
|
2298
2537
|
callback: (
|
|
@@ -2303,6 +2542,7 @@ declare class URLSearchParams {
|
|
|
2303
2542
|
) => void,
|
|
2304
2543
|
thisArg?: This,
|
|
2305
2544
|
): void;
|
|
2545
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2306
2546
|
toString(): string;
|
|
2307
2547
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2308
2548
|
}
|
|
@@ -2355,6 +2595,11 @@ interface URLPatternURLPatternResult {
|
|
|
2355
2595
|
interface URLPatternURLPatternOptions {
|
|
2356
2596
|
ignoreCase?: boolean;
|
|
2357
2597
|
}
|
|
2598
|
+
/**
|
|
2599
|
+
* 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.
|
|
2600
|
+
*
|
|
2601
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2602
|
+
*/
|
|
2358
2603
|
declare class CloseEvent extends Event {
|
|
2359
2604
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2360
2605
|
/**
|
|
@@ -2381,8 +2626,18 @@ interface CloseEventInit {
|
|
|
2381
2626
|
reason?: string;
|
|
2382
2627
|
wasClean?: boolean;
|
|
2383
2628
|
}
|
|
2629
|
+
/**
|
|
2630
|
+
* A message received by a target object.
|
|
2631
|
+
*
|
|
2632
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2633
|
+
*/
|
|
2384
2634
|
declare class MessageEvent extends Event {
|
|
2385
2635
|
constructor(type: string, initializer: MessageEventInit);
|
|
2636
|
+
/**
|
|
2637
|
+
* Returns the data of the message.
|
|
2638
|
+
*
|
|
2639
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2640
|
+
*/
|
|
2386
2641
|
readonly data: ArrayBuffer | string;
|
|
2387
2642
|
}
|
|
2388
2643
|
interface MessageEventInit {
|
|
@@ -2394,6 +2649,11 @@ type WebSocketEventMap = {
|
|
|
2394
2649
|
open: Event;
|
|
2395
2650
|
error: ErrorEvent;
|
|
2396
2651
|
};
|
|
2652
|
+
/**
|
|
2653
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2654
|
+
*
|
|
2655
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2656
|
+
*/
|
|
2397
2657
|
declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2398
2658
|
constructor(url: string, protocols?: string[] | string);
|
|
2399
2659
|
accept(): void;
|
|
@@ -2979,6 +3239,7 @@ interface GPUOrigin3DDict {
|
|
|
2979
3239
|
y?: number;
|
|
2980
3240
|
z?: number;
|
|
2981
3241
|
}
|
|
3242
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
2982
3243
|
declare class EventSource {
|
|
2983
3244
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2984
3245
|
/**
|
|
@@ -3005,17 +3266,17 @@ declare class EventSource {
|
|
|
3005
3266
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3006
3267
|
*/
|
|
3007
3268
|
get readyState(): number;
|
|
3008
|
-
|
|
3269
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3009
3270
|
get onopen(): any | null;
|
|
3010
|
-
|
|
3271
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3011
3272
|
set onopen(value: any | null);
|
|
3012
|
-
|
|
3273
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3013
3274
|
get onmessage(): any | null;
|
|
3014
|
-
|
|
3275
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3015
3276
|
set onmessage(value: any | null);
|
|
3016
|
-
|
|
3277
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3017
3278
|
get onerror(): any | null;
|
|
3018
|
-
|
|
3279
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3019
3280
|
set onerror(value: any | null);
|
|
3020
3281
|
static readonly CONNECTING: number;
|
|
3021
3282
|
static readonly OPEN: number;
|
|
@@ -4382,6 +4643,12 @@ interface ForwardableEmailMessage extends EmailMessage {
|
|
|
4382
4643
|
* @returns A promise that resolves when the email message is forwarded.
|
|
4383
4644
|
*/
|
|
4384
4645
|
forward(rcptTo: string, headers?: Headers): Promise<void>;
|
|
4646
|
+
/**
|
|
4647
|
+
* Reply to the sender of this email message with a new EmailMessage object.
|
|
4648
|
+
* @param message The reply message.
|
|
4649
|
+
* @returns A promise that resolves when the email message is replied.
|
|
4650
|
+
*/
|
|
4651
|
+
reply(message: EmailMessage): Promise<void>;
|
|
4385
4652
|
}
|
|
4386
4653
|
/**
|
|
4387
4654
|
* A binding that allows a Worker to send email messages.
|