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