@cloudflare/workers-types 4.20240712.0 → 4.20240718.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 +427 -166
- package/2021-11-03/index.ts +427 -166
- package/2022-01-31/index.d.ts +443 -176
- package/2022-01-31/index.ts +443 -176
- package/2022-03-21/index.d.ts +443 -176
- package/2022-03-21/index.ts +443 -176
- package/2022-08-04/index.d.ts +443 -176
- package/2022-08-04/index.ts +443 -176
- package/2022-10-31/index.d.ts +444 -177
- package/2022-10-31/index.ts +444 -177
- package/2022-11-30/index.d.ts +449 -173
- package/2022-11-30/index.ts +449 -173
- package/2023-03-01/index.d.ts +450 -173
- package/2023-03-01/index.ts +450 -173
- package/2023-07-01/index.d.ts +450 -173
- package/2023-07-01/index.ts +450 -173
- package/experimental/index.d.ts +450 -173
- package/experimental/index.ts +450 -173
- package/index.d.ts +427 -166
- package/index.ts +427 -166
- package/oldest/index.d.ts +427 -166
- package/oldest/index.ts +427 -166
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -14,11 +14,16 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
/* eslint-disable */
|
|
16
16
|
// noinspection JSUnusedGlobalSymbols
|
|
17
|
+
/**
|
|
18
|
+
* An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
|
|
19
|
+
*
|
|
20
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
|
|
21
|
+
*/
|
|
17
22
|
declare class DOMException extends Error {
|
|
18
23
|
constructor(message?: string, name?: string);
|
|
19
|
-
|
|
24
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
|
|
20
25
|
readonly message: string;
|
|
21
|
-
|
|
26
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
|
|
22
27
|
readonly name: string;
|
|
23
28
|
/**
|
|
24
29
|
* @deprecated
|
|
@@ -64,45 +69,45 @@ type WorkerGlobalScopeEventMap = {
|
|
|
64
69
|
declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {
|
|
65
70
|
EventTarget: typeof EventTarget;
|
|
66
71
|
}
|
|
67
|
-
|
|
72
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
|
|
68
73
|
interface Console {
|
|
69
74
|
"assert"(condition?: boolean, ...data: any[]): void;
|
|
70
|
-
|
|
75
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
|
|
71
76
|
clear(): void;
|
|
72
|
-
|
|
77
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
|
|
73
78
|
count(label?: string): void;
|
|
74
|
-
|
|
79
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */
|
|
75
80
|
countReset(label?: string): void;
|
|
76
|
-
|
|
81
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
|
|
77
82
|
debug(...data: any[]): void;
|
|
78
|
-
|
|
83
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
|
|
79
84
|
dir(item?: any, options?: any): void;
|
|
80
|
-
|
|
85
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
|
|
81
86
|
dirxml(...data: any[]): void;
|
|
82
|
-
|
|
87
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
|
|
83
88
|
error(...data: any[]): void;
|
|
84
|
-
|
|
89
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
|
|
85
90
|
group(...data: any[]): void;
|
|
86
|
-
|
|
91
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */
|
|
87
92
|
groupCollapsed(...data: any[]): void;
|
|
88
|
-
|
|
93
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */
|
|
89
94
|
groupEnd(): void;
|
|
90
|
-
|
|
95
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
|
|
91
96
|
info(...data: any[]): void;
|
|
92
|
-
|
|
97
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
|
|
93
98
|
log(...data: any[]): void;
|
|
94
|
-
|
|
99
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
|
|
95
100
|
table(tabularData?: any, properties?: string[]): void;
|
|
96
|
-
|
|
101
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
|
|
97
102
|
time(label?: string): void;
|
|
98
|
-
|
|
103
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */
|
|
99
104
|
timeEnd(label?: string): void;
|
|
100
|
-
|
|
105
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */
|
|
101
106
|
timeLog(label?: string, ...data: any[]): void;
|
|
102
107
|
timeStamp(label?: string): void;
|
|
103
|
-
|
|
108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
|
|
104
109
|
trace(...data: any[]): void;
|
|
105
|
-
|
|
110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
|
|
106
111
|
warn(...data: any[]): void;
|
|
107
112
|
}
|
|
108
113
|
declare const console: Console;
|
|
@@ -195,6 +200,7 @@ declare namespace WebAssembly {
|
|
|
195
200
|
}
|
|
196
201
|
/**
|
|
197
202
|
* This ServiceWorker API interface represents the global execution context of a service worker.
|
|
203
|
+
* Available only in secure contexts.
|
|
198
204
|
*
|
|
199
205
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
|
|
200
206
|
*/
|
|
@@ -317,54 +323,73 @@ declare function removeEventListener<
|
|
|
317
323
|
declare function dispatchEvent(
|
|
318
324
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
319
325
|
): boolean;
|
|
320
|
-
|
|
326
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
321
327
|
declare function btoa(data: string): string;
|
|
322
|
-
|
|
328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
323
329
|
declare function atob(data: string): string;
|
|
324
|
-
|
|
330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
325
331
|
declare function setTimeout(
|
|
326
332
|
callback: (...args: any[]) => void,
|
|
327
333
|
msDelay?: number,
|
|
328
334
|
): number;
|
|
329
|
-
|
|
335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
330
336
|
declare function setTimeout<Args extends any[]>(
|
|
331
337
|
callback: (...args: Args) => void,
|
|
332
338
|
msDelay?: number,
|
|
333
339
|
...args: Args
|
|
334
340
|
): number;
|
|
335
|
-
|
|
341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
336
342
|
declare function clearTimeout(timeoutId: number | null): void;
|
|
337
|
-
|
|
343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
338
344
|
declare function setInterval(
|
|
339
345
|
callback: (...args: any[]) => void,
|
|
340
346
|
msDelay?: number,
|
|
341
347
|
): number;
|
|
342
|
-
|
|
348
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
343
349
|
declare function setInterval<Args extends any[]>(
|
|
344
350
|
callback: (...args: Args) => void,
|
|
345
351
|
msDelay?: number,
|
|
346
352
|
...args: Args
|
|
347
353
|
): number;
|
|
348
|
-
|
|
354
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
349
355
|
declare function clearInterval(timeoutId: number | null): void;
|
|
350
|
-
|
|
356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
351
357
|
declare function queueMicrotask(task: Function): void;
|
|
352
|
-
|
|
358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
353
359
|
declare function structuredClone<T>(
|
|
354
360
|
value: T,
|
|
355
361
|
options?: StructuredSerializeOptions,
|
|
356
362
|
): T;
|
|
357
|
-
|
|
363
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
358
364
|
declare function reportError(error: any): void;
|
|
359
|
-
|
|
365
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
360
366
|
declare function fetch(
|
|
361
367
|
input: RequestInfo,
|
|
362
368
|
init?: RequestInit<RequestInitCfProperties>,
|
|
363
369
|
): Promise<Response>;
|
|
364
370
|
declare const self: ServiceWorkerGlobalScope;
|
|
371
|
+
/**
|
|
372
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
373
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
374
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
375
|
+
* compared to those implemented in most browsers.
|
|
376
|
+
*
|
|
377
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
378
|
+
*/
|
|
365
379
|
declare const crypto: Crypto;
|
|
380
|
+
/**
|
|
381
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
382
|
+
*
|
|
383
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
384
|
+
*/
|
|
366
385
|
declare const caches: CacheStorage;
|
|
367
386
|
declare const scheduler: Scheduler;
|
|
387
|
+
/**
|
|
388
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
389
|
+
* as well as timing of subrequests and other operations.
|
|
390
|
+
*
|
|
391
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
392
|
+
*/
|
|
368
393
|
declare const performance: Performance;
|
|
369
394
|
declare const origin: string;
|
|
370
395
|
declare const navigator: Navigator;
|
|
@@ -420,10 +445,11 @@ interface ExportedHandler<
|
|
|
420
445
|
interface StructuredSerializeOptions {
|
|
421
446
|
transfer?: any[];
|
|
422
447
|
}
|
|
448
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
423
449
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
424
|
-
|
|
450
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
425
451
|
readonly promise: Promise<any>;
|
|
426
|
-
|
|
452
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
427
453
|
readonly reason: any;
|
|
428
454
|
}
|
|
429
455
|
declare abstract class Navigator {
|
|
@@ -441,14 +467,15 @@ declare abstract class Navigator {
|
|
|
441
467
|
readonly gpu: GPU;
|
|
442
468
|
}
|
|
443
469
|
/**
|
|
444
|
-
*
|
|
470
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
471
|
+
* as well as timing of subrequests and other operations.
|
|
445
472
|
*
|
|
446
|
-
* [
|
|
473
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
447
474
|
*/
|
|
448
475
|
interface Performance {
|
|
449
|
-
|
|
476
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
450
477
|
readonly timeOrigin: number;
|
|
451
|
-
|
|
478
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
452
479
|
now(): number;
|
|
453
480
|
}
|
|
454
481
|
interface AlarmInvocationInfo {
|
|
@@ -646,6 +673,11 @@ interface AnalyticsEngineDataPoint {
|
|
|
646
673
|
doubles?: number[];
|
|
647
674
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
648
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* An event which takes place in the DOM.
|
|
678
|
+
*
|
|
679
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
680
|
+
*/
|
|
649
681
|
declare class Event {
|
|
650
682
|
constructor(type: string, init?: EventInit);
|
|
651
683
|
/**
|
|
@@ -769,6 +801,11 @@ interface EventListenerObject<EventType extends Event = Event> {
|
|
|
769
801
|
type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
770
802
|
| EventListener<EventType>
|
|
771
803
|
| EventListenerObject<EventType>;
|
|
804
|
+
/**
|
|
805
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
806
|
+
*
|
|
807
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
808
|
+
*/
|
|
772
809
|
declare class EventTarget<
|
|
773
810
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
774
811
|
> {
|
|
@@ -824,6 +861,11 @@ interface EventTargetAddEventListenerOptions {
|
|
|
824
861
|
interface EventTargetHandlerObject {
|
|
825
862
|
handleEvent: (event: Event) => any | undefined;
|
|
826
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
866
|
+
*
|
|
867
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
868
|
+
*/
|
|
827
869
|
declare class AbortController {
|
|
828
870
|
constructor();
|
|
829
871
|
/**
|
|
@@ -839,11 +881,17 @@ declare class AbortController {
|
|
|
839
881
|
*/
|
|
840
882
|
abort(reason?: any): void;
|
|
841
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* 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.
|
|
886
|
+
*
|
|
887
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
888
|
+
*/
|
|
842
889
|
declare abstract class AbortSignal extends EventTarget {
|
|
843
|
-
|
|
890
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
844
891
|
static abort(reason?: any): AbortSignal;
|
|
845
|
-
|
|
892
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
846
893
|
static timeout(delay: number): AbortSignal;
|
|
894
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
847
895
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
848
896
|
/**
|
|
849
897
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -851,13 +899,13 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
851
899
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
852
900
|
*/
|
|
853
901
|
get aborted(): boolean;
|
|
854
|
-
|
|
902
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
855
903
|
get reason(): any;
|
|
856
|
-
|
|
904
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
857
905
|
get onabort(): any | null;
|
|
858
|
-
|
|
906
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
859
907
|
set onabort(value: any | null);
|
|
860
|
-
|
|
908
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
861
909
|
throwIfAborted(): void;
|
|
862
910
|
}
|
|
863
911
|
interface Scheduler {
|
|
@@ -866,10 +914,16 @@ interface Scheduler {
|
|
|
866
914
|
interface SchedulerWaitOptions {
|
|
867
915
|
signal?: AbortSignal;
|
|
868
916
|
}
|
|
917
|
+
/**
|
|
918
|
+
* 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.
|
|
919
|
+
*
|
|
920
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
921
|
+
*/
|
|
869
922
|
declare abstract class ExtendableEvent extends Event {
|
|
870
|
-
|
|
923
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
871
924
|
waitUntil(promise: Promise<any>): void;
|
|
872
925
|
}
|
|
926
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
873
927
|
declare class CustomEvent<T = any> extends Event {
|
|
874
928
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
875
929
|
/**
|
|
@@ -885,59 +939,90 @@ interface CustomEventCustomEventInit {
|
|
|
885
939
|
composed?: boolean;
|
|
886
940
|
detail?: any;
|
|
887
941
|
}
|
|
942
|
+
/**
|
|
943
|
+
* 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.
|
|
944
|
+
*
|
|
945
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
946
|
+
*/
|
|
888
947
|
declare class Blob {
|
|
889
948
|
constructor(
|
|
890
949
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
891
950
|
options?: BlobOptions,
|
|
892
951
|
);
|
|
893
|
-
|
|
952
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
894
953
|
get size(): number;
|
|
895
|
-
|
|
954
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
896
955
|
get type(): string;
|
|
897
|
-
|
|
956
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
898
957
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
899
|
-
|
|
958
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
900
959
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
901
960
|
bytes(): Promise<Uint8Array>;
|
|
902
|
-
|
|
961
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
903
962
|
text(): Promise<string>;
|
|
904
|
-
|
|
963
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
905
964
|
stream(): ReadableStream;
|
|
906
965
|
}
|
|
907
966
|
interface BlobOptions {
|
|
908
967
|
type?: string;
|
|
909
968
|
}
|
|
969
|
+
/**
|
|
970
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
971
|
+
*
|
|
972
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
973
|
+
*/
|
|
910
974
|
declare class File extends Blob {
|
|
911
975
|
constructor(
|
|
912
976
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
913
977
|
name: string,
|
|
914
978
|
options?: FileOptions,
|
|
915
979
|
);
|
|
916
|
-
|
|
980
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
917
981
|
get name(): string;
|
|
918
|
-
|
|
982
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
919
983
|
get lastModified(): number;
|
|
920
984
|
}
|
|
921
985
|
interface FileOptions {
|
|
922
986
|
type?: string;
|
|
923
987
|
lastModified?: number;
|
|
924
988
|
}
|
|
989
|
+
/**
|
|
990
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
991
|
+
*
|
|
992
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
993
|
+
*/
|
|
925
994
|
declare abstract class CacheStorage {
|
|
926
|
-
|
|
995
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
927
996
|
open(cacheName: string): Promise<Cache>;
|
|
928
997
|
readonly default: Cache;
|
|
929
998
|
}
|
|
999
|
+
/**
|
|
1000
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
1001
|
+
*
|
|
1002
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
1003
|
+
*/
|
|
930
1004
|
declare abstract class Cache {
|
|
1005
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
931
1006
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
1007
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
932
1008
|
match(
|
|
933
1009
|
request: RequestInfo,
|
|
934
1010
|
options?: CacheQueryOptions,
|
|
935
1011
|
): Promise<Response | undefined>;
|
|
1012
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
936
1013
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
937
1014
|
}
|
|
938
1015
|
interface CacheQueryOptions {
|
|
939
1016
|
ignoreMethod?: boolean;
|
|
940
1017
|
}
|
|
1018
|
+
/**
|
|
1019
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
1020
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
1021
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
1022
|
+
* compared to those implemented in most browsers.
|
|
1023
|
+
*
|
|
1024
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
1025
|
+
*/
|
|
941
1026
|
declare abstract class Crypto {
|
|
942
1027
|
/**
|
|
943
1028
|
* Available only in secure contexts.
|
|
@@ -945,7 +1030,7 @@ declare abstract class Crypto {
|
|
|
945
1030
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
946
1031
|
*/
|
|
947
1032
|
get subtle(): SubtleCrypto;
|
|
948
|
-
|
|
1033
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
949
1034
|
getRandomValues<
|
|
950
1035
|
T extends
|
|
951
1036
|
| Int8Array
|
|
@@ -965,39 +1050,50 @@ declare abstract class Crypto {
|
|
|
965
1050
|
randomUUID(): string;
|
|
966
1051
|
DigestStream: typeof DigestStream;
|
|
967
1052
|
}
|
|
1053
|
+
/**
|
|
1054
|
+
* 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).
|
|
1055
|
+
* Available only in secure contexts.
|
|
1056
|
+
*
|
|
1057
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1058
|
+
*/
|
|
968
1059
|
declare abstract class SubtleCrypto {
|
|
1060
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
969
1061
|
encrypt(
|
|
970
1062
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
971
1063
|
key: CryptoKey,
|
|
972
1064
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
973
1065
|
): Promise<ArrayBuffer>;
|
|
1066
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
974
1067
|
decrypt(
|
|
975
1068
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
976
1069
|
key: CryptoKey,
|
|
977
1070
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
978
1071
|
): Promise<ArrayBuffer>;
|
|
1072
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
979
1073
|
sign(
|
|
980
1074
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
981
1075
|
key: CryptoKey,
|
|
982
1076
|
data: ArrayBuffer | ArrayBufferView,
|
|
983
1077
|
): Promise<ArrayBuffer>;
|
|
1078
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
984
1079
|
verify(
|
|
985
1080
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
986
1081
|
key: CryptoKey,
|
|
987
1082
|
signature: ArrayBuffer | ArrayBufferView,
|
|
988
1083
|
data: ArrayBuffer | ArrayBufferView,
|
|
989
1084
|
): Promise<boolean>;
|
|
1085
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
990
1086
|
digest(
|
|
991
1087
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
992
1088
|
data: ArrayBuffer | ArrayBufferView,
|
|
993
1089
|
): Promise<ArrayBuffer>;
|
|
994
|
-
|
|
1090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
995
1091
|
generateKey(
|
|
996
1092
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
997
1093
|
extractable: boolean,
|
|
998
1094
|
keyUsages: string[],
|
|
999
1095
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
1000
|
-
|
|
1096
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
1001
1097
|
deriveKey(
|
|
1002
1098
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1003
1099
|
baseKey: CryptoKey,
|
|
@@ -1005,12 +1101,13 @@ declare abstract class SubtleCrypto {
|
|
|
1005
1101
|
extractable: boolean,
|
|
1006
1102
|
keyUsages: string[],
|
|
1007
1103
|
): Promise<CryptoKey>;
|
|
1104
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
1008
1105
|
deriveBits(
|
|
1009
1106
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1010
1107
|
baseKey: CryptoKey,
|
|
1011
|
-
length
|
|
1108
|
+
length?: number | null,
|
|
1012
1109
|
): Promise<ArrayBuffer>;
|
|
1013
|
-
|
|
1110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
1014
1111
|
importKey(
|
|
1015
1112
|
format: string,
|
|
1016
1113
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1018,14 +1115,16 @@ declare abstract class SubtleCrypto {
|
|
|
1018
1115
|
extractable: boolean,
|
|
1019
1116
|
keyUsages: string[],
|
|
1020
1117
|
): Promise<CryptoKey>;
|
|
1118
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
1021
1119
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1120
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
1022
1121
|
wrapKey(
|
|
1023
1122
|
format: string,
|
|
1024
1123
|
key: CryptoKey,
|
|
1025
1124
|
wrappingKey: CryptoKey,
|
|
1026
1125
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1027
1126
|
): Promise<ArrayBuffer>;
|
|
1028
|
-
|
|
1127
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
1029
1128
|
unwrapKey(
|
|
1030
1129
|
format: string,
|
|
1031
1130
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1040,12 +1139,18 @@ declare abstract class SubtleCrypto {
|
|
|
1040
1139
|
b: ArrayBuffer | ArrayBufferView,
|
|
1041
1140
|
): boolean;
|
|
1042
1141
|
}
|
|
1142
|
+
/**
|
|
1143
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1144
|
+
* Available only in secure contexts.
|
|
1145
|
+
*
|
|
1146
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1147
|
+
*/
|
|
1043
1148
|
declare abstract class CryptoKey {
|
|
1044
|
-
|
|
1149
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1045
1150
|
readonly type: string;
|
|
1046
|
-
|
|
1151
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1047
1152
|
readonly extractable: boolean;
|
|
1048
|
-
|
|
1153
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1049
1154
|
readonly algorithm:
|
|
1050
1155
|
| CryptoKeyKeyAlgorithm
|
|
1051
1156
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1053,7 +1158,7 @@ declare abstract class CryptoKey {
|
|
|
1053
1158
|
| CryptoKeyRsaKeyAlgorithm
|
|
1054
1159
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1055
1160
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1056
|
-
|
|
1161
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1057
1162
|
readonly usages: string[];
|
|
1058
1163
|
}
|
|
1059
1164
|
interface CryptoKeyPair {
|
|
@@ -1161,6 +1266,11 @@ declare class DigestStream extends WritableStream<
|
|
|
1161
1266
|
get digest(): Promise<ArrayBuffer>;
|
|
1162
1267
|
get bytesWritten(): number | bigint;
|
|
1163
1268
|
}
|
|
1269
|
+
/**
|
|
1270
|
+
* 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.
|
|
1271
|
+
*
|
|
1272
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1273
|
+
*/
|
|
1164
1274
|
declare class TextDecoder {
|
|
1165
1275
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1166
1276
|
/**
|
|
@@ -1186,6 +1296,11 @@ declare class TextDecoder {
|
|
|
1186
1296
|
get fatal(): boolean;
|
|
1187
1297
|
get ignoreBOM(): boolean;
|
|
1188
1298
|
}
|
|
1299
|
+
/**
|
|
1300
|
+
* 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.
|
|
1301
|
+
*
|
|
1302
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1303
|
+
*/
|
|
1189
1304
|
declare class TextEncoder {
|
|
1190
1305
|
constructor();
|
|
1191
1306
|
/**
|
|
@@ -1216,17 +1331,22 @@ interface TextEncoderEncodeIntoResult {
|
|
|
1216
1331
|
read: number;
|
|
1217
1332
|
written: number;
|
|
1218
1333
|
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Events providing information related to errors in scripts or in files.
|
|
1336
|
+
*
|
|
1337
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1338
|
+
*/
|
|
1219
1339
|
declare class ErrorEvent extends Event {
|
|
1220
1340
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1221
|
-
|
|
1341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1222
1342
|
get filename(): string;
|
|
1223
|
-
|
|
1343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1224
1344
|
get message(): string;
|
|
1225
|
-
|
|
1345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1226
1346
|
get lineno(): number;
|
|
1227
|
-
|
|
1347
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1228
1348
|
get colno(): number;
|
|
1229
|
-
|
|
1349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1230
1350
|
get error(): any;
|
|
1231
1351
|
}
|
|
1232
1352
|
interface ErrorEventErrorEventInit {
|
|
@@ -1236,21 +1356,34 @@ interface ErrorEventErrorEventInit {
|
|
|
1236
1356
|
colno?: number;
|
|
1237
1357
|
error?: any;
|
|
1238
1358
|
}
|
|
1359
|
+
/**
|
|
1360
|
+
* 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".
|
|
1361
|
+
*
|
|
1362
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1363
|
+
*/
|
|
1239
1364
|
declare class FormData {
|
|
1240
1365
|
constructor();
|
|
1366
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1241
1367
|
append(name: string, value: string): void;
|
|
1368
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1242
1369
|
append(name: string, value: Blob, filename?: string): void;
|
|
1370
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1243
1371
|
delete(name: string): void;
|
|
1372
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1244
1373
|
get(name: string): (File | string) | null;
|
|
1374
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1245
1375
|
getAll(name: string): (File | string)[];
|
|
1376
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1246
1377
|
has(name: string): boolean;
|
|
1378
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1247
1379
|
set(name: string, value: string): void;
|
|
1380
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1248
1381
|
set(name: string, value: Blob, filename?: string): void;
|
|
1249
|
-
|
|
1382
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1250
1383
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1251
|
-
|
|
1384
|
+
/* Returns a list of keys in the list. */
|
|
1252
1385
|
keys(): IterableIterator<string>;
|
|
1253
|
-
|
|
1386
|
+
/* Returns a list of values in the list. */
|
|
1254
1387
|
values(): IterableIterator<File | string>;
|
|
1255
1388
|
forEach<This = unknown>(
|
|
1256
1389
|
callback: (
|
|
@@ -1336,10 +1469,15 @@ interface Text {
|
|
|
1336
1469
|
interface DocumentEnd {
|
|
1337
1470
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1338
1471
|
}
|
|
1472
|
+
/**
|
|
1473
|
+
* 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.
|
|
1474
|
+
*
|
|
1475
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1476
|
+
*/
|
|
1339
1477
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
1340
|
-
|
|
1478
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1341
1479
|
readonly request: Request;
|
|
1342
|
-
|
|
1480
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1343
1481
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1344
1482
|
passThroughOnException(): void;
|
|
1345
1483
|
}
|
|
@@ -1347,24 +1485,35 @@ type HeadersInit =
|
|
|
1347
1485
|
| Headers
|
|
1348
1486
|
| Iterable<Iterable<string>>
|
|
1349
1487
|
| Record<string, string>;
|
|
1488
|
+
/**
|
|
1489
|
+
* 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.
|
|
1490
|
+
*
|
|
1491
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1492
|
+
*/
|
|
1350
1493
|
declare class Headers {
|
|
1351
1494
|
constructor(init?: HeadersInit);
|
|
1495
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1352
1496
|
get(name: string): string | null;
|
|
1353
1497
|
getAll(name: string): string[];
|
|
1498
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */
|
|
1354
1499
|
getSetCookie(): string[];
|
|
1500
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1355
1501
|
has(name: string): boolean;
|
|
1502
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1356
1503
|
set(name: string, value: string): void;
|
|
1504
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1357
1505
|
append(name: string, value: string): void;
|
|
1506
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1358
1507
|
delete(name: string): void;
|
|
1359
1508
|
forEach<This = unknown>(
|
|
1360
1509
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1361
1510
|
thisArg?: This,
|
|
1362
1511
|
): void;
|
|
1363
|
-
|
|
1512
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1364
1513
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1365
|
-
|
|
1514
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1366
1515
|
keys(): IterableIterator<string>;
|
|
1367
|
-
|
|
1516
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1368
1517
|
values(): IterableIterator<string>;
|
|
1369
1518
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1370
1519
|
}
|
|
@@ -1377,34 +1526,46 @@ type BodyInit =
|
|
|
1377
1526
|
| URLSearchParams
|
|
1378
1527
|
| FormData;
|
|
1379
1528
|
declare abstract class Body {
|
|
1529
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1380
1530
|
get body(): ReadableStream | null;
|
|
1531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1381
1532
|
get bodyUsed(): boolean;
|
|
1533
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1382
1534
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1383
1535
|
bytes(): Promise<Uint8Array>;
|
|
1536
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1384
1537
|
text(): Promise<string>;
|
|
1538
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1385
1539
|
json<T>(): Promise<T>;
|
|
1540
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1386
1541
|
formData(): Promise<FormData>;
|
|
1542
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1387
1543
|
blob(): Promise<Blob>;
|
|
1388
1544
|
}
|
|
1545
|
+
/**
|
|
1546
|
+
* This Fetch API interface represents the response to a request.
|
|
1547
|
+
*
|
|
1548
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1549
|
+
*/
|
|
1389
1550
|
declare class Response extends Body {
|
|
1390
1551
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1391
|
-
|
|
1552
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1392
1553
|
static redirect(url: string, status?: number): Response;
|
|
1393
|
-
|
|
1554
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1394
1555
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1395
|
-
|
|
1556
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1396
1557
|
clone(): Response;
|
|
1397
|
-
|
|
1558
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1398
1559
|
get status(): number;
|
|
1399
|
-
|
|
1560
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1400
1561
|
get statusText(): string;
|
|
1401
|
-
|
|
1562
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1402
1563
|
get headers(): Headers;
|
|
1403
|
-
|
|
1564
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1404
1565
|
get ok(): boolean;
|
|
1405
|
-
|
|
1566
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1406
1567
|
get redirected(): boolean;
|
|
1407
|
-
|
|
1568
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1408
1569
|
get url(): string;
|
|
1409
1570
|
get webSocket(): WebSocket | null;
|
|
1410
1571
|
get cf(): any | undefined;
|
|
@@ -1421,12 +1582,17 @@ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
|
1421
1582
|
| Request<CfHostMetadata, Cf>
|
|
1422
1583
|
| string
|
|
1423
1584
|
| URL;
|
|
1585
|
+
/**
|
|
1586
|
+
* This Fetch API interface represents a resource request.
|
|
1587
|
+
*
|
|
1588
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1589
|
+
*/
|
|
1424
1590
|
declare class Request<
|
|
1425
1591
|
CfHostMetadata = unknown,
|
|
1426
1592
|
Cf = CfProperties<CfHostMetadata>,
|
|
1427
1593
|
> extends Body {
|
|
1428
1594
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1429
|
-
|
|
1595
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1430
1596
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1431
1597
|
/**
|
|
1432
1598
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1472,21 +1638,29 @@ declare class Request<
|
|
|
1472
1638
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1473
1639
|
*/
|
|
1474
1640
|
get keepalive(): boolean;
|
|
1641
|
+
/**
|
|
1642
|
+
* Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
1643
|
+
*
|
|
1644
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1645
|
+
*/
|
|
1646
|
+
get cache(): string | undefined;
|
|
1475
1647
|
}
|
|
1476
1648
|
interface RequestInit<Cf = CfProperties> {
|
|
1477
|
-
|
|
1649
|
+
/* A string to set request's method. */
|
|
1478
1650
|
method?: string;
|
|
1479
|
-
|
|
1651
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1480
1652
|
headers?: HeadersInit;
|
|
1481
|
-
|
|
1653
|
+
/* A BodyInit object or null to set request's body. */
|
|
1482
1654
|
body?: BodyInit | null;
|
|
1483
|
-
|
|
1655
|
+
/* 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. */
|
|
1484
1656
|
redirect?: string;
|
|
1485
1657
|
fetcher?: Fetcher | null;
|
|
1486
1658
|
cf?: Cf;
|
|
1487
|
-
|
|
1659
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1660
|
+
cache?: string;
|
|
1661
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1488
1662
|
integrity?: string;
|
|
1489
|
-
|
|
1663
|
+
/* An AbortSignal to set request's signal. */
|
|
1490
1664
|
signal?: AbortSignal | null;
|
|
1491
1665
|
}
|
|
1492
1666
|
type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
|
|
@@ -1960,31 +2134,36 @@ type ReadableStreamReadResult<R = any> =
|
|
|
1960
2134
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1961
2135
|
*/
|
|
1962
2136
|
interface ReadableStream<R = any> {
|
|
1963
|
-
|
|
2137
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1964
2138
|
get locked(): boolean;
|
|
1965
|
-
|
|
2139
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1966
2140
|
cancel(reason?: any): Promise<void>;
|
|
1967
|
-
|
|
2141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1968
2142
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1969
|
-
|
|
2143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1970
2144
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1971
|
-
|
|
2145
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1972
2146
|
pipeThrough<T>(
|
|
1973
2147
|
transform: ReadableWritablePair<T, R>,
|
|
1974
2148
|
options?: StreamPipeOptions,
|
|
1975
2149
|
): ReadableStream<T>;
|
|
1976
|
-
|
|
2150
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1977
2151
|
pipeTo(
|
|
1978
2152
|
destination: WritableStream<R>,
|
|
1979
2153
|
options?: StreamPipeOptions,
|
|
1980
2154
|
): Promise<void>;
|
|
1981
|
-
|
|
2155
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1982
2156
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1983
2157
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1984
2158
|
[Symbol.asyncIterator](
|
|
1985
2159
|
options?: ReadableStreamValuesOptions,
|
|
1986
2160
|
): AsyncIterableIterator<R>;
|
|
1987
2161
|
}
|
|
2162
|
+
/**
|
|
2163
|
+
* 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.
|
|
2164
|
+
*
|
|
2165
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2166
|
+
*/
|
|
1988
2167
|
declare const ReadableStream: {
|
|
1989
2168
|
prototype: ReadableStream;
|
|
1990
2169
|
new (
|
|
@@ -1996,24 +2175,26 @@ declare const ReadableStream: {
|
|
|
1996
2175
|
strategy?: QueuingStrategy<R>,
|
|
1997
2176
|
): ReadableStream<R>;
|
|
1998
2177
|
};
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1999
2179
|
declare class ReadableStreamDefaultReader<R = any> {
|
|
2000
2180
|
constructor(stream: ReadableStream);
|
|
2001
2181
|
get closed(): Promise<void>;
|
|
2002
2182
|
cancel(reason?: any): Promise<void>;
|
|
2003
|
-
|
|
2183
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
2004
2184
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
2005
|
-
|
|
2185
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
2006
2186
|
releaseLock(): void;
|
|
2007
2187
|
}
|
|
2188
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
2008
2189
|
declare class ReadableStreamBYOBReader {
|
|
2009
2190
|
constructor(stream: ReadableStream);
|
|
2010
2191
|
get closed(): Promise<void>;
|
|
2011
2192
|
cancel(reason?: any): Promise<void>;
|
|
2012
|
-
|
|
2193
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
2013
2194
|
read<T extends ArrayBufferView>(
|
|
2014
2195
|
view: T,
|
|
2015
2196
|
): Promise<ReadableStreamReadResult<T>>;
|
|
2016
|
-
|
|
2197
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
2017
2198
|
releaseLock(): void;
|
|
2018
2199
|
readAtLeast<T extends ArrayBufferView>(
|
|
2019
2200
|
minElements: number,
|
|
@@ -2031,51 +2212,60 @@ interface ReadableStreamGetReaderOptions {
|
|
|
2031
2212
|
*/
|
|
2032
2213
|
mode: "byob";
|
|
2033
2214
|
}
|
|
2215
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
2034
2216
|
declare abstract class ReadableStreamBYOBRequest {
|
|
2035
|
-
|
|
2217
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
2036
2218
|
get view(): Uint8Array | null;
|
|
2037
|
-
|
|
2219
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
2038
2220
|
respond(bytesWritten: number): void;
|
|
2039
|
-
|
|
2221
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
2040
2222
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
2041
2223
|
get atLeast(): number | null;
|
|
2042
2224
|
}
|
|
2225
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
2043
2226
|
declare abstract class ReadableStreamDefaultController<R = any> {
|
|
2044
|
-
|
|
2227
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
2045
2228
|
get desiredSize(): number | null;
|
|
2046
|
-
|
|
2229
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
2047
2230
|
close(): void;
|
|
2048
|
-
|
|
2231
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
2049
2232
|
enqueue(chunk?: R): void;
|
|
2050
|
-
|
|
2233
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
2051
2234
|
error(reason: any): void;
|
|
2052
2235
|
}
|
|
2236
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
2053
2237
|
declare abstract class ReadableByteStreamController {
|
|
2054
|
-
|
|
2238
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
2055
2239
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2056
|
-
|
|
2240
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
2057
2241
|
get desiredSize(): number | null;
|
|
2058
|
-
|
|
2242
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
2059
2243
|
close(): void;
|
|
2060
|
-
|
|
2244
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
2061
2245
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2062
|
-
|
|
2246
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
2063
2247
|
error(reason: any): void;
|
|
2064
2248
|
}
|
|
2249
|
+
/**
|
|
2250
|
+
* 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.
|
|
2251
|
+
*
|
|
2252
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2253
|
+
*/
|
|
2065
2254
|
declare abstract class WritableStreamDefaultController {
|
|
2066
|
-
|
|
2255
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2067
2256
|
get signal(): AbortSignal;
|
|
2068
|
-
|
|
2257
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2069
2258
|
error(reason?: any): void;
|
|
2070
2259
|
}
|
|
2260
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2071
2261
|
declare abstract class TransformStreamDefaultController<O = any> {
|
|
2072
|
-
|
|
2262
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2073
2263
|
get desiredSize(): number | null;
|
|
2074
|
-
|
|
2264
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2075
2265
|
enqueue(chunk?: O): void;
|
|
2076
|
-
|
|
2266
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2077
2267
|
error(reason: any): void;
|
|
2078
|
-
|
|
2268
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2079
2269
|
terminate(): void;
|
|
2080
2270
|
}
|
|
2081
2271
|
interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2087,46 +2277,57 @@ interface ReadableWritablePair<R = any, W = any> {
|
|
|
2087
2277
|
writable: WritableStream<W>;
|
|
2088
2278
|
readable: ReadableStream<R>;
|
|
2089
2279
|
}
|
|
2280
|
+
/**
|
|
2281
|
+
* 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.
|
|
2282
|
+
*
|
|
2283
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2284
|
+
*/
|
|
2090
2285
|
declare class WritableStream<W = any> {
|
|
2091
2286
|
constructor(
|
|
2092
2287
|
underlyingSink?: UnderlyingSink,
|
|
2093
2288
|
queuingStrategy?: QueuingStrategy,
|
|
2094
2289
|
);
|
|
2095
|
-
|
|
2290
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2096
2291
|
get locked(): boolean;
|
|
2097
|
-
|
|
2292
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2098
2293
|
abort(reason?: any): Promise<void>;
|
|
2099
|
-
|
|
2294
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2100
2295
|
close(): Promise<void>;
|
|
2101
|
-
|
|
2296
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2102
2297
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2103
2298
|
}
|
|
2299
|
+
/**
|
|
2300
|
+
* 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.
|
|
2301
|
+
*
|
|
2302
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2303
|
+
*/
|
|
2104
2304
|
declare class WritableStreamDefaultWriter<W = any> {
|
|
2105
2305
|
constructor(stream: WritableStream);
|
|
2106
|
-
|
|
2306
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2107
2307
|
get closed(): Promise<void>;
|
|
2108
|
-
|
|
2308
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2109
2309
|
get ready(): Promise<void>;
|
|
2110
|
-
|
|
2310
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2111
2311
|
get desiredSize(): number | null;
|
|
2112
|
-
|
|
2312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2113
2313
|
abort(reason?: any): Promise<void>;
|
|
2114
|
-
|
|
2314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2115
2315
|
close(): Promise<void>;
|
|
2116
|
-
|
|
2316
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2117
2317
|
write(chunk?: W): Promise<void>;
|
|
2118
|
-
|
|
2318
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2119
2319
|
releaseLock(): void;
|
|
2120
2320
|
}
|
|
2321
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2121
2322
|
declare class TransformStream<I = any, O = any> {
|
|
2122
2323
|
constructor(
|
|
2123
2324
|
transformer?: Transformer<I, O>,
|
|
2124
2325
|
writableStrategy?: QueuingStrategy<I>,
|
|
2125
2326
|
readableStrategy?: QueuingStrategy<O>,
|
|
2126
2327
|
);
|
|
2127
|
-
|
|
2328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2128
2329
|
get readable(): ReadableStream<O>;
|
|
2129
|
-
|
|
2330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2130
2331
|
get writable(): WritableStream<I>;
|
|
2131
2332
|
}
|
|
2132
2333
|
declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2147,22 +2348,26 @@ interface IdentityTransformStreamQueuingStrategy {
|
|
|
2147
2348
|
interface ReadableStreamValuesOptions {
|
|
2148
2349
|
preventCancel?: boolean;
|
|
2149
2350
|
}
|
|
2351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2150
2352
|
declare class CompressionStream extends TransformStream<
|
|
2151
2353
|
ArrayBuffer | ArrayBufferView,
|
|
2152
2354
|
Uint8Array
|
|
2153
2355
|
> {
|
|
2154
2356
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2155
2357
|
}
|
|
2358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2156
2359
|
declare class DecompressionStream extends TransformStream<
|
|
2157
2360
|
ArrayBuffer | ArrayBufferView,
|
|
2158
2361
|
Uint8Array
|
|
2159
2362
|
> {
|
|
2160
2363
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2161
2364
|
}
|
|
2365
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2162
2366
|
declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
|
|
2163
2367
|
constructor();
|
|
2164
2368
|
get encoding(): string;
|
|
2165
2369
|
}
|
|
2370
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2166
2371
|
declare class TextDecoderStream extends TransformStream<
|
|
2167
2372
|
ArrayBuffer | ArrayBufferView,
|
|
2168
2373
|
string
|
|
@@ -2176,20 +2381,30 @@ interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2176
2381
|
fatal?: boolean;
|
|
2177
2382
|
ignoreBOM?: boolean;
|
|
2178
2383
|
}
|
|
2384
|
+
/**
|
|
2385
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2386
|
+
*
|
|
2387
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2388
|
+
*/
|
|
2179
2389
|
declare class ByteLengthQueuingStrategy
|
|
2180
2390
|
implements QueuingStrategy<ArrayBufferView>
|
|
2181
2391
|
{
|
|
2182
2392
|
constructor(init: QueuingStrategyInit);
|
|
2183
|
-
|
|
2393
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2184
2394
|
get highWaterMark(): number;
|
|
2185
|
-
|
|
2395
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2186
2396
|
get size(): (chunk?: any) => number;
|
|
2187
2397
|
}
|
|
2398
|
+
/**
|
|
2399
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2400
|
+
*
|
|
2401
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2402
|
+
*/
|
|
2188
2403
|
declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2189
2404
|
constructor(init: QueuingStrategyInit);
|
|
2190
|
-
|
|
2405
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2191
2406
|
get highWaterMark(): number;
|
|
2192
|
-
|
|
2407
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2193
2408
|
get size(): (chunk?: any) => number;
|
|
2194
2409
|
}
|
|
2195
2410
|
interface QueuingStrategyInit {
|
|
@@ -2233,6 +2448,7 @@ interface TraceItem {
|
|
|
2233
2448
|
readonly dispatchNamespace?: string;
|
|
2234
2449
|
readonly scriptTags?: string[];
|
|
2235
2450
|
readonly outcome: string;
|
|
2451
|
+
readonly truncated: boolean;
|
|
2236
2452
|
}
|
|
2237
2453
|
interface TraceItemAlarmEventInfo {
|
|
2238
2454
|
readonly scheduledTime: Date;
|
|
@@ -2314,76 +2530,115 @@ interface TraceMetrics {
|
|
|
2314
2530
|
interface UnsafeTraceMetrics {
|
|
2315
2531
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2316
2532
|
}
|
|
2533
|
+
/**
|
|
2534
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2535
|
+
*
|
|
2536
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2537
|
+
*/
|
|
2317
2538
|
declare class URL {
|
|
2318
2539
|
constructor(url: string | URL, base?: string | URL);
|
|
2319
|
-
|
|
2540
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2320
2541
|
get origin(): string;
|
|
2321
|
-
|
|
2542
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2322
2543
|
get href(): string;
|
|
2323
|
-
|
|
2544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2324
2545
|
set href(value: string);
|
|
2325
|
-
|
|
2546
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2326
2547
|
get protocol(): string;
|
|
2327
|
-
|
|
2548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2328
2549
|
set protocol(value: string);
|
|
2329
|
-
|
|
2550
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2330
2551
|
get username(): string;
|
|
2331
|
-
|
|
2552
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2332
2553
|
set username(value: string);
|
|
2333
|
-
|
|
2554
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2334
2555
|
get password(): string;
|
|
2335
|
-
|
|
2556
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2336
2557
|
set password(value: string);
|
|
2337
|
-
|
|
2558
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2338
2559
|
get host(): string;
|
|
2339
|
-
|
|
2560
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2340
2561
|
set host(value: string);
|
|
2341
|
-
|
|
2562
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2342
2563
|
get hostname(): string;
|
|
2343
|
-
|
|
2564
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2344
2565
|
set hostname(value: string);
|
|
2345
|
-
|
|
2566
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2346
2567
|
get port(): string;
|
|
2347
|
-
|
|
2568
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2348
2569
|
set port(value: string);
|
|
2349
|
-
|
|
2570
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2350
2571
|
get pathname(): string;
|
|
2351
|
-
|
|
2572
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2352
2573
|
set pathname(value: string);
|
|
2353
|
-
|
|
2574
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2354
2575
|
get search(): string;
|
|
2355
|
-
|
|
2576
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2356
2577
|
set search(value: string);
|
|
2357
|
-
|
|
2578
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2358
2579
|
get hash(): string;
|
|
2359
|
-
|
|
2580
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2360
2581
|
set hash(value: string);
|
|
2361
|
-
|
|
2582
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2362
2583
|
get searchParams(): URLSearchParams;
|
|
2363
|
-
|
|
2584
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2364
2585
|
toJSON(): string;
|
|
2586
|
+
/*function toString() { [native code] }*/
|
|
2365
2587
|
toString(): string;
|
|
2366
|
-
|
|
2588
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
|
|
2367
2589
|
static canParse(url: string, base?: string): boolean;
|
|
2368
2590
|
static parse(url: string, base?: string): URL | null;
|
|
2369
2591
|
}
|
|
2592
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2370
2593
|
declare class URLSearchParams {
|
|
2371
2594
|
constructor(
|
|
2372
2595
|
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
2373
2596
|
);
|
|
2597
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2374
2598
|
get size(): number;
|
|
2599
|
+
/**
|
|
2600
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2601
|
+
*
|
|
2602
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2603
|
+
*/
|
|
2375
2604
|
append(name: string, value: string): void;
|
|
2605
|
+
/**
|
|
2606
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2607
|
+
*
|
|
2608
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2609
|
+
*/
|
|
2376
2610
|
delete(name: string, value?: string): void;
|
|
2611
|
+
/**
|
|
2612
|
+
* Returns the first value associated to the given search parameter.
|
|
2613
|
+
*
|
|
2614
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2615
|
+
*/
|
|
2377
2616
|
get(name: string): string | null;
|
|
2617
|
+
/**
|
|
2618
|
+
* Returns all the values association with a given search parameter.
|
|
2619
|
+
*
|
|
2620
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2621
|
+
*/
|
|
2378
2622
|
getAll(name: string): string[];
|
|
2623
|
+
/**
|
|
2624
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2625
|
+
*
|
|
2626
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2627
|
+
*/
|
|
2379
2628
|
has(name: string, value?: string): boolean;
|
|
2629
|
+
/**
|
|
2630
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2631
|
+
*
|
|
2632
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2633
|
+
*/
|
|
2380
2634
|
set(name: string, value: string): void;
|
|
2635
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2381
2636
|
sort(): void;
|
|
2382
|
-
|
|
2637
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2383
2638
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2384
|
-
|
|
2639
|
+
/* Returns a list of keys in the search params. */
|
|
2385
2640
|
keys(): IterableIterator<string>;
|
|
2386
|
-
|
|
2641
|
+
/* Returns a list of values in the search params. */
|
|
2387
2642
|
values(): IterableIterator<string>;
|
|
2388
2643
|
forEach<This = unknown>(
|
|
2389
2644
|
callback: (
|
|
@@ -2394,6 +2649,7 @@ declare class URLSearchParams {
|
|
|
2394
2649
|
) => void,
|
|
2395
2650
|
thisArg?: This,
|
|
2396
2651
|
): void;
|
|
2652
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2397
2653
|
toString(): string;
|
|
2398
2654
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2399
2655
|
}
|
|
@@ -2446,6 +2702,11 @@ interface URLPatternURLPatternResult {
|
|
|
2446
2702
|
interface URLPatternURLPatternOptions {
|
|
2447
2703
|
ignoreCase?: boolean;
|
|
2448
2704
|
}
|
|
2705
|
+
/**
|
|
2706
|
+
* 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.
|
|
2707
|
+
*
|
|
2708
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2709
|
+
*/
|
|
2449
2710
|
declare class CloseEvent extends Event {
|
|
2450
2711
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2451
2712
|
/**
|
|
@@ -2472,8 +2733,18 @@ interface CloseEventInit {
|
|
|
2472
2733
|
reason?: string;
|
|
2473
2734
|
wasClean?: boolean;
|
|
2474
2735
|
}
|
|
2736
|
+
/**
|
|
2737
|
+
* A message received by a target object.
|
|
2738
|
+
*
|
|
2739
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2740
|
+
*/
|
|
2475
2741
|
declare class MessageEvent extends Event {
|
|
2476
2742
|
constructor(type: string, initializer: MessageEventInit);
|
|
2743
|
+
/**
|
|
2744
|
+
* Returns the data of the message.
|
|
2745
|
+
*
|
|
2746
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2747
|
+
*/
|
|
2477
2748
|
readonly data: ArrayBuffer | string;
|
|
2478
2749
|
}
|
|
2479
2750
|
interface MessageEventInit {
|
|
@@ -2485,6 +2756,11 @@ type WebSocketEventMap = {
|
|
|
2485
2756
|
open: Event;
|
|
2486
2757
|
error: ErrorEvent;
|
|
2487
2758
|
};
|
|
2759
|
+
/**
|
|
2760
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2761
|
+
*
|
|
2762
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2763
|
+
*/
|
|
2488
2764
|
declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2489
2765
|
constructor(url: string, protocols?: string[] | string);
|
|
2490
2766
|
accept(): void;
|
|
@@ -3101,6 +3377,7 @@ interface GPUOrigin3DDict {
|
|
|
3101
3377
|
y?: number;
|
|
3102
3378
|
z?: number;
|
|
3103
3379
|
}
|
|
3380
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3104
3381
|
declare class EventSource {
|
|
3105
3382
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3106
3383
|
/**
|
|
@@ -3127,17 +3404,17 @@ declare class EventSource {
|
|
|
3127
3404
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3128
3405
|
*/
|
|
3129
3406
|
get readyState(): number;
|
|
3130
|
-
|
|
3407
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3131
3408
|
get onopen(): any | null;
|
|
3132
|
-
|
|
3409
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3133
3410
|
set onopen(value: any | null);
|
|
3134
|
-
|
|
3411
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3135
3412
|
get onmessage(): any | null;
|
|
3136
|
-
|
|
3413
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3137
3414
|
set onmessage(value: any | null);
|
|
3138
|
-
|
|
3415
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3139
3416
|
get onerror(): any | null;
|
|
3140
|
-
|
|
3417
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3141
3418
|
set onerror(value: any | null);
|
|
3142
3419
|
static readonly CONNECTING: number;
|
|
3143
3420
|
static readonly OPEN: number;
|