@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/2022-03-21/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
|
*/
|
|
@@ -314,54 +320,73 @@ export declare function removeEventListener<
|
|
|
314
320
|
export declare function dispatchEvent(
|
|
315
321
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
316
322
|
): boolean;
|
|
317
|
-
|
|
323
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
318
324
|
export declare function btoa(data: string): string;
|
|
319
|
-
|
|
325
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
320
326
|
export declare function atob(data: string): string;
|
|
321
|
-
|
|
327
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
322
328
|
export declare function setTimeout(
|
|
323
329
|
callback: (...args: any[]) => void,
|
|
324
330
|
msDelay?: number,
|
|
325
331
|
): number;
|
|
326
|
-
|
|
332
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
327
333
|
export declare function setTimeout<Args extends any[]>(
|
|
328
334
|
callback: (...args: Args) => void,
|
|
329
335
|
msDelay?: number,
|
|
330
336
|
...args: Args
|
|
331
337
|
): number;
|
|
332
|
-
|
|
338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
333
339
|
export declare function clearTimeout(timeoutId: number | null): void;
|
|
334
|
-
|
|
340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
335
341
|
export declare function setInterval(
|
|
336
342
|
callback: (...args: any[]) => void,
|
|
337
343
|
msDelay?: number,
|
|
338
344
|
): number;
|
|
339
|
-
|
|
345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
340
346
|
export declare function setInterval<Args extends any[]>(
|
|
341
347
|
callback: (...args: Args) => void,
|
|
342
348
|
msDelay?: number,
|
|
343
349
|
...args: Args
|
|
344
350
|
): number;
|
|
345
|
-
|
|
351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
346
352
|
export declare function clearInterval(timeoutId: number | null): void;
|
|
347
|
-
|
|
353
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
348
354
|
export declare function queueMicrotask(task: Function): void;
|
|
349
|
-
|
|
355
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
350
356
|
export declare function structuredClone<T>(
|
|
351
357
|
value: T,
|
|
352
358
|
options?: StructuredSerializeOptions,
|
|
353
359
|
): T;
|
|
354
|
-
|
|
360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
355
361
|
export declare function reportError(error: any): void;
|
|
356
|
-
|
|
362
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
357
363
|
export declare function fetch(
|
|
358
364
|
input: RequestInfo,
|
|
359
365
|
init?: RequestInit<RequestInitCfProperties>,
|
|
360
366
|
): Promise<Response>;
|
|
361
367
|
export declare const self: ServiceWorkerGlobalScope;
|
|
368
|
+
/**
|
|
369
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
370
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
371
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
372
|
+
* compared to those implemented in most browsers.
|
|
373
|
+
*
|
|
374
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
375
|
+
*/
|
|
362
376
|
export declare const crypto: Crypto;
|
|
377
|
+
/**
|
|
378
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
379
|
+
*
|
|
380
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
381
|
+
*/
|
|
363
382
|
export declare const caches: CacheStorage;
|
|
364
383
|
export declare const scheduler: Scheduler;
|
|
384
|
+
/**
|
|
385
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
386
|
+
* as well as timing of subrequests and other operations.
|
|
387
|
+
*
|
|
388
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
389
|
+
*/
|
|
365
390
|
export declare const performance: Performance;
|
|
366
391
|
export declare const origin: string;
|
|
367
392
|
export declare const navigator: Navigator;
|
|
@@ -419,10 +444,11 @@ export interface ExportedHandler<
|
|
|
419
444
|
export interface StructuredSerializeOptions {
|
|
420
445
|
transfer?: any[];
|
|
421
446
|
}
|
|
447
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
422
448
|
export declare abstract class PromiseRejectionEvent extends Event {
|
|
423
|
-
|
|
449
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
424
450
|
readonly promise: Promise<any>;
|
|
425
|
-
|
|
451
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
426
452
|
readonly reason: any;
|
|
427
453
|
}
|
|
428
454
|
export declare abstract class Navigator {
|
|
@@ -440,14 +466,15 @@ export declare abstract class Navigator {
|
|
|
440
466
|
readonly gpu: GPU;
|
|
441
467
|
}
|
|
442
468
|
/**
|
|
443
|
-
*
|
|
469
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
470
|
+
* as well as timing of subrequests and other operations.
|
|
444
471
|
*
|
|
445
|
-
* [
|
|
472
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
446
473
|
*/
|
|
447
474
|
export interface Performance {
|
|
448
|
-
|
|
475
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
449
476
|
readonly timeOrigin: number;
|
|
450
|
-
|
|
477
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
451
478
|
now(): number;
|
|
452
479
|
}
|
|
453
480
|
export interface AlarmInvocationInfo {
|
|
@@ -636,6 +663,11 @@ export interface AnalyticsEngineDataPoint {
|
|
|
636
663
|
doubles?: number[];
|
|
637
664
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
638
665
|
}
|
|
666
|
+
/**
|
|
667
|
+
* An event which takes place in the DOM.
|
|
668
|
+
*
|
|
669
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
670
|
+
*/
|
|
639
671
|
export declare class Event {
|
|
640
672
|
constructor(type: string, init?: EventInit);
|
|
641
673
|
/**
|
|
@@ -759,6 +791,11 @@ export interface EventListenerObject<EventType extends Event = Event> {
|
|
|
759
791
|
export type EventListenerOrEventListenerObject<
|
|
760
792
|
EventType extends Event = Event,
|
|
761
793
|
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
794
|
+
/**
|
|
795
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
796
|
+
*
|
|
797
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
798
|
+
*/
|
|
762
799
|
export declare class EventTarget<
|
|
763
800
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
764
801
|
> {
|
|
@@ -814,6 +851,11 @@ export interface EventTargetAddEventListenerOptions {
|
|
|
814
851
|
export interface EventTargetHandlerObject {
|
|
815
852
|
handleEvent: (event: Event) => any | undefined;
|
|
816
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
856
|
+
*
|
|
857
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
858
|
+
*/
|
|
817
859
|
export declare class AbortController {
|
|
818
860
|
constructor();
|
|
819
861
|
/**
|
|
@@ -829,11 +871,17 @@ export declare class AbortController {
|
|
|
829
871
|
*/
|
|
830
872
|
abort(reason?: any): void;
|
|
831
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
|
|
876
|
+
*
|
|
877
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
878
|
+
*/
|
|
832
879
|
export declare abstract class AbortSignal extends EventTarget {
|
|
833
|
-
|
|
880
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
834
881
|
static abort(reason?: any): AbortSignal;
|
|
835
|
-
|
|
882
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
836
883
|
static timeout(delay: number): AbortSignal;
|
|
884
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
837
885
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
838
886
|
/**
|
|
839
887
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -841,13 +889,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
841
889
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
842
890
|
*/
|
|
843
891
|
get aborted(): boolean;
|
|
844
|
-
|
|
892
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
845
893
|
get reason(): any;
|
|
846
|
-
|
|
894
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
847
895
|
get onabort(): any | null;
|
|
848
|
-
|
|
896
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
849
897
|
set onabort(value: any | null);
|
|
850
|
-
|
|
898
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
851
899
|
throwIfAborted(): void;
|
|
852
900
|
}
|
|
853
901
|
export interface Scheduler {
|
|
@@ -856,10 +904,16 @@ export interface Scheduler {
|
|
|
856
904
|
export interface SchedulerWaitOptions {
|
|
857
905
|
signal?: AbortSignal;
|
|
858
906
|
}
|
|
907
|
+
/**
|
|
908
|
+
* Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
|
|
909
|
+
*
|
|
910
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
911
|
+
*/
|
|
859
912
|
export declare abstract class ExtendableEvent extends Event {
|
|
860
|
-
|
|
913
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
861
914
|
waitUntil(promise: Promise<any>): void;
|
|
862
915
|
}
|
|
916
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
863
917
|
export declare class CustomEvent<T = any> extends Event {
|
|
864
918
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
865
919
|
/**
|
|
@@ -875,59 +929,90 @@ export interface CustomEventCustomEventInit {
|
|
|
875
929
|
composed?: boolean;
|
|
876
930
|
detail?: any;
|
|
877
931
|
}
|
|
932
|
+
/**
|
|
933
|
+
* A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
|
|
934
|
+
*
|
|
935
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
936
|
+
*/
|
|
878
937
|
export declare class Blob {
|
|
879
938
|
constructor(
|
|
880
939
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
881
940
|
options?: BlobOptions,
|
|
882
941
|
);
|
|
883
|
-
|
|
942
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
884
943
|
get size(): number;
|
|
885
|
-
|
|
944
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
886
945
|
get type(): string;
|
|
887
|
-
|
|
946
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
888
947
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
889
|
-
|
|
948
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
890
949
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
891
950
|
bytes(): Promise<Uint8Array>;
|
|
892
|
-
|
|
951
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
893
952
|
text(): Promise<string>;
|
|
894
|
-
|
|
953
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
895
954
|
stream(): ReadableStream;
|
|
896
955
|
}
|
|
897
956
|
export interface BlobOptions {
|
|
898
957
|
type?: string;
|
|
899
958
|
}
|
|
959
|
+
/**
|
|
960
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
961
|
+
*
|
|
962
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
963
|
+
*/
|
|
900
964
|
export declare class File extends Blob {
|
|
901
965
|
constructor(
|
|
902
966
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
903
967
|
name: string,
|
|
904
968
|
options?: FileOptions,
|
|
905
969
|
);
|
|
906
|
-
|
|
970
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
907
971
|
get name(): string;
|
|
908
|
-
|
|
972
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
909
973
|
get lastModified(): number;
|
|
910
974
|
}
|
|
911
975
|
export interface FileOptions {
|
|
912
976
|
type?: string;
|
|
913
977
|
lastModified?: number;
|
|
914
978
|
}
|
|
979
|
+
/**
|
|
980
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
981
|
+
*
|
|
982
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
983
|
+
*/
|
|
915
984
|
export declare abstract class CacheStorage {
|
|
916
|
-
|
|
985
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
917
986
|
open(cacheName: string): Promise<Cache>;
|
|
918
987
|
readonly default: Cache;
|
|
919
988
|
}
|
|
989
|
+
/**
|
|
990
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
991
|
+
*
|
|
992
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
993
|
+
*/
|
|
920
994
|
export declare abstract class Cache {
|
|
995
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
921
996
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
997
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
922
998
|
match(
|
|
923
999
|
request: RequestInfo,
|
|
924
1000
|
options?: CacheQueryOptions,
|
|
925
1001
|
): Promise<Response | undefined>;
|
|
1002
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
926
1003
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
927
1004
|
}
|
|
928
1005
|
export interface CacheQueryOptions {
|
|
929
1006
|
ignoreMethod?: boolean;
|
|
930
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
1010
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
1011
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
1012
|
+
* compared to those implemented in most browsers.
|
|
1013
|
+
*
|
|
1014
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
1015
|
+
*/
|
|
931
1016
|
export declare abstract class Crypto {
|
|
932
1017
|
/**
|
|
933
1018
|
* Available only in secure contexts.
|
|
@@ -935,7 +1020,7 @@ export declare abstract class Crypto {
|
|
|
935
1020
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
936
1021
|
*/
|
|
937
1022
|
get subtle(): SubtleCrypto;
|
|
938
|
-
|
|
1023
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
939
1024
|
getRandomValues<
|
|
940
1025
|
T extends
|
|
941
1026
|
| Int8Array
|
|
@@ -955,39 +1040,50 @@ export declare abstract class Crypto {
|
|
|
955
1040
|
randomUUID(): string;
|
|
956
1041
|
DigestStream: typeof DigestStream;
|
|
957
1042
|
}
|
|
1043
|
+
/**
|
|
1044
|
+
* This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
|
|
1045
|
+
* Available only in secure contexts.
|
|
1046
|
+
*
|
|
1047
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1048
|
+
*/
|
|
958
1049
|
export declare abstract class SubtleCrypto {
|
|
1050
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
959
1051
|
encrypt(
|
|
960
1052
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
961
1053
|
key: CryptoKey,
|
|
962
1054
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
963
1055
|
): Promise<ArrayBuffer>;
|
|
1056
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
964
1057
|
decrypt(
|
|
965
1058
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
966
1059
|
key: CryptoKey,
|
|
967
1060
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
968
1061
|
): Promise<ArrayBuffer>;
|
|
1062
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
969
1063
|
sign(
|
|
970
1064
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
971
1065
|
key: CryptoKey,
|
|
972
1066
|
data: ArrayBuffer | ArrayBufferView,
|
|
973
1067
|
): Promise<ArrayBuffer>;
|
|
1068
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
974
1069
|
verify(
|
|
975
1070
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
976
1071
|
key: CryptoKey,
|
|
977
1072
|
signature: ArrayBuffer | ArrayBufferView,
|
|
978
1073
|
data: ArrayBuffer | ArrayBufferView,
|
|
979
1074
|
): Promise<boolean>;
|
|
1075
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
980
1076
|
digest(
|
|
981
1077
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
982
1078
|
data: ArrayBuffer | ArrayBufferView,
|
|
983
1079
|
): Promise<ArrayBuffer>;
|
|
984
|
-
|
|
1080
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
985
1081
|
generateKey(
|
|
986
1082
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
987
1083
|
extractable: boolean,
|
|
988
1084
|
keyUsages: string[],
|
|
989
1085
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
990
|
-
|
|
1086
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
991
1087
|
deriveKey(
|
|
992
1088
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
993
1089
|
baseKey: CryptoKey,
|
|
@@ -995,12 +1091,13 @@ export declare abstract class SubtleCrypto {
|
|
|
995
1091
|
extractable: boolean,
|
|
996
1092
|
keyUsages: string[],
|
|
997
1093
|
): Promise<CryptoKey>;
|
|
1094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
998
1095
|
deriveBits(
|
|
999
1096
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1000
1097
|
baseKey: CryptoKey,
|
|
1001
|
-
length
|
|
1098
|
+
length?: number | null,
|
|
1002
1099
|
): Promise<ArrayBuffer>;
|
|
1003
|
-
|
|
1100
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
1004
1101
|
importKey(
|
|
1005
1102
|
format: string,
|
|
1006
1103
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1008,14 +1105,16 @@ export declare abstract class SubtleCrypto {
|
|
|
1008
1105
|
extractable: boolean,
|
|
1009
1106
|
keyUsages: string[],
|
|
1010
1107
|
): Promise<CryptoKey>;
|
|
1108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
1011
1109
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
1012
1111
|
wrapKey(
|
|
1013
1112
|
format: string,
|
|
1014
1113
|
key: CryptoKey,
|
|
1015
1114
|
wrappingKey: CryptoKey,
|
|
1016
1115
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1017
1116
|
): Promise<ArrayBuffer>;
|
|
1018
|
-
|
|
1117
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
1019
1118
|
unwrapKey(
|
|
1020
1119
|
format: string,
|
|
1021
1120
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1030,12 +1129,18 @@ export declare abstract class SubtleCrypto {
|
|
|
1030
1129
|
b: ArrayBuffer | ArrayBufferView,
|
|
1031
1130
|
): boolean;
|
|
1032
1131
|
}
|
|
1132
|
+
/**
|
|
1133
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1134
|
+
* Available only in secure contexts.
|
|
1135
|
+
*
|
|
1136
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1137
|
+
*/
|
|
1033
1138
|
export declare abstract class CryptoKey {
|
|
1034
|
-
|
|
1139
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1035
1140
|
readonly type: string;
|
|
1036
|
-
|
|
1141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1037
1142
|
readonly extractable: boolean;
|
|
1038
|
-
|
|
1143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1039
1144
|
readonly algorithm:
|
|
1040
1145
|
| CryptoKeyKeyAlgorithm
|
|
1041
1146
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1043,7 +1148,7 @@ export declare abstract class CryptoKey {
|
|
|
1043
1148
|
| CryptoKeyRsaKeyAlgorithm
|
|
1044
1149
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1045
1150
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1046
|
-
|
|
1151
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1047
1152
|
readonly usages: string[];
|
|
1048
1153
|
}
|
|
1049
1154
|
export interface CryptoKeyPair {
|
|
@@ -1151,6 +1256,11 @@ export declare class DigestStream extends WritableStream<
|
|
|
1151
1256
|
get digest(): Promise<ArrayBuffer>;
|
|
1152
1257
|
get bytesWritten(): number | bigint;
|
|
1153
1258
|
}
|
|
1259
|
+
/**
|
|
1260
|
+
* A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
|
|
1261
|
+
*
|
|
1262
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1263
|
+
*/
|
|
1154
1264
|
export declare class TextDecoder {
|
|
1155
1265
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1156
1266
|
/**
|
|
@@ -1176,6 +1286,11 @@ export declare class TextDecoder {
|
|
|
1176
1286
|
get fatal(): boolean;
|
|
1177
1287
|
get ignoreBOM(): boolean;
|
|
1178
1288
|
}
|
|
1289
|
+
/**
|
|
1290
|
+
* TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
|
|
1291
|
+
*
|
|
1292
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1293
|
+
*/
|
|
1179
1294
|
export declare class TextEncoder {
|
|
1180
1295
|
constructor();
|
|
1181
1296
|
/**
|
|
@@ -1206,17 +1321,22 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1206
1321
|
read: number;
|
|
1207
1322
|
written: number;
|
|
1208
1323
|
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Events providing information related to errors in scripts or in files.
|
|
1326
|
+
*
|
|
1327
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1328
|
+
*/
|
|
1209
1329
|
export declare class ErrorEvent extends Event {
|
|
1210
1330
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1211
|
-
|
|
1331
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1212
1332
|
get filename(): string;
|
|
1213
|
-
|
|
1333
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1214
1334
|
get message(): string;
|
|
1215
|
-
|
|
1335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1216
1336
|
get lineno(): number;
|
|
1217
|
-
|
|
1337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1218
1338
|
get colno(): number;
|
|
1219
|
-
|
|
1339
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1220
1340
|
get error(): any;
|
|
1221
1341
|
}
|
|
1222
1342
|
export interface ErrorEventErrorEventInit {
|
|
@@ -1226,21 +1346,34 @@ export interface ErrorEventErrorEventInit {
|
|
|
1226
1346
|
colno?: number;
|
|
1227
1347
|
error?: any;
|
|
1228
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
|
|
1351
|
+
*
|
|
1352
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1353
|
+
*/
|
|
1229
1354
|
export declare class FormData {
|
|
1230
1355
|
constructor();
|
|
1356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1231
1357
|
append(name: string, value: string): void;
|
|
1358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1232
1359
|
append(name: string, value: Blob, filename?: string): void;
|
|
1360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1233
1361
|
delete(name: string): void;
|
|
1362
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1234
1363
|
get(name: string): (File | string) | null;
|
|
1364
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1235
1365
|
getAll(name: string): (File | string)[];
|
|
1366
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1236
1367
|
has(name: string): boolean;
|
|
1368
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1237
1369
|
set(name: string, value: string): void;
|
|
1370
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1238
1371
|
set(name: string, value: Blob, filename?: string): void;
|
|
1239
|
-
|
|
1372
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1240
1373
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1241
|
-
|
|
1374
|
+
/* Returns a list of keys in the list. */
|
|
1242
1375
|
keys(): IterableIterator<string>;
|
|
1243
|
-
|
|
1376
|
+
/* Returns a list of values in the list. */
|
|
1244
1377
|
values(): IterableIterator<File | string>;
|
|
1245
1378
|
forEach<This = unknown>(
|
|
1246
1379
|
callback: (
|
|
@@ -1326,10 +1459,15 @@ export interface Text {
|
|
|
1326
1459
|
export interface DocumentEnd {
|
|
1327
1460
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1328
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.
|
|
1464
|
+
*
|
|
1465
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1466
|
+
*/
|
|
1329
1467
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1330
|
-
|
|
1468
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1331
1469
|
readonly request: Request;
|
|
1332
|
-
|
|
1470
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1333
1471
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1334
1472
|
passThroughOnException(): void;
|
|
1335
1473
|
}
|
|
@@ -1337,23 +1475,33 @@ export type HeadersInit =
|
|
|
1337
1475
|
| Headers
|
|
1338
1476
|
| Iterable<Iterable<string>>
|
|
1339
1477
|
| Record<string, string>;
|
|
1478
|
+
/**
|
|
1479
|
+
* This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
|
|
1480
|
+
*
|
|
1481
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1482
|
+
*/
|
|
1340
1483
|
export declare class Headers {
|
|
1341
1484
|
constructor(init?: HeadersInit);
|
|
1485
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1342
1486
|
get(name: string): string | null;
|
|
1343
1487
|
getAll(name: string): string[];
|
|
1488
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1344
1489
|
has(name: string): boolean;
|
|
1490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1345
1491
|
set(name: string, value: string): void;
|
|
1492
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1346
1493
|
append(name: string, value: string): void;
|
|
1494
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1347
1495
|
delete(name: string): void;
|
|
1348
1496
|
forEach<This = unknown>(
|
|
1349
1497
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1350
1498
|
thisArg?: This,
|
|
1351
1499
|
): void;
|
|
1352
|
-
|
|
1500
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1353
1501
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1354
|
-
|
|
1502
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1355
1503
|
keys(): IterableIterator<string>;
|
|
1356
|
-
|
|
1504
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1357
1505
|
values(): IterableIterator<string>;
|
|
1358
1506
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1359
1507
|
}
|
|
@@ -1366,34 +1514,46 @@ export type BodyInit =
|
|
|
1366
1514
|
| URLSearchParams
|
|
1367
1515
|
| FormData;
|
|
1368
1516
|
export declare abstract class Body {
|
|
1517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1369
1518
|
get body(): ReadableStream | null;
|
|
1519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1370
1520
|
get bodyUsed(): boolean;
|
|
1521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1371
1522
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1372
1523
|
bytes(): Promise<Uint8Array>;
|
|
1524
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1373
1525
|
text(): Promise<string>;
|
|
1526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1374
1527
|
json<T>(): Promise<T>;
|
|
1528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1375
1529
|
formData(): Promise<FormData>;
|
|
1530
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1376
1531
|
blob(): Promise<Blob>;
|
|
1377
1532
|
}
|
|
1533
|
+
/**
|
|
1534
|
+
* This Fetch API interface represents the response to a request.
|
|
1535
|
+
*
|
|
1536
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1537
|
+
*/
|
|
1378
1538
|
export declare class Response extends Body {
|
|
1379
1539
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1380
|
-
|
|
1540
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1381
1541
|
static redirect(url: string, status?: number): Response;
|
|
1382
|
-
|
|
1542
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1383
1543
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1384
|
-
|
|
1544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1385
1545
|
clone(): Response;
|
|
1386
|
-
|
|
1546
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1387
1547
|
get status(): number;
|
|
1388
|
-
|
|
1548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1389
1549
|
get statusText(): string;
|
|
1390
|
-
|
|
1550
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1391
1551
|
get headers(): Headers;
|
|
1392
|
-
|
|
1552
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1393
1553
|
get ok(): boolean;
|
|
1394
|
-
|
|
1554
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1395
1555
|
get redirected(): boolean;
|
|
1396
|
-
|
|
1556
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1397
1557
|
get url(): string;
|
|
1398
1558
|
get webSocket(): WebSocket | null;
|
|
1399
1559
|
get cf(): any | undefined;
|
|
@@ -1410,12 +1570,17 @@ export type RequestInfo<
|
|
|
1410
1570
|
CfHostMetadata = unknown,
|
|
1411
1571
|
Cf = CfProperties<CfHostMetadata>,
|
|
1412
1572
|
> = Request<CfHostMetadata, Cf> | string | URL;
|
|
1573
|
+
/**
|
|
1574
|
+
* This Fetch API interface represents a resource request.
|
|
1575
|
+
*
|
|
1576
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1577
|
+
*/
|
|
1413
1578
|
export declare class Request<
|
|
1414
1579
|
CfHostMetadata = unknown,
|
|
1415
1580
|
Cf = CfProperties<CfHostMetadata>,
|
|
1416
1581
|
> extends Body {
|
|
1417
1582
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1418
|
-
|
|
1583
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1419
1584
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1420
1585
|
/**
|
|
1421
1586
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1461,21 +1626,29 @@ export declare class Request<
|
|
|
1461
1626
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1462
1627
|
*/
|
|
1463
1628
|
get keepalive(): boolean;
|
|
1629
|
+
/**
|
|
1630
|
+
* Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
1631
|
+
*
|
|
1632
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1633
|
+
*/
|
|
1634
|
+
get cache(): string | undefined;
|
|
1464
1635
|
}
|
|
1465
1636
|
export interface RequestInit<Cf = CfProperties> {
|
|
1466
|
-
|
|
1637
|
+
/* A string to set request's method. */
|
|
1467
1638
|
method?: string;
|
|
1468
|
-
|
|
1639
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1469
1640
|
headers?: HeadersInit;
|
|
1470
|
-
|
|
1641
|
+
/* A BodyInit object or null to set request's body. */
|
|
1471
1642
|
body?: BodyInit | null;
|
|
1472
|
-
|
|
1643
|
+
/* 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. */
|
|
1473
1644
|
redirect?: string;
|
|
1474
1645
|
fetcher?: Fetcher | null;
|
|
1475
1646
|
cf?: Cf;
|
|
1476
|
-
|
|
1647
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1648
|
+
cache?: string;
|
|
1649
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1477
1650
|
integrity?: string;
|
|
1478
|
-
|
|
1651
|
+
/* An AbortSignal to set request's signal. */
|
|
1479
1652
|
signal?: AbortSignal | null;
|
|
1480
1653
|
}
|
|
1481
1654
|
export type Service<
|
|
@@ -1908,31 +2081,36 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
1908
2081
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1909
2082
|
*/
|
|
1910
2083
|
export interface ReadableStream<R = any> {
|
|
1911
|
-
|
|
2084
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1912
2085
|
get locked(): boolean;
|
|
1913
|
-
|
|
2086
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1914
2087
|
cancel(reason?: any): Promise<void>;
|
|
1915
|
-
|
|
2088
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1916
2089
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1917
|
-
|
|
2090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1918
2091
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1919
|
-
|
|
2092
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1920
2093
|
pipeThrough<T>(
|
|
1921
2094
|
transform: ReadableWritablePair<T, R>,
|
|
1922
2095
|
options?: StreamPipeOptions,
|
|
1923
2096
|
): ReadableStream<T>;
|
|
1924
|
-
|
|
2097
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1925
2098
|
pipeTo(
|
|
1926
2099
|
destination: WritableStream<R>,
|
|
1927
2100
|
options?: StreamPipeOptions,
|
|
1928
2101
|
): Promise<void>;
|
|
1929
|
-
|
|
2102
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1930
2103
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1931
2104
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1932
2105
|
[Symbol.asyncIterator](
|
|
1933
2106
|
options?: ReadableStreamValuesOptions,
|
|
1934
2107
|
): AsyncIterableIterator<R>;
|
|
1935
2108
|
}
|
|
2109
|
+
/**
|
|
2110
|
+
* 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.
|
|
2111
|
+
*
|
|
2112
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2113
|
+
*/
|
|
1936
2114
|
export declare const ReadableStream: {
|
|
1937
2115
|
prototype: ReadableStream;
|
|
1938
2116
|
new (
|
|
@@ -1944,24 +2122,26 @@ export declare const ReadableStream: {
|
|
|
1944
2122
|
strategy?: QueuingStrategy<R>,
|
|
1945
2123
|
): ReadableStream<R>;
|
|
1946
2124
|
};
|
|
2125
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1947
2126
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
1948
2127
|
constructor(stream: ReadableStream);
|
|
1949
2128
|
get closed(): Promise<void>;
|
|
1950
2129
|
cancel(reason?: any): Promise<void>;
|
|
1951
|
-
|
|
2130
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1952
2131
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1953
|
-
|
|
2132
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1954
2133
|
releaseLock(): void;
|
|
1955
2134
|
}
|
|
2135
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1956
2136
|
export declare class ReadableStreamBYOBReader {
|
|
1957
2137
|
constructor(stream: ReadableStream);
|
|
1958
2138
|
get closed(): Promise<void>;
|
|
1959
2139
|
cancel(reason?: any): Promise<void>;
|
|
1960
|
-
|
|
2140
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1961
2141
|
read<T extends ArrayBufferView>(
|
|
1962
2142
|
view: T,
|
|
1963
2143
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1964
|
-
|
|
2144
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1965
2145
|
releaseLock(): void;
|
|
1966
2146
|
readAtLeast<T extends ArrayBufferView>(
|
|
1967
2147
|
minElements: number,
|
|
@@ -1979,38 +2159,38 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
1979
2159
|
*/
|
|
1980
2160
|
mode: "byob";
|
|
1981
2161
|
}
|
|
1982
|
-
|
|
2162
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1983
2163
|
export interface ReadableStreamBYOBRequest {
|
|
1984
|
-
|
|
2164
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1985
2165
|
get view(): Uint8Array | null;
|
|
1986
|
-
|
|
2166
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1987
2167
|
respond(bytesWritten: number): void;
|
|
1988
|
-
|
|
2168
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1989
2169
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1990
2170
|
get atLeast(): number | null;
|
|
1991
2171
|
}
|
|
1992
|
-
|
|
2172
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1993
2173
|
export interface ReadableStreamDefaultController<R = any> {
|
|
1994
|
-
|
|
2174
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1995
2175
|
get desiredSize(): number | null;
|
|
1996
|
-
|
|
2176
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1997
2177
|
close(): void;
|
|
1998
|
-
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1999
2179
|
enqueue(chunk?: R): void;
|
|
2000
|
-
|
|
2180
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
2001
2181
|
error(reason: any): void;
|
|
2002
2182
|
}
|
|
2003
|
-
|
|
2183
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
2004
2184
|
export interface ReadableByteStreamController {
|
|
2005
|
-
|
|
2185
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
2006
2186
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2007
|
-
|
|
2187
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
2008
2188
|
get desiredSize(): number | null;
|
|
2009
|
-
|
|
2189
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
2010
2190
|
close(): void;
|
|
2011
|
-
|
|
2191
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
2012
2192
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2013
|
-
|
|
2193
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
2014
2194
|
error(reason: any): void;
|
|
2015
2195
|
}
|
|
2016
2196
|
/**
|
|
@@ -2019,20 +2199,20 @@ export interface ReadableByteStreamController {
|
|
|
2019
2199
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2020
2200
|
*/
|
|
2021
2201
|
export interface WritableStreamDefaultController {
|
|
2022
|
-
|
|
2202
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2023
2203
|
get signal(): AbortSignal;
|
|
2024
|
-
|
|
2204
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2025
2205
|
error(reason?: any): void;
|
|
2026
2206
|
}
|
|
2027
|
-
|
|
2207
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2028
2208
|
export interface TransformStreamDefaultController<O = any> {
|
|
2029
|
-
|
|
2209
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2030
2210
|
get desiredSize(): number | null;
|
|
2031
|
-
|
|
2211
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2032
2212
|
enqueue(chunk?: O): void;
|
|
2033
|
-
|
|
2213
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2034
2214
|
error(reason: any): void;
|
|
2035
|
-
|
|
2215
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2036
2216
|
terminate(): void;
|
|
2037
2217
|
}
|
|
2038
2218
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2044,46 +2224,57 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
2044
2224
|
writable: WritableStream<W>;
|
|
2045
2225
|
readable: ReadableStream<R>;
|
|
2046
2226
|
}
|
|
2227
|
+
/**
|
|
2228
|
+
* 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.
|
|
2229
|
+
*
|
|
2230
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2231
|
+
*/
|
|
2047
2232
|
export declare class WritableStream<W = any> {
|
|
2048
2233
|
constructor(
|
|
2049
2234
|
underlyingSink?: UnderlyingSink,
|
|
2050
2235
|
queuingStrategy?: QueuingStrategy,
|
|
2051
2236
|
);
|
|
2052
|
-
|
|
2237
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2053
2238
|
get locked(): boolean;
|
|
2054
|
-
|
|
2239
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2055
2240
|
abort(reason?: any): Promise<void>;
|
|
2056
|
-
|
|
2241
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2057
2242
|
close(): Promise<void>;
|
|
2058
|
-
|
|
2243
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2059
2244
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2060
2245
|
}
|
|
2246
|
+
/**
|
|
2247
|
+
* 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.
|
|
2248
|
+
*
|
|
2249
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2250
|
+
*/
|
|
2061
2251
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2062
2252
|
constructor(stream: WritableStream);
|
|
2063
|
-
|
|
2253
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2064
2254
|
get closed(): Promise<void>;
|
|
2065
|
-
|
|
2255
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2066
2256
|
get ready(): Promise<void>;
|
|
2067
|
-
|
|
2257
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2068
2258
|
get desiredSize(): number | null;
|
|
2069
|
-
|
|
2259
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2070
2260
|
abort(reason?: any): Promise<void>;
|
|
2071
|
-
|
|
2261
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2072
2262
|
close(): Promise<void>;
|
|
2073
|
-
|
|
2263
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2074
2264
|
write(chunk?: W): Promise<void>;
|
|
2075
|
-
|
|
2265
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2076
2266
|
releaseLock(): void;
|
|
2077
2267
|
}
|
|
2268
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2078
2269
|
export declare class TransformStream<I = any, O = any> {
|
|
2079
2270
|
constructor(
|
|
2080
2271
|
transformer?: Transformer<I, O>,
|
|
2081
2272
|
writableStrategy?: QueuingStrategy<I>,
|
|
2082
2273
|
readableStrategy?: QueuingStrategy<O>,
|
|
2083
2274
|
);
|
|
2084
|
-
|
|
2275
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2085
2276
|
get readable(): ReadableStream<O>;
|
|
2086
|
-
|
|
2277
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2087
2278
|
get writable(): WritableStream<I>;
|
|
2088
2279
|
}
|
|
2089
2280
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2104,18 +2295,21 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2104
2295
|
export interface ReadableStreamValuesOptions {
|
|
2105
2296
|
preventCancel?: boolean;
|
|
2106
2297
|
}
|
|
2298
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2107
2299
|
export declare class CompressionStream extends TransformStream<
|
|
2108
2300
|
ArrayBuffer | ArrayBufferView,
|
|
2109
2301
|
Uint8Array
|
|
2110
2302
|
> {
|
|
2111
2303
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2112
2304
|
}
|
|
2305
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2113
2306
|
export declare class DecompressionStream extends TransformStream<
|
|
2114
2307
|
ArrayBuffer | ArrayBufferView,
|
|
2115
2308
|
Uint8Array
|
|
2116
2309
|
> {
|
|
2117
2310
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2118
2311
|
}
|
|
2312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2119
2313
|
export declare class TextEncoderStream extends TransformStream<
|
|
2120
2314
|
string,
|
|
2121
2315
|
Uint8Array
|
|
@@ -2123,6 +2317,7 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2123
2317
|
constructor();
|
|
2124
2318
|
get encoding(): string;
|
|
2125
2319
|
}
|
|
2320
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2126
2321
|
export declare class TextDecoderStream extends TransformStream<
|
|
2127
2322
|
ArrayBuffer | ArrayBufferView,
|
|
2128
2323
|
string
|
|
@@ -2136,20 +2331,30 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2136
2331
|
fatal?: boolean;
|
|
2137
2332
|
ignoreBOM?: boolean;
|
|
2138
2333
|
}
|
|
2334
|
+
/**
|
|
2335
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2336
|
+
*
|
|
2337
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2338
|
+
*/
|
|
2139
2339
|
export declare class ByteLengthQueuingStrategy
|
|
2140
2340
|
implements QueuingStrategy<ArrayBufferView>
|
|
2141
2341
|
{
|
|
2142
2342
|
constructor(init: QueuingStrategyInit);
|
|
2143
|
-
|
|
2343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2144
2344
|
get highWaterMark(): number;
|
|
2145
|
-
|
|
2345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2146
2346
|
get size(): (chunk?: any) => number;
|
|
2147
2347
|
}
|
|
2348
|
+
/**
|
|
2349
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2350
|
+
*
|
|
2351
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2352
|
+
*/
|
|
2148
2353
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2149
2354
|
constructor(init: QueuingStrategyInit);
|
|
2150
|
-
|
|
2355
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2151
2356
|
get highWaterMark(): number;
|
|
2152
|
-
|
|
2357
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2153
2358
|
get size(): (chunk?: any) => number;
|
|
2154
2359
|
}
|
|
2155
2360
|
export interface QueuingStrategyInit {
|
|
@@ -2193,6 +2398,7 @@ export interface TraceItem {
|
|
|
2193
2398
|
readonly dispatchNamespace?: string;
|
|
2194
2399
|
readonly scriptTags?: string[];
|
|
2195
2400
|
readonly outcome: string;
|
|
2401
|
+
readonly truncated: boolean;
|
|
2196
2402
|
}
|
|
2197
2403
|
export interface TraceItemAlarmEventInfo {
|
|
2198
2404
|
readonly scheduledTime: Date;
|
|
@@ -2274,56 +2480,63 @@ export interface TraceMetrics {
|
|
|
2274
2480
|
export interface UnsafeTraceMetrics {
|
|
2275
2481
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2276
2482
|
}
|
|
2483
|
+
/**
|
|
2484
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2485
|
+
*
|
|
2486
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2487
|
+
*/
|
|
2277
2488
|
export declare class URL {
|
|
2278
2489
|
constructor(url: string | URL, base?: string | URL);
|
|
2279
|
-
|
|
2490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2280
2491
|
get href(): string;
|
|
2281
|
-
|
|
2492
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2282
2493
|
set href(value: string);
|
|
2283
|
-
|
|
2494
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2284
2495
|
get origin(): string;
|
|
2285
|
-
|
|
2496
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2286
2497
|
get protocol(): string;
|
|
2287
|
-
|
|
2498
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2288
2499
|
set protocol(value: string);
|
|
2289
|
-
|
|
2500
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2290
2501
|
get username(): string;
|
|
2291
|
-
|
|
2502
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2292
2503
|
set username(value: string);
|
|
2293
|
-
|
|
2504
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2294
2505
|
get password(): string;
|
|
2295
|
-
|
|
2506
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2296
2507
|
set password(value: string);
|
|
2297
|
-
|
|
2508
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2298
2509
|
get host(): string;
|
|
2299
|
-
|
|
2510
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2300
2511
|
set host(value: string);
|
|
2301
|
-
|
|
2512
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2302
2513
|
get hostname(): string;
|
|
2303
|
-
|
|
2514
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2304
2515
|
set hostname(value: string);
|
|
2305
|
-
|
|
2516
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2306
2517
|
get port(): string;
|
|
2307
|
-
|
|
2518
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2308
2519
|
set port(value: string);
|
|
2309
|
-
|
|
2520
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2310
2521
|
get pathname(): string;
|
|
2311
|
-
|
|
2522
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2312
2523
|
set pathname(value: string);
|
|
2313
|
-
|
|
2524
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2314
2525
|
get search(): string;
|
|
2315
|
-
|
|
2526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2316
2527
|
set search(value: string);
|
|
2317
|
-
|
|
2528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2318
2529
|
get searchParams(): URLSearchParams;
|
|
2319
|
-
|
|
2530
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2320
2531
|
get hash(): string;
|
|
2321
|
-
|
|
2532
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2322
2533
|
set hash(value: string);
|
|
2534
|
+
/*function toString() { [native code] }*/
|
|
2323
2535
|
toString(): string;
|
|
2324
|
-
|
|
2536
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2325
2537
|
toJSON(): string;
|
|
2326
2538
|
}
|
|
2539
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2327
2540
|
export declare class URLSearchParams {
|
|
2328
2541
|
constructor(
|
|
2329
2542
|
init?:
|
|
@@ -2332,19 +2545,51 @@ export declare class URLSearchParams {
|
|
|
2332
2545
|
| Record<string, string>
|
|
2333
2546
|
| [key: string, value: string][],
|
|
2334
2547
|
);
|
|
2548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2335
2549
|
get size(): number;
|
|
2550
|
+
/**
|
|
2551
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2552
|
+
*
|
|
2553
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2554
|
+
*/
|
|
2336
2555
|
append(name: string, value: string): void;
|
|
2556
|
+
/**
|
|
2557
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2558
|
+
*
|
|
2559
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2560
|
+
*/
|
|
2337
2561
|
delete(name: string): void;
|
|
2562
|
+
/**
|
|
2563
|
+
* Returns the first value associated to the given search parameter.
|
|
2564
|
+
*
|
|
2565
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2566
|
+
*/
|
|
2338
2567
|
get(name: string): string | null;
|
|
2568
|
+
/**
|
|
2569
|
+
* Returns all the values association with a given search parameter.
|
|
2570
|
+
*
|
|
2571
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2572
|
+
*/
|
|
2339
2573
|
getAll(name: string): string[];
|
|
2574
|
+
/**
|
|
2575
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2576
|
+
*
|
|
2577
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2578
|
+
*/
|
|
2340
2579
|
has(name: string): boolean;
|
|
2580
|
+
/**
|
|
2581
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2582
|
+
*
|
|
2583
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2584
|
+
*/
|
|
2341
2585
|
set(name: string, value: string): void;
|
|
2586
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2342
2587
|
sort(): void;
|
|
2343
|
-
|
|
2588
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2344
2589
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2345
|
-
|
|
2590
|
+
/* Returns a list of keys in the search params. */
|
|
2346
2591
|
keys(): IterableIterator<string>;
|
|
2347
|
-
|
|
2592
|
+
/* Returns a list of values in the search params. */
|
|
2348
2593
|
values(): IterableIterator<string>;
|
|
2349
2594
|
forEach<This = unknown>(
|
|
2350
2595
|
callback: (
|
|
@@ -2355,6 +2600,7 @@ export declare class URLSearchParams {
|
|
|
2355
2600
|
) => void,
|
|
2356
2601
|
thisArg?: This,
|
|
2357
2602
|
): void;
|
|
2603
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2358
2604
|
toString(): string;
|
|
2359
2605
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2360
2606
|
}
|
|
@@ -2407,6 +2653,11 @@ export interface URLPatternURLPatternResult {
|
|
|
2407
2653
|
export interface URLPatternURLPatternOptions {
|
|
2408
2654
|
ignoreCase?: boolean;
|
|
2409
2655
|
}
|
|
2656
|
+
/**
|
|
2657
|
+
* 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.
|
|
2658
|
+
*
|
|
2659
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2660
|
+
*/
|
|
2410
2661
|
export declare class CloseEvent extends Event {
|
|
2411
2662
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2412
2663
|
/**
|
|
@@ -2433,8 +2684,18 @@ export interface CloseEventInit {
|
|
|
2433
2684
|
reason?: string;
|
|
2434
2685
|
wasClean?: boolean;
|
|
2435
2686
|
}
|
|
2687
|
+
/**
|
|
2688
|
+
* A message received by a target object.
|
|
2689
|
+
*
|
|
2690
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2691
|
+
*/
|
|
2436
2692
|
export declare class MessageEvent extends Event {
|
|
2437
2693
|
constructor(type: string, initializer: MessageEventInit);
|
|
2694
|
+
/**
|
|
2695
|
+
* Returns the data of the message.
|
|
2696
|
+
*
|
|
2697
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2698
|
+
*/
|
|
2438
2699
|
readonly data: ArrayBuffer | string;
|
|
2439
2700
|
}
|
|
2440
2701
|
export interface MessageEventInit {
|
|
@@ -2446,6 +2707,11 @@ export type WebSocketEventMap = {
|
|
|
2446
2707
|
open: Event;
|
|
2447
2708
|
error: ErrorEvent;
|
|
2448
2709
|
};
|
|
2710
|
+
/**
|
|
2711
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2712
|
+
*
|
|
2713
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2714
|
+
*/
|
|
2449
2715
|
export declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2450
2716
|
constructor(url: string, protocols?: string[] | string);
|
|
2451
2717
|
accept(): void;
|
|
@@ -3038,6 +3304,7 @@ export interface GPUOrigin3DDict {
|
|
|
3038
3304
|
y?: number;
|
|
3039
3305
|
z?: number;
|
|
3040
3306
|
}
|
|
3307
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3041
3308
|
export declare class EventSource {
|
|
3042
3309
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3043
3310
|
/**
|
|
@@ -3064,17 +3331,17 @@ export declare class EventSource {
|
|
|
3064
3331
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3065
3332
|
*/
|
|
3066
3333
|
get readyState(): number;
|
|
3067
|
-
|
|
3334
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3068
3335
|
get onopen(): any | null;
|
|
3069
|
-
|
|
3336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3070
3337
|
set onopen(value: any | null);
|
|
3071
|
-
|
|
3338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3072
3339
|
get onmessage(): any | null;
|
|
3073
|
-
|
|
3340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3074
3341
|
set onmessage(value: any | null);
|
|
3075
|
-
|
|
3342
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3076
3343
|
get onerror(): any | null;
|
|
3077
|
-
|
|
3344
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3078
3345
|
set onerror(value: any | null);
|
|
3079
3346
|
static readonly CONNECTING: number;
|
|
3080
3347
|
static readonly OPEN: number;
|