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