@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/2021-11-03/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
|
*/
|
|
@@ -312,54 +318,73 @@ export declare function removeEventListener<
|
|
|
312
318
|
export declare function dispatchEvent(
|
|
313
319
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
314
320
|
): boolean;
|
|
315
|
-
|
|
321
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
316
322
|
export declare function btoa(data: string): string;
|
|
317
|
-
|
|
323
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
318
324
|
export declare function atob(data: string): string;
|
|
319
|
-
|
|
325
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
320
326
|
export declare function setTimeout(
|
|
321
327
|
callback: (...args: any[]) => void,
|
|
322
328
|
msDelay?: number,
|
|
323
329
|
): number;
|
|
324
|
-
|
|
330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
325
331
|
export declare function setTimeout<Args extends any[]>(
|
|
326
332
|
callback: (...args: Args) => void,
|
|
327
333
|
msDelay?: number,
|
|
328
334
|
...args: Args
|
|
329
335
|
): number;
|
|
330
|
-
|
|
336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
331
337
|
export declare function clearTimeout(timeoutId: number | null): void;
|
|
332
|
-
|
|
338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
333
339
|
export declare function setInterval(
|
|
334
340
|
callback: (...args: any[]) => void,
|
|
335
341
|
msDelay?: number,
|
|
336
342
|
): number;
|
|
337
|
-
|
|
343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
338
344
|
export declare function setInterval<Args extends any[]>(
|
|
339
345
|
callback: (...args: Args) => void,
|
|
340
346
|
msDelay?: number,
|
|
341
347
|
...args: Args
|
|
342
348
|
): number;
|
|
343
|
-
|
|
349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
344
350
|
export declare function clearInterval(timeoutId: number | null): void;
|
|
345
|
-
|
|
351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
346
352
|
export declare function queueMicrotask(task: Function): void;
|
|
347
|
-
|
|
353
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
348
354
|
export declare function structuredClone<T>(
|
|
349
355
|
value: T,
|
|
350
356
|
options?: StructuredSerializeOptions,
|
|
351
357
|
): T;
|
|
352
|
-
|
|
358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
353
359
|
export declare function reportError(error: any): void;
|
|
354
|
-
|
|
360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
355
361
|
export declare function fetch(
|
|
356
362
|
input: RequestInfo,
|
|
357
363
|
init?: RequestInit<RequestInitCfProperties>,
|
|
358
364
|
): Promise<Response>;
|
|
359
365
|
export declare const self: ServiceWorkerGlobalScope;
|
|
366
|
+
/**
|
|
367
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
368
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
369
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
370
|
+
* compared to those implemented in most browsers.
|
|
371
|
+
*
|
|
372
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
373
|
+
*/
|
|
360
374
|
export declare const crypto: Crypto;
|
|
375
|
+
/**
|
|
376
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
377
|
+
*
|
|
378
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
379
|
+
*/
|
|
361
380
|
export declare const caches: CacheStorage;
|
|
362
381
|
export declare const scheduler: Scheduler;
|
|
382
|
+
/**
|
|
383
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
384
|
+
* as well as timing of subrequests and other operations.
|
|
385
|
+
*
|
|
386
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
387
|
+
*/
|
|
363
388
|
export declare const performance: Performance;
|
|
364
389
|
export declare const origin: string;
|
|
365
390
|
export interface TestController {}
|
|
@@ -416,21 +441,23 @@ export interface ExportedHandler<
|
|
|
416
441
|
export interface StructuredSerializeOptions {
|
|
417
442
|
transfer?: any[];
|
|
418
443
|
}
|
|
444
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
419
445
|
export declare abstract class PromiseRejectionEvent extends Event {
|
|
420
|
-
|
|
446
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
421
447
|
readonly promise: Promise<any>;
|
|
422
|
-
|
|
448
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
423
449
|
readonly reason: any;
|
|
424
450
|
}
|
|
425
451
|
/**
|
|
426
|
-
*
|
|
452
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
453
|
+
* as well as timing of subrequests and other operations.
|
|
427
454
|
*
|
|
428
|
-
* [
|
|
455
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
429
456
|
*/
|
|
430
457
|
export interface Performance {
|
|
431
|
-
|
|
458
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
432
459
|
readonly timeOrigin: number;
|
|
433
|
-
|
|
460
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
434
461
|
now(): number;
|
|
435
462
|
}
|
|
436
463
|
export interface AlarmInvocationInfo {
|
|
@@ -619,6 +646,11 @@ export interface AnalyticsEngineDataPoint {
|
|
|
619
646
|
doubles?: number[];
|
|
620
647
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
621
648
|
}
|
|
649
|
+
/**
|
|
650
|
+
* An event which takes place in the DOM.
|
|
651
|
+
*
|
|
652
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
653
|
+
*/
|
|
622
654
|
export declare class Event {
|
|
623
655
|
constructor(type: string, init?: EventInit);
|
|
624
656
|
/**
|
|
@@ -736,6 +768,11 @@ export interface EventListenerObject<EventType extends Event = Event> {
|
|
|
736
768
|
export type EventListenerOrEventListenerObject<
|
|
737
769
|
EventType extends Event = Event,
|
|
738
770
|
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
771
|
+
/**
|
|
772
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
773
|
+
*
|
|
774
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
775
|
+
*/
|
|
739
776
|
export declare class EventTarget<
|
|
740
777
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
741
778
|
> {
|
|
@@ -791,6 +828,11 @@ export interface EventTargetAddEventListenerOptions {
|
|
|
791
828
|
export interface EventTargetHandlerObject {
|
|
792
829
|
handleEvent: (event: Event) => any | undefined;
|
|
793
830
|
}
|
|
831
|
+
/**
|
|
832
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
833
|
+
*
|
|
834
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
835
|
+
*/
|
|
794
836
|
export declare class AbortController {
|
|
795
837
|
constructor();
|
|
796
838
|
/**
|
|
@@ -806,11 +848,17 @@ export declare class AbortController {
|
|
|
806
848
|
*/
|
|
807
849
|
abort(reason?: any): void;
|
|
808
850
|
}
|
|
851
|
+
/**
|
|
852
|
+
* 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.
|
|
853
|
+
*
|
|
854
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
855
|
+
*/
|
|
809
856
|
export declare abstract class AbortSignal extends EventTarget {
|
|
810
|
-
|
|
857
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
811
858
|
static abort(reason?: any): AbortSignal;
|
|
812
|
-
|
|
859
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
813
860
|
static timeout(delay: number): AbortSignal;
|
|
861
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
814
862
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
815
863
|
/**
|
|
816
864
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -818,13 +866,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
818
866
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
819
867
|
*/
|
|
820
868
|
readonly aborted: boolean;
|
|
821
|
-
|
|
869
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
822
870
|
readonly reason: any;
|
|
823
|
-
|
|
871
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
824
872
|
get onabort(): any | null;
|
|
825
|
-
|
|
873
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
826
874
|
set onabort(value: any | null);
|
|
827
|
-
|
|
875
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
828
876
|
throwIfAborted(): void;
|
|
829
877
|
}
|
|
830
878
|
export interface Scheduler {
|
|
@@ -833,10 +881,16 @@ export interface Scheduler {
|
|
|
833
881
|
export interface SchedulerWaitOptions {
|
|
834
882
|
signal?: AbortSignal;
|
|
835
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* 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.
|
|
886
|
+
*
|
|
887
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
888
|
+
*/
|
|
836
889
|
export declare abstract class ExtendableEvent extends Event {
|
|
837
|
-
|
|
890
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
838
891
|
waitUntil(promise: Promise<any>): void;
|
|
839
892
|
}
|
|
893
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
840
894
|
export declare class CustomEvent<T = any> extends Event {
|
|
841
895
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
842
896
|
/**
|
|
@@ -852,59 +906,90 @@ export interface CustomEventCustomEventInit {
|
|
|
852
906
|
composed?: boolean;
|
|
853
907
|
detail?: any;
|
|
854
908
|
}
|
|
909
|
+
/**
|
|
910
|
+
* 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.
|
|
911
|
+
*
|
|
912
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
913
|
+
*/
|
|
855
914
|
export declare class Blob {
|
|
856
915
|
constructor(
|
|
857
916
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
858
917
|
options?: BlobOptions,
|
|
859
918
|
);
|
|
860
|
-
|
|
919
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
861
920
|
readonly size: number;
|
|
862
|
-
|
|
921
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
863
922
|
readonly type: string;
|
|
864
|
-
|
|
923
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
865
924
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
866
|
-
|
|
925
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
867
926
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
868
927
|
bytes(): Promise<Uint8Array>;
|
|
869
|
-
|
|
928
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
870
929
|
text(): Promise<string>;
|
|
871
|
-
|
|
930
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
872
931
|
stream(): ReadableStream;
|
|
873
932
|
}
|
|
874
933
|
export interface BlobOptions {
|
|
875
934
|
type?: string;
|
|
876
935
|
}
|
|
936
|
+
/**
|
|
937
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
938
|
+
*
|
|
939
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
940
|
+
*/
|
|
877
941
|
export declare class File extends Blob {
|
|
878
942
|
constructor(
|
|
879
943
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
880
944
|
name: string,
|
|
881
945
|
options?: FileOptions,
|
|
882
946
|
);
|
|
883
|
-
|
|
947
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
884
948
|
readonly name: string;
|
|
885
|
-
|
|
949
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
886
950
|
readonly lastModified: number;
|
|
887
951
|
}
|
|
888
952
|
export interface FileOptions {
|
|
889
953
|
type?: string;
|
|
890
954
|
lastModified?: number;
|
|
891
955
|
}
|
|
956
|
+
/**
|
|
957
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
958
|
+
*
|
|
959
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
960
|
+
*/
|
|
892
961
|
export declare abstract class CacheStorage {
|
|
893
|
-
|
|
962
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
894
963
|
open(cacheName: string): Promise<Cache>;
|
|
895
964
|
readonly default: Cache;
|
|
896
965
|
}
|
|
966
|
+
/**
|
|
967
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
968
|
+
*
|
|
969
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
970
|
+
*/
|
|
897
971
|
export declare abstract class Cache {
|
|
972
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
898
973
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
974
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
899
975
|
match(
|
|
900
976
|
request: RequestInfo,
|
|
901
977
|
options?: CacheQueryOptions,
|
|
902
978
|
): Promise<Response | undefined>;
|
|
979
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
903
980
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
904
981
|
}
|
|
905
982
|
export interface CacheQueryOptions {
|
|
906
983
|
ignoreMethod?: boolean;
|
|
907
984
|
}
|
|
985
|
+
/**
|
|
986
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
987
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
988
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
989
|
+
* compared to those implemented in most browsers.
|
|
990
|
+
*
|
|
991
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
992
|
+
*/
|
|
908
993
|
export declare abstract class Crypto {
|
|
909
994
|
/**
|
|
910
995
|
* Available only in secure contexts.
|
|
@@ -912,7 +997,7 @@ export declare abstract class Crypto {
|
|
|
912
997
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
913
998
|
*/
|
|
914
999
|
readonly subtle: SubtleCrypto;
|
|
915
|
-
|
|
1000
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
916
1001
|
getRandomValues<
|
|
917
1002
|
T extends
|
|
918
1003
|
| Int8Array
|
|
@@ -932,39 +1017,50 @@ export declare abstract class Crypto {
|
|
|
932
1017
|
randomUUID(): string;
|
|
933
1018
|
DigestStream: typeof DigestStream;
|
|
934
1019
|
}
|
|
1020
|
+
/**
|
|
1021
|
+
* 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).
|
|
1022
|
+
* Available only in secure contexts.
|
|
1023
|
+
*
|
|
1024
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1025
|
+
*/
|
|
935
1026
|
export declare abstract class SubtleCrypto {
|
|
1027
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
936
1028
|
encrypt(
|
|
937
1029
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
938
1030
|
key: CryptoKey,
|
|
939
1031
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
940
1032
|
): Promise<ArrayBuffer>;
|
|
1033
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
941
1034
|
decrypt(
|
|
942
1035
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
943
1036
|
key: CryptoKey,
|
|
944
1037
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
945
1038
|
): Promise<ArrayBuffer>;
|
|
1039
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
946
1040
|
sign(
|
|
947
1041
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
948
1042
|
key: CryptoKey,
|
|
949
1043
|
data: ArrayBuffer | ArrayBufferView,
|
|
950
1044
|
): Promise<ArrayBuffer>;
|
|
1045
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
951
1046
|
verify(
|
|
952
1047
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
953
1048
|
key: CryptoKey,
|
|
954
1049
|
signature: ArrayBuffer | ArrayBufferView,
|
|
955
1050
|
data: ArrayBuffer | ArrayBufferView,
|
|
956
1051
|
): Promise<boolean>;
|
|
1052
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
957
1053
|
digest(
|
|
958
1054
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
959
1055
|
data: ArrayBuffer | ArrayBufferView,
|
|
960
1056
|
): Promise<ArrayBuffer>;
|
|
961
|
-
|
|
1057
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
962
1058
|
generateKey(
|
|
963
1059
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
964
1060
|
extractable: boolean,
|
|
965
1061
|
keyUsages: string[],
|
|
966
1062
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
967
|
-
|
|
1063
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
968
1064
|
deriveKey(
|
|
969
1065
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
970
1066
|
baseKey: CryptoKey,
|
|
@@ -972,12 +1068,13 @@ export declare abstract class SubtleCrypto {
|
|
|
972
1068
|
extractable: boolean,
|
|
973
1069
|
keyUsages: string[],
|
|
974
1070
|
): Promise<CryptoKey>;
|
|
1071
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
975
1072
|
deriveBits(
|
|
976
1073
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
977
1074
|
baseKey: CryptoKey,
|
|
978
|
-
length
|
|
1075
|
+
length?: number | null,
|
|
979
1076
|
): Promise<ArrayBuffer>;
|
|
980
|
-
|
|
1077
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
981
1078
|
importKey(
|
|
982
1079
|
format: string,
|
|
983
1080
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -985,14 +1082,16 @@ export declare abstract class SubtleCrypto {
|
|
|
985
1082
|
extractable: boolean,
|
|
986
1083
|
keyUsages: string[],
|
|
987
1084
|
): Promise<CryptoKey>;
|
|
1085
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
988
1086
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1087
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
989
1088
|
wrapKey(
|
|
990
1089
|
format: string,
|
|
991
1090
|
key: CryptoKey,
|
|
992
1091
|
wrappingKey: CryptoKey,
|
|
993
1092
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
994
1093
|
): Promise<ArrayBuffer>;
|
|
995
|
-
|
|
1094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
996
1095
|
unwrapKey(
|
|
997
1096
|
format: string,
|
|
998
1097
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1007,12 +1106,18 @@ export declare abstract class SubtleCrypto {
|
|
|
1007
1106
|
b: ArrayBuffer | ArrayBufferView,
|
|
1008
1107
|
): boolean;
|
|
1009
1108
|
}
|
|
1109
|
+
/**
|
|
1110
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1111
|
+
* Available only in secure contexts.
|
|
1112
|
+
*
|
|
1113
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1114
|
+
*/
|
|
1010
1115
|
export declare abstract class CryptoKey {
|
|
1011
|
-
|
|
1116
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1012
1117
|
readonly type: string;
|
|
1013
|
-
|
|
1118
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1014
1119
|
readonly extractable: boolean;
|
|
1015
|
-
|
|
1120
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1016
1121
|
readonly algorithm:
|
|
1017
1122
|
| CryptoKeyKeyAlgorithm
|
|
1018
1123
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1020,7 +1125,7 @@ export declare abstract class CryptoKey {
|
|
|
1020
1125
|
| CryptoKeyRsaKeyAlgorithm
|
|
1021
1126
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1022
1127
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1023
|
-
|
|
1128
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1024
1129
|
readonly usages: string[];
|
|
1025
1130
|
}
|
|
1026
1131
|
export interface CryptoKeyPair {
|
|
@@ -1128,6 +1233,11 @@ export declare class DigestStream extends WritableStream<
|
|
|
1128
1233
|
readonly digest: Promise<ArrayBuffer>;
|
|
1129
1234
|
get bytesWritten(): number | bigint;
|
|
1130
1235
|
}
|
|
1236
|
+
/**
|
|
1237
|
+
* 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.
|
|
1238
|
+
*
|
|
1239
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1240
|
+
*/
|
|
1131
1241
|
export declare class TextDecoder {
|
|
1132
1242
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1133
1243
|
/**
|
|
@@ -1153,6 +1263,11 @@ export declare class TextDecoder {
|
|
|
1153
1263
|
readonly fatal: boolean;
|
|
1154
1264
|
readonly ignoreBOM: boolean;
|
|
1155
1265
|
}
|
|
1266
|
+
/**
|
|
1267
|
+
* 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.
|
|
1268
|
+
*
|
|
1269
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1270
|
+
*/
|
|
1156
1271
|
export declare class TextEncoder {
|
|
1157
1272
|
constructor();
|
|
1158
1273
|
/**
|
|
@@ -1183,17 +1298,22 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1183
1298
|
read: number;
|
|
1184
1299
|
written: number;
|
|
1185
1300
|
}
|
|
1301
|
+
/**
|
|
1302
|
+
* Events providing information related to errors in scripts or in files.
|
|
1303
|
+
*
|
|
1304
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1305
|
+
*/
|
|
1186
1306
|
export declare class ErrorEvent extends Event {
|
|
1187
1307
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1188
|
-
|
|
1308
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1189
1309
|
get filename(): string;
|
|
1190
|
-
|
|
1310
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1191
1311
|
get message(): string;
|
|
1192
|
-
|
|
1312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1193
1313
|
get lineno(): number;
|
|
1194
|
-
|
|
1314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1195
1315
|
get colno(): number;
|
|
1196
|
-
|
|
1316
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1197
1317
|
get error(): any;
|
|
1198
1318
|
}
|
|
1199
1319
|
export interface ErrorEventErrorEventInit {
|
|
@@ -1203,21 +1323,34 @@ export interface ErrorEventErrorEventInit {
|
|
|
1203
1323
|
colno?: number;
|
|
1204
1324
|
error?: any;
|
|
1205
1325
|
}
|
|
1326
|
+
/**
|
|
1327
|
+
* 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".
|
|
1328
|
+
*
|
|
1329
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1330
|
+
*/
|
|
1206
1331
|
export declare class FormData {
|
|
1207
1332
|
constructor();
|
|
1333
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1208
1334
|
append(name: string, value: string): void;
|
|
1335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1209
1336
|
append(name: string, value: Blob, filename?: string): void;
|
|
1337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1210
1338
|
delete(name: string): void;
|
|
1339
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1211
1340
|
get(name: string): (File | string) | null;
|
|
1341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1212
1342
|
getAll(name: string): (File | string)[];
|
|
1343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1213
1344
|
has(name: string): boolean;
|
|
1345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1214
1346
|
set(name: string, value: string): void;
|
|
1347
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1215
1348
|
set(name: string, value: Blob, filename?: string): void;
|
|
1216
|
-
|
|
1349
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1217
1350
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1218
|
-
|
|
1351
|
+
/* Returns a list of keys in the list. */
|
|
1219
1352
|
keys(): IterableIterator<string>;
|
|
1220
|
-
|
|
1353
|
+
/* Returns a list of values in the list. */
|
|
1221
1354
|
values(): IterableIterator<File | string>;
|
|
1222
1355
|
forEach<This = unknown>(
|
|
1223
1356
|
callback: (
|
|
@@ -1303,10 +1436,15 @@ export interface Text {
|
|
|
1303
1436
|
export interface DocumentEnd {
|
|
1304
1437
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1305
1438
|
}
|
|
1439
|
+
/**
|
|
1440
|
+
* 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.
|
|
1441
|
+
*
|
|
1442
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1443
|
+
*/
|
|
1306
1444
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1307
|
-
|
|
1445
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1308
1446
|
readonly request: Request;
|
|
1309
|
-
|
|
1447
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1310
1448
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1311
1449
|
passThroughOnException(): void;
|
|
1312
1450
|
}
|
|
@@ -1314,23 +1452,33 @@ export type HeadersInit =
|
|
|
1314
1452
|
| Headers
|
|
1315
1453
|
| Iterable<Iterable<string>>
|
|
1316
1454
|
| Record<string, string>;
|
|
1455
|
+
/**
|
|
1456
|
+
* 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.
|
|
1457
|
+
*
|
|
1458
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1459
|
+
*/
|
|
1317
1460
|
export declare class Headers {
|
|
1318
1461
|
constructor(init?: HeadersInit);
|
|
1462
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1319
1463
|
get(name: string): string | null;
|
|
1320
1464
|
getAll(name: string): string[];
|
|
1465
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1321
1466
|
has(name: string): boolean;
|
|
1467
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1322
1468
|
set(name: string, value: string): void;
|
|
1469
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1323
1470
|
append(name: string, value: string): void;
|
|
1471
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1324
1472
|
delete(name: string): void;
|
|
1325
1473
|
forEach<This = unknown>(
|
|
1326
1474
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1327
1475
|
thisArg?: This,
|
|
1328
1476
|
): void;
|
|
1329
|
-
|
|
1477
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1330
1478
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1331
|
-
|
|
1479
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1332
1480
|
keys(): IterableIterator<string>;
|
|
1333
|
-
|
|
1481
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1334
1482
|
values(): IterableIterator<string>;
|
|
1335
1483
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1336
1484
|
}
|
|
@@ -1343,34 +1491,46 @@ export type BodyInit =
|
|
|
1343
1491
|
| URLSearchParams
|
|
1344
1492
|
| FormData;
|
|
1345
1493
|
export declare abstract class Body {
|
|
1494
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1346
1495
|
readonly body: ReadableStream | null;
|
|
1496
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1347
1497
|
readonly bodyUsed: boolean;
|
|
1498
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1348
1499
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1349
1500
|
bytes(): Promise<Uint8Array>;
|
|
1501
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1350
1502
|
text(): Promise<string>;
|
|
1503
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1351
1504
|
json<T>(): Promise<T>;
|
|
1505
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1352
1506
|
formData(): Promise<FormData>;
|
|
1507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1353
1508
|
blob(): Promise<Blob>;
|
|
1354
1509
|
}
|
|
1510
|
+
/**
|
|
1511
|
+
* This Fetch API interface represents the response to a request.
|
|
1512
|
+
*
|
|
1513
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1514
|
+
*/
|
|
1355
1515
|
export declare class Response extends Body {
|
|
1356
1516
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1357
|
-
|
|
1517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1358
1518
|
static redirect(url: string, status?: number): Response;
|
|
1359
|
-
|
|
1519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1360
1520
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1361
|
-
|
|
1521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1362
1522
|
clone(): Response;
|
|
1363
|
-
|
|
1523
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1364
1524
|
readonly status: number;
|
|
1365
|
-
|
|
1525
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1366
1526
|
readonly statusText: string;
|
|
1367
|
-
|
|
1527
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1368
1528
|
readonly headers: Headers;
|
|
1369
|
-
|
|
1529
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1370
1530
|
readonly ok: boolean;
|
|
1371
|
-
|
|
1531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1372
1532
|
readonly redirected: boolean;
|
|
1373
|
-
|
|
1533
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1374
1534
|
readonly url: string;
|
|
1375
1535
|
readonly webSocket: WebSocket | null;
|
|
1376
1536
|
readonly cf?: any;
|
|
@@ -1387,12 +1547,17 @@ export type RequestInfo<
|
|
|
1387
1547
|
CfHostMetadata = unknown,
|
|
1388
1548
|
Cf = CfProperties<CfHostMetadata>,
|
|
1389
1549
|
> = Request<CfHostMetadata, Cf> | string | URL;
|
|
1550
|
+
/**
|
|
1551
|
+
* This Fetch API interface represents a resource request.
|
|
1552
|
+
*
|
|
1553
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1554
|
+
*/
|
|
1390
1555
|
export declare class Request<
|
|
1391
1556
|
CfHostMetadata = unknown,
|
|
1392
1557
|
Cf = CfProperties<CfHostMetadata>,
|
|
1393
1558
|
> extends Body {
|
|
1394
1559
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1395
|
-
|
|
1560
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1396
1561
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1397
1562
|
/**
|
|
1398
1563
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1440,19 +1605,21 @@ export declare class Request<
|
|
|
1440
1605
|
readonly keepalive: boolean;
|
|
1441
1606
|
}
|
|
1442
1607
|
export interface RequestInit<Cf = CfProperties> {
|
|
1443
|
-
|
|
1608
|
+
/* A string to set request's method. */
|
|
1444
1609
|
method?: string;
|
|
1445
|
-
|
|
1610
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1446
1611
|
headers?: HeadersInit;
|
|
1447
|
-
|
|
1612
|
+
/* A BodyInit object or null to set request's body. */
|
|
1448
1613
|
body?: BodyInit | null;
|
|
1449
|
-
|
|
1614
|
+
/* 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. */
|
|
1450
1615
|
redirect?: string;
|
|
1451
1616
|
fetcher?: Fetcher | null;
|
|
1452
1617
|
cf?: Cf;
|
|
1453
|
-
|
|
1618
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1619
|
+
cache?: string;
|
|
1620
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1454
1621
|
integrity?: string;
|
|
1455
|
-
|
|
1622
|
+
/* An AbortSignal to set request's signal. */
|
|
1456
1623
|
signal?: AbortSignal | null;
|
|
1457
1624
|
}
|
|
1458
1625
|
export type Service<
|
|
@@ -1885,31 +2052,36 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
1885
2052
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1886
2053
|
*/
|
|
1887
2054
|
export interface ReadableStream<R = any> {
|
|
1888
|
-
|
|
2055
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1889
2056
|
readonly locked: boolean;
|
|
1890
|
-
|
|
2057
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1891
2058
|
cancel(reason?: any): Promise<void>;
|
|
1892
|
-
|
|
2059
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1893
2060
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1894
|
-
|
|
2061
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1895
2062
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1896
|
-
|
|
2063
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1897
2064
|
pipeThrough<T>(
|
|
1898
2065
|
transform: ReadableWritablePair<T, R>,
|
|
1899
2066
|
options?: StreamPipeOptions,
|
|
1900
2067
|
): ReadableStream<T>;
|
|
1901
|
-
|
|
2068
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1902
2069
|
pipeTo(
|
|
1903
2070
|
destination: WritableStream<R>,
|
|
1904
2071
|
options?: StreamPipeOptions,
|
|
1905
2072
|
): Promise<void>;
|
|
1906
|
-
|
|
2073
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1907
2074
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1908
2075
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1909
2076
|
[Symbol.asyncIterator](
|
|
1910
2077
|
options?: ReadableStreamValuesOptions,
|
|
1911
2078
|
): AsyncIterableIterator<R>;
|
|
1912
2079
|
}
|
|
2080
|
+
/**
|
|
2081
|
+
* 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.
|
|
2082
|
+
*
|
|
2083
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2084
|
+
*/
|
|
1913
2085
|
export declare const ReadableStream: {
|
|
1914
2086
|
prototype: ReadableStream;
|
|
1915
2087
|
new (
|
|
@@ -1921,24 +2093,26 @@ export declare const ReadableStream: {
|
|
|
1921
2093
|
strategy?: QueuingStrategy<R>,
|
|
1922
2094
|
): ReadableStream<R>;
|
|
1923
2095
|
};
|
|
2096
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1924
2097
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
1925
2098
|
constructor(stream: ReadableStream);
|
|
1926
2099
|
readonly closed: Promise<void>;
|
|
1927
2100
|
cancel(reason?: any): Promise<void>;
|
|
1928
|
-
|
|
2101
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1929
2102
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1930
|
-
|
|
2103
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1931
2104
|
releaseLock(): void;
|
|
1932
2105
|
}
|
|
2106
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1933
2107
|
export declare class ReadableStreamBYOBReader {
|
|
1934
2108
|
constructor(stream: ReadableStream);
|
|
1935
2109
|
readonly closed: Promise<void>;
|
|
1936
2110
|
cancel(reason?: any): Promise<void>;
|
|
1937
|
-
|
|
2111
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1938
2112
|
read<T extends ArrayBufferView>(
|
|
1939
2113
|
view: T,
|
|
1940
2114
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1941
|
-
|
|
2115
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1942
2116
|
releaseLock(): void;
|
|
1943
2117
|
readAtLeast<T extends ArrayBufferView>(
|
|
1944
2118
|
minElements: number,
|
|
@@ -1956,38 +2130,38 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
1956
2130
|
*/
|
|
1957
2131
|
mode: "byob";
|
|
1958
2132
|
}
|
|
1959
|
-
|
|
2133
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1960
2134
|
export interface ReadableStreamBYOBRequest {
|
|
1961
|
-
|
|
2135
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1962
2136
|
get view(): Uint8Array | null;
|
|
1963
|
-
|
|
2137
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1964
2138
|
respond(bytesWritten: number): void;
|
|
1965
|
-
|
|
2139
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1966
2140
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1967
2141
|
get atLeast(): number | null;
|
|
1968
2142
|
}
|
|
1969
|
-
|
|
2143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1970
2144
|
export interface ReadableStreamDefaultController<R = any> {
|
|
1971
|
-
|
|
2145
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1972
2146
|
get desiredSize(): number | null;
|
|
1973
|
-
|
|
2147
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1974
2148
|
close(): void;
|
|
1975
|
-
|
|
2149
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1976
2150
|
enqueue(chunk?: R): void;
|
|
1977
|
-
|
|
2151
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
1978
2152
|
error(reason: any): void;
|
|
1979
2153
|
}
|
|
1980
|
-
|
|
2154
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
1981
2155
|
export interface ReadableByteStreamController {
|
|
1982
|
-
|
|
2156
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
1983
2157
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
1984
|
-
|
|
2158
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
1985
2159
|
get desiredSize(): number | null;
|
|
1986
|
-
|
|
2160
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
1987
2161
|
close(): void;
|
|
1988
|
-
|
|
2162
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
1989
2163
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
1990
|
-
|
|
2164
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
1991
2165
|
error(reason: any): void;
|
|
1992
2166
|
}
|
|
1993
2167
|
/**
|
|
@@ -1996,20 +2170,20 @@ export interface ReadableByteStreamController {
|
|
|
1996
2170
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
1997
2171
|
*/
|
|
1998
2172
|
export interface WritableStreamDefaultController {
|
|
1999
|
-
|
|
2173
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2000
2174
|
get signal(): AbortSignal;
|
|
2001
|
-
|
|
2175
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2002
2176
|
error(reason?: any): void;
|
|
2003
2177
|
}
|
|
2004
|
-
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2005
2179
|
export interface TransformStreamDefaultController<O = any> {
|
|
2006
|
-
|
|
2180
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2007
2181
|
get desiredSize(): number | null;
|
|
2008
|
-
|
|
2182
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2009
2183
|
enqueue(chunk?: O): void;
|
|
2010
|
-
|
|
2184
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2011
2185
|
error(reason: any): void;
|
|
2012
|
-
|
|
2186
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2013
2187
|
terminate(): void;
|
|
2014
2188
|
}
|
|
2015
2189
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2021,46 +2195,57 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
2021
2195
|
writable: WritableStream<W>;
|
|
2022
2196
|
readable: ReadableStream<R>;
|
|
2023
2197
|
}
|
|
2198
|
+
/**
|
|
2199
|
+
* 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.
|
|
2200
|
+
*
|
|
2201
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2202
|
+
*/
|
|
2024
2203
|
export declare class WritableStream<W = any> {
|
|
2025
2204
|
constructor(
|
|
2026
2205
|
underlyingSink?: UnderlyingSink,
|
|
2027
2206
|
queuingStrategy?: QueuingStrategy,
|
|
2028
2207
|
);
|
|
2029
|
-
|
|
2208
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2030
2209
|
readonly locked: boolean;
|
|
2031
|
-
|
|
2210
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2032
2211
|
abort(reason?: any): Promise<void>;
|
|
2033
|
-
|
|
2212
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2034
2213
|
close(): Promise<void>;
|
|
2035
|
-
|
|
2214
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2036
2215
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2037
2216
|
}
|
|
2217
|
+
/**
|
|
2218
|
+
* 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.
|
|
2219
|
+
*
|
|
2220
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2221
|
+
*/
|
|
2038
2222
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2039
2223
|
constructor(stream: WritableStream);
|
|
2040
|
-
|
|
2224
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2041
2225
|
readonly closed: Promise<void>;
|
|
2042
|
-
|
|
2226
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2043
2227
|
readonly ready: Promise<void>;
|
|
2044
|
-
|
|
2228
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2045
2229
|
readonly desiredSize: number | null;
|
|
2046
|
-
|
|
2230
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2047
2231
|
abort(reason?: any): Promise<void>;
|
|
2048
|
-
|
|
2232
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2049
2233
|
close(): Promise<void>;
|
|
2050
|
-
|
|
2234
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2051
2235
|
write(chunk?: W): Promise<void>;
|
|
2052
|
-
|
|
2236
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2053
2237
|
releaseLock(): void;
|
|
2054
2238
|
}
|
|
2239
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2055
2240
|
export declare class TransformStream<I = any, O = any> {
|
|
2056
2241
|
constructor(
|
|
2057
2242
|
transformer?: Transformer<I, O>,
|
|
2058
2243
|
writableStrategy?: QueuingStrategy<I>,
|
|
2059
2244
|
readableStrategy?: QueuingStrategy<O>,
|
|
2060
2245
|
);
|
|
2061
|
-
|
|
2246
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2062
2247
|
readonly readable: ReadableStream<O>;
|
|
2063
|
-
|
|
2248
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2064
2249
|
readonly writable: WritableStream<I>;
|
|
2065
2250
|
}
|
|
2066
2251
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2081,18 +2266,21 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2081
2266
|
export interface ReadableStreamValuesOptions {
|
|
2082
2267
|
preventCancel?: boolean;
|
|
2083
2268
|
}
|
|
2269
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2084
2270
|
export declare class CompressionStream extends TransformStream<
|
|
2085
2271
|
ArrayBuffer | ArrayBufferView,
|
|
2086
2272
|
Uint8Array
|
|
2087
2273
|
> {
|
|
2088
2274
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2089
2275
|
}
|
|
2276
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2090
2277
|
export declare class DecompressionStream extends TransformStream<
|
|
2091
2278
|
ArrayBuffer | ArrayBufferView,
|
|
2092
2279
|
Uint8Array
|
|
2093
2280
|
> {
|
|
2094
2281
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2095
2282
|
}
|
|
2283
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2096
2284
|
export declare class TextEncoderStream extends TransformStream<
|
|
2097
2285
|
string,
|
|
2098
2286
|
Uint8Array
|
|
@@ -2100,6 +2288,7 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2100
2288
|
constructor();
|
|
2101
2289
|
get encoding(): string;
|
|
2102
2290
|
}
|
|
2291
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2103
2292
|
export declare class TextDecoderStream extends TransformStream<
|
|
2104
2293
|
ArrayBuffer | ArrayBufferView,
|
|
2105
2294
|
string
|
|
@@ -2113,20 +2302,30 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2113
2302
|
fatal?: boolean;
|
|
2114
2303
|
ignoreBOM?: boolean;
|
|
2115
2304
|
}
|
|
2305
|
+
/**
|
|
2306
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2307
|
+
*
|
|
2308
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2309
|
+
*/
|
|
2116
2310
|
export declare class ByteLengthQueuingStrategy
|
|
2117
2311
|
implements QueuingStrategy<ArrayBufferView>
|
|
2118
2312
|
{
|
|
2119
2313
|
constructor(init: QueuingStrategyInit);
|
|
2120
|
-
|
|
2314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2121
2315
|
get highWaterMark(): number;
|
|
2122
|
-
|
|
2316
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2123
2317
|
get size(): (chunk?: any) => number;
|
|
2124
2318
|
}
|
|
2319
|
+
/**
|
|
2320
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2321
|
+
*
|
|
2322
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2323
|
+
*/
|
|
2125
2324
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2126
2325
|
constructor(init: QueuingStrategyInit);
|
|
2127
|
-
|
|
2326
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2128
2327
|
get highWaterMark(): number;
|
|
2129
|
-
|
|
2328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2130
2329
|
get size(): (chunk?: any) => number;
|
|
2131
2330
|
}
|
|
2132
2331
|
export interface QueuingStrategyInit {
|
|
@@ -2170,6 +2369,7 @@ export interface TraceItem {
|
|
|
2170
2369
|
readonly dispatchNamespace?: string;
|
|
2171
2370
|
readonly scriptTags?: string[];
|
|
2172
2371
|
readonly outcome: string;
|
|
2372
|
+
readonly truncated: boolean;
|
|
2173
2373
|
}
|
|
2174
2374
|
export interface TraceItemAlarmEventInfo {
|
|
2175
2375
|
readonly scheduledTime: Date;
|
|
@@ -2251,36 +2451,43 @@ export interface TraceMetrics {
|
|
|
2251
2451
|
export interface UnsafeTraceMetrics {
|
|
2252
2452
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2253
2453
|
}
|
|
2454
|
+
/**
|
|
2455
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2456
|
+
*
|
|
2457
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2458
|
+
*/
|
|
2254
2459
|
export declare class URL {
|
|
2255
2460
|
constructor(url: string | URL, base?: string | URL);
|
|
2256
|
-
|
|
2461
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2257
2462
|
href: string;
|
|
2258
|
-
|
|
2463
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2259
2464
|
readonly origin: string;
|
|
2260
|
-
|
|
2465
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2261
2466
|
protocol: string;
|
|
2262
|
-
|
|
2467
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2263
2468
|
username: string;
|
|
2264
|
-
|
|
2469
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2265
2470
|
password: string;
|
|
2266
|
-
|
|
2471
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2267
2472
|
host: string;
|
|
2268
|
-
|
|
2473
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2269
2474
|
hostname: string;
|
|
2270
|
-
|
|
2475
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2271
2476
|
port: string;
|
|
2272
|
-
|
|
2477
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2273
2478
|
pathname: string;
|
|
2274
|
-
|
|
2479
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2275
2480
|
search: string;
|
|
2276
|
-
|
|
2481
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2277
2482
|
readonly searchParams: URLSearchParams;
|
|
2278
|
-
|
|
2483
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2279
2484
|
hash: string;
|
|
2485
|
+
/*function toString() { [native code] }*/
|
|
2280
2486
|
toString(): string;
|
|
2281
|
-
|
|
2487
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2282
2488
|
toJSON(): string;
|
|
2283
2489
|
}
|
|
2490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2284
2491
|
export declare class URLSearchParams {
|
|
2285
2492
|
constructor(
|
|
2286
2493
|
init?:
|
|
@@ -2289,19 +2496,51 @@ export declare class URLSearchParams {
|
|
|
2289
2496
|
| Record<string, string>
|
|
2290
2497
|
| [key: string, value: string][],
|
|
2291
2498
|
);
|
|
2499
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2292
2500
|
get size(): number;
|
|
2501
|
+
/**
|
|
2502
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2503
|
+
*
|
|
2504
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2505
|
+
*/
|
|
2293
2506
|
append(name: string, value: string): void;
|
|
2507
|
+
/**
|
|
2508
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2509
|
+
*
|
|
2510
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2511
|
+
*/
|
|
2294
2512
|
delete(name: string): void;
|
|
2513
|
+
/**
|
|
2514
|
+
* Returns the first value associated to the given search parameter.
|
|
2515
|
+
*
|
|
2516
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2517
|
+
*/
|
|
2295
2518
|
get(name: string): string | null;
|
|
2519
|
+
/**
|
|
2520
|
+
* Returns all the values association with a given search parameter.
|
|
2521
|
+
*
|
|
2522
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2523
|
+
*/
|
|
2296
2524
|
getAll(name: string): string[];
|
|
2525
|
+
/**
|
|
2526
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2527
|
+
*
|
|
2528
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2529
|
+
*/
|
|
2297
2530
|
has(name: string): boolean;
|
|
2531
|
+
/**
|
|
2532
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2533
|
+
*
|
|
2534
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2535
|
+
*/
|
|
2298
2536
|
set(name: string, value: string): void;
|
|
2537
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2299
2538
|
sort(): void;
|
|
2300
|
-
|
|
2539
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2301
2540
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2302
|
-
|
|
2541
|
+
/* Returns a list of keys in the search params. */
|
|
2303
2542
|
keys(): IterableIterator<string>;
|
|
2304
|
-
|
|
2543
|
+
/* Returns a list of values in the search params. */
|
|
2305
2544
|
values(): IterableIterator<string>;
|
|
2306
2545
|
forEach<This = unknown>(
|
|
2307
2546
|
callback: (
|
|
@@ -2312,6 +2551,7 @@ export declare class URLSearchParams {
|
|
|
2312
2551
|
) => void,
|
|
2313
2552
|
thisArg?: This,
|
|
2314
2553
|
): void;
|
|
2554
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2315
2555
|
toString(): string;
|
|
2316
2556
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2317
2557
|
}
|
|
@@ -2364,6 +2604,11 @@ export interface URLPatternURLPatternResult {
|
|
|
2364
2604
|
export interface URLPatternURLPatternOptions {
|
|
2365
2605
|
ignoreCase?: boolean;
|
|
2366
2606
|
}
|
|
2607
|
+
/**
|
|
2608
|
+
* 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.
|
|
2609
|
+
*
|
|
2610
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2611
|
+
*/
|
|
2367
2612
|
export declare class CloseEvent extends Event {
|
|
2368
2613
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2369
2614
|
/**
|
|
@@ -2390,8 +2635,18 @@ export interface CloseEventInit {
|
|
|
2390
2635
|
reason?: string;
|
|
2391
2636
|
wasClean?: boolean;
|
|
2392
2637
|
}
|
|
2638
|
+
/**
|
|
2639
|
+
* A message received by a target object.
|
|
2640
|
+
*
|
|
2641
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2642
|
+
*/
|
|
2393
2643
|
export declare class MessageEvent extends Event {
|
|
2394
2644
|
constructor(type: string, initializer: MessageEventInit);
|
|
2645
|
+
/**
|
|
2646
|
+
* Returns the data of the message.
|
|
2647
|
+
*
|
|
2648
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2649
|
+
*/
|
|
2395
2650
|
readonly data: ArrayBuffer | string;
|
|
2396
2651
|
}
|
|
2397
2652
|
export interface MessageEventInit {
|
|
@@ -2403,6 +2658,11 @@ export type WebSocketEventMap = {
|
|
|
2403
2658
|
open: Event;
|
|
2404
2659
|
error: ErrorEvent;
|
|
2405
2660
|
};
|
|
2661
|
+
/**
|
|
2662
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2663
|
+
*
|
|
2664
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2665
|
+
*/
|
|
2406
2666
|
export declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2407
2667
|
constructor(url: string, protocols?: string[] | string);
|
|
2408
2668
|
accept(): void;
|
|
@@ -2988,6 +3248,7 @@ export interface GPUOrigin3DDict {
|
|
|
2988
3248
|
y?: number;
|
|
2989
3249
|
z?: number;
|
|
2990
3250
|
}
|
|
3251
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
2991
3252
|
export declare class EventSource {
|
|
2992
3253
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2993
3254
|
/**
|
|
@@ -3014,17 +3275,17 @@ export declare class EventSource {
|
|
|
3014
3275
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3015
3276
|
*/
|
|
3016
3277
|
get readyState(): number;
|
|
3017
|
-
|
|
3278
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3018
3279
|
get onopen(): any | null;
|
|
3019
|
-
|
|
3280
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3020
3281
|
set onopen(value: any | null);
|
|
3021
|
-
|
|
3282
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3022
3283
|
get onmessage(): any | null;
|
|
3023
|
-
|
|
3284
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3024
3285
|
set onmessage(value: any | null);
|
|
3025
|
-
|
|
3286
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3026
3287
|
get onerror(): any | null;
|
|
3027
|
-
|
|
3288
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3028
3289
|
set onerror(value: any | null);
|
|
3029
3290
|
static readonly CONNECTING: number;
|
|
3030
3291
|
static readonly OPEN: number;
|