@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-01-31/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
|
/**
|
|
@@ -742,6 +774,11 @@ export interface EventListenerObject<EventType extends Event = Event> {
|
|
|
742
774
|
export type EventListenerOrEventListenerObject<
|
|
743
775
|
EventType extends Event = Event,
|
|
744
776
|
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
777
|
+
/**
|
|
778
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
779
|
+
*
|
|
780
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
781
|
+
*/
|
|
745
782
|
export declare class EventTarget<
|
|
746
783
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
747
784
|
> {
|
|
@@ -797,6 +834,11 @@ export interface EventTargetAddEventListenerOptions {
|
|
|
797
834
|
export interface EventTargetHandlerObject {
|
|
798
835
|
handleEvent: (event: Event) => any | undefined;
|
|
799
836
|
}
|
|
837
|
+
/**
|
|
838
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
839
|
+
*
|
|
840
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
841
|
+
*/
|
|
800
842
|
export declare class AbortController {
|
|
801
843
|
constructor();
|
|
802
844
|
/**
|
|
@@ -812,11 +854,17 @@ export declare class AbortController {
|
|
|
812
854
|
*/
|
|
813
855
|
abort(reason?: any): void;
|
|
814
856
|
}
|
|
857
|
+
/**
|
|
858
|
+
* 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.
|
|
859
|
+
*
|
|
860
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
861
|
+
*/
|
|
815
862
|
export declare abstract class AbortSignal extends EventTarget {
|
|
816
|
-
|
|
863
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
817
864
|
static abort(reason?: any): AbortSignal;
|
|
818
|
-
|
|
865
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
819
866
|
static timeout(delay: number): AbortSignal;
|
|
867
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
820
868
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
821
869
|
/**
|
|
822
870
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -824,13 +872,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
824
872
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
825
873
|
*/
|
|
826
874
|
get aborted(): boolean;
|
|
827
|
-
|
|
875
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
828
876
|
get reason(): any;
|
|
829
|
-
|
|
877
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
830
878
|
get onabort(): any | null;
|
|
831
|
-
|
|
879
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
832
880
|
set onabort(value: any | null);
|
|
833
|
-
|
|
881
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
834
882
|
throwIfAborted(): void;
|
|
835
883
|
}
|
|
836
884
|
export interface Scheduler {
|
|
@@ -839,10 +887,16 @@ export interface Scheduler {
|
|
|
839
887
|
export interface SchedulerWaitOptions {
|
|
840
888
|
signal?: AbortSignal;
|
|
841
889
|
}
|
|
890
|
+
/**
|
|
891
|
+
* 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.
|
|
892
|
+
*
|
|
893
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
894
|
+
*/
|
|
842
895
|
export declare abstract class ExtendableEvent extends Event {
|
|
843
|
-
|
|
896
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
844
897
|
waitUntil(promise: Promise<any>): void;
|
|
845
898
|
}
|
|
899
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
846
900
|
export declare class CustomEvent<T = any> extends Event {
|
|
847
901
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
848
902
|
/**
|
|
@@ -858,59 +912,90 @@ export interface CustomEventCustomEventInit {
|
|
|
858
912
|
composed?: boolean;
|
|
859
913
|
detail?: any;
|
|
860
914
|
}
|
|
915
|
+
/**
|
|
916
|
+
* 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.
|
|
917
|
+
*
|
|
918
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
919
|
+
*/
|
|
861
920
|
export declare class Blob {
|
|
862
921
|
constructor(
|
|
863
922
|
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
864
923
|
options?: BlobOptions,
|
|
865
924
|
);
|
|
866
|
-
|
|
925
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
867
926
|
get size(): number;
|
|
868
|
-
|
|
927
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
869
928
|
get type(): string;
|
|
870
|
-
|
|
929
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
871
930
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
872
|
-
|
|
931
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
873
932
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
874
933
|
bytes(): Promise<Uint8Array>;
|
|
875
|
-
|
|
934
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
876
935
|
text(): Promise<string>;
|
|
877
|
-
|
|
936
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
878
937
|
stream(): ReadableStream;
|
|
879
938
|
}
|
|
880
939
|
export interface BlobOptions {
|
|
881
940
|
type?: string;
|
|
882
941
|
}
|
|
942
|
+
/**
|
|
943
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
944
|
+
*
|
|
945
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
946
|
+
*/
|
|
883
947
|
export declare class File extends Blob {
|
|
884
948
|
constructor(
|
|
885
949
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
886
950
|
name: string,
|
|
887
951
|
options?: FileOptions,
|
|
888
952
|
);
|
|
889
|
-
|
|
953
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
890
954
|
get name(): string;
|
|
891
|
-
|
|
955
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
892
956
|
get lastModified(): number;
|
|
893
957
|
}
|
|
894
958
|
export interface FileOptions {
|
|
895
959
|
type?: string;
|
|
896
960
|
lastModified?: number;
|
|
897
961
|
}
|
|
962
|
+
/**
|
|
963
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
964
|
+
*
|
|
965
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
966
|
+
*/
|
|
898
967
|
export declare abstract class CacheStorage {
|
|
899
|
-
|
|
968
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
900
969
|
open(cacheName: string): Promise<Cache>;
|
|
901
970
|
readonly default: Cache;
|
|
902
971
|
}
|
|
972
|
+
/**
|
|
973
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
974
|
+
*
|
|
975
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
976
|
+
*/
|
|
903
977
|
export declare abstract class Cache {
|
|
978
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
904
979
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
980
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
905
981
|
match(
|
|
906
982
|
request: RequestInfo,
|
|
907
983
|
options?: CacheQueryOptions,
|
|
908
984
|
): Promise<Response | undefined>;
|
|
985
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
909
986
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
910
987
|
}
|
|
911
988
|
export interface CacheQueryOptions {
|
|
912
989
|
ignoreMethod?: boolean;
|
|
913
990
|
}
|
|
991
|
+
/**
|
|
992
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
993
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
994
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
995
|
+
* compared to those implemented in most browsers.
|
|
996
|
+
*
|
|
997
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
998
|
+
*/
|
|
914
999
|
export declare abstract class Crypto {
|
|
915
1000
|
/**
|
|
916
1001
|
* Available only in secure contexts.
|
|
@@ -918,7 +1003,7 @@ export declare abstract class Crypto {
|
|
|
918
1003
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
919
1004
|
*/
|
|
920
1005
|
get subtle(): SubtleCrypto;
|
|
921
|
-
|
|
1006
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
922
1007
|
getRandomValues<
|
|
923
1008
|
T extends
|
|
924
1009
|
| Int8Array
|
|
@@ -938,39 +1023,50 @@ export declare abstract class Crypto {
|
|
|
938
1023
|
randomUUID(): string;
|
|
939
1024
|
DigestStream: typeof DigestStream;
|
|
940
1025
|
}
|
|
1026
|
+
/**
|
|
1027
|
+
* 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).
|
|
1028
|
+
* Available only in secure contexts.
|
|
1029
|
+
*
|
|
1030
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1031
|
+
*/
|
|
941
1032
|
export declare abstract class SubtleCrypto {
|
|
1033
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
942
1034
|
encrypt(
|
|
943
1035
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
944
1036
|
key: CryptoKey,
|
|
945
1037
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
946
1038
|
): Promise<ArrayBuffer>;
|
|
1039
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
947
1040
|
decrypt(
|
|
948
1041
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
949
1042
|
key: CryptoKey,
|
|
950
1043
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
951
1044
|
): Promise<ArrayBuffer>;
|
|
1045
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
952
1046
|
sign(
|
|
953
1047
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
954
1048
|
key: CryptoKey,
|
|
955
1049
|
data: ArrayBuffer | ArrayBufferView,
|
|
956
1050
|
): Promise<ArrayBuffer>;
|
|
1051
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
957
1052
|
verify(
|
|
958
1053
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
959
1054
|
key: CryptoKey,
|
|
960
1055
|
signature: ArrayBuffer | ArrayBufferView,
|
|
961
1056
|
data: ArrayBuffer | ArrayBufferView,
|
|
962
1057
|
): Promise<boolean>;
|
|
1058
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
963
1059
|
digest(
|
|
964
1060
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
965
1061
|
data: ArrayBuffer | ArrayBufferView,
|
|
966
1062
|
): Promise<ArrayBuffer>;
|
|
967
|
-
|
|
1063
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
968
1064
|
generateKey(
|
|
969
1065
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
970
1066
|
extractable: boolean,
|
|
971
1067
|
keyUsages: string[],
|
|
972
1068
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
973
|
-
|
|
1069
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
974
1070
|
deriveKey(
|
|
975
1071
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
976
1072
|
baseKey: CryptoKey,
|
|
@@ -978,12 +1074,13 @@ export declare abstract class SubtleCrypto {
|
|
|
978
1074
|
extractable: boolean,
|
|
979
1075
|
keyUsages: string[],
|
|
980
1076
|
): Promise<CryptoKey>;
|
|
1077
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
981
1078
|
deriveBits(
|
|
982
1079
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
983
1080
|
baseKey: CryptoKey,
|
|
984
|
-
length
|
|
1081
|
+
length?: number | null,
|
|
985
1082
|
): Promise<ArrayBuffer>;
|
|
986
|
-
|
|
1083
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
987
1084
|
importKey(
|
|
988
1085
|
format: string,
|
|
989
1086
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -991,14 +1088,16 @@ export declare abstract class SubtleCrypto {
|
|
|
991
1088
|
extractable: boolean,
|
|
992
1089
|
keyUsages: string[],
|
|
993
1090
|
): Promise<CryptoKey>;
|
|
1091
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
994
1092
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1093
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
995
1094
|
wrapKey(
|
|
996
1095
|
format: string,
|
|
997
1096
|
key: CryptoKey,
|
|
998
1097
|
wrappingKey: CryptoKey,
|
|
999
1098
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1000
1099
|
): Promise<ArrayBuffer>;
|
|
1001
|
-
|
|
1100
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
1002
1101
|
unwrapKey(
|
|
1003
1102
|
format: string,
|
|
1004
1103
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1013,12 +1112,18 @@ export declare abstract class SubtleCrypto {
|
|
|
1013
1112
|
b: ArrayBuffer | ArrayBufferView,
|
|
1014
1113
|
): boolean;
|
|
1015
1114
|
}
|
|
1115
|
+
/**
|
|
1116
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1117
|
+
* Available only in secure contexts.
|
|
1118
|
+
*
|
|
1119
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1120
|
+
*/
|
|
1016
1121
|
export declare abstract class CryptoKey {
|
|
1017
|
-
|
|
1122
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1018
1123
|
readonly type: string;
|
|
1019
|
-
|
|
1124
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1020
1125
|
readonly extractable: boolean;
|
|
1021
|
-
|
|
1126
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1022
1127
|
readonly algorithm:
|
|
1023
1128
|
| CryptoKeyKeyAlgorithm
|
|
1024
1129
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1026,7 +1131,7 @@ export declare abstract class CryptoKey {
|
|
|
1026
1131
|
| CryptoKeyRsaKeyAlgorithm
|
|
1027
1132
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1028
1133
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1029
|
-
|
|
1134
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1030
1135
|
readonly usages: string[];
|
|
1031
1136
|
}
|
|
1032
1137
|
export interface CryptoKeyPair {
|
|
@@ -1134,6 +1239,11 @@ export declare class DigestStream extends WritableStream<
|
|
|
1134
1239
|
get digest(): Promise<ArrayBuffer>;
|
|
1135
1240
|
get bytesWritten(): number | bigint;
|
|
1136
1241
|
}
|
|
1242
|
+
/**
|
|
1243
|
+
* 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.
|
|
1244
|
+
*
|
|
1245
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1246
|
+
*/
|
|
1137
1247
|
export declare class TextDecoder {
|
|
1138
1248
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1139
1249
|
/**
|
|
@@ -1159,6 +1269,11 @@ export declare class TextDecoder {
|
|
|
1159
1269
|
get fatal(): boolean;
|
|
1160
1270
|
get ignoreBOM(): boolean;
|
|
1161
1271
|
}
|
|
1272
|
+
/**
|
|
1273
|
+
* 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.
|
|
1274
|
+
*
|
|
1275
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1276
|
+
*/
|
|
1162
1277
|
export declare class TextEncoder {
|
|
1163
1278
|
constructor();
|
|
1164
1279
|
/**
|
|
@@ -1189,17 +1304,22 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1189
1304
|
read: number;
|
|
1190
1305
|
written: number;
|
|
1191
1306
|
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Events providing information related to errors in scripts or in files.
|
|
1309
|
+
*
|
|
1310
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1311
|
+
*/
|
|
1192
1312
|
export declare class ErrorEvent extends Event {
|
|
1193
1313
|
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1194
|
-
|
|
1314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1195
1315
|
get filename(): string;
|
|
1196
|
-
|
|
1316
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1197
1317
|
get message(): string;
|
|
1198
|
-
|
|
1318
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1199
1319
|
get lineno(): number;
|
|
1200
|
-
|
|
1320
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1201
1321
|
get colno(): number;
|
|
1202
|
-
|
|
1322
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1203
1323
|
get error(): any;
|
|
1204
1324
|
}
|
|
1205
1325
|
export interface ErrorEventErrorEventInit {
|
|
@@ -1209,21 +1329,34 @@ export interface ErrorEventErrorEventInit {
|
|
|
1209
1329
|
colno?: number;
|
|
1210
1330
|
error?: any;
|
|
1211
1331
|
}
|
|
1332
|
+
/**
|
|
1333
|
+
* 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".
|
|
1334
|
+
*
|
|
1335
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1336
|
+
*/
|
|
1212
1337
|
export declare class FormData {
|
|
1213
1338
|
constructor();
|
|
1339
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1214
1340
|
append(name: string, value: string): void;
|
|
1341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1215
1342
|
append(name: string, value: Blob, filename?: string): void;
|
|
1343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1216
1344
|
delete(name: string): void;
|
|
1345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1217
1346
|
get(name: string): (File | string) | null;
|
|
1347
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1218
1348
|
getAll(name: string): (File | string)[];
|
|
1349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1219
1350
|
has(name: string): boolean;
|
|
1351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1220
1352
|
set(name: string, value: string): void;
|
|
1353
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1221
1354
|
set(name: string, value: Blob, filename?: string): void;
|
|
1222
|
-
|
|
1355
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1223
1356
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1224
|
-
|
|
1357
|
+
/* Returns a list of keys in the list. */
|
|
1225
1358
|
keys(): IterableIterator<string>;
|
|
1226
|
-
|
|
1359
|
+
/* Returns a list of values in the list. */
|
|
1227
1360
|
values(): IterableIterator<File | string>;
|
|
1228
1361
|
forEach<This = unknown>(
|
|
1229
1362
|
callback: (
|
|
@@ -1309,10 +1442,15 @@ export interface Text {
|
|
|
1309
1442
|
export interface DocumentEnd {
|
|
1310
1443
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1311
1444
|
}
|
|
1445
|
+
/**
|
|
1446
|
+
* 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.
|
|
1447
|
+
*
|
|
1448
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1449
|
+
*/
|
|
1312
1450
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1313
|
-
|
|
1451
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1314
1452
|
readonly request: Request;
|
|
1315
|
-
|
|
1453
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1316
1454
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1317
1455
|
passThroughOnException(): void;
|
|
1318
1456
|
}
|
|
@@ -1320,23 +1458,33 @@ export type HeadersInit =
|
|
|
1320
1458
|
| Headers
|
|
1321
1459
|
| Iterable<Iterable<string>>
|
|
1322
1460
|
| Record<string, string>;
|
|
1461
|
+
/**
|
|
1462
|
+
* 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.
|
|
1463
|
+
*
|
|
1464
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1465
|
+
*/
|
|
1323
1466
|
export declare class Headers {
|
|
1324
1467
|
constructor(init?: HeadersInit);
|
|
1468
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1325
1469
|
get(name: string): string | null;
|
|
1326
1470
|
getAll(name: string): string[];
|
|
1471
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1327
1472
|
has(name: string): boolean;
|
|
1473
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1328
1474
|
set(name: string, value: string): void;
|
|
1475
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1329
1476
|
append(name: string, value: string): void;
|
|
1477
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1330
1478
|
delete(name: string): void;
|
|
1331
1479
|
forEach<This = unknown>(
|
|
1332
1480
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1333
1481
|
thisArg?: This,
|
|
1334
1482
|
): void;
|
|
1335
|
-
|
|
1483
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1336
1484
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1337
|
-
|
|
1485
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1338
1486
|
keys(): IterableIterator<string>;
|
|
1339
|
-
|
|
1487
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1340
1488
|
values(): IterableIterator<string>;
|
|
1341
1489
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1342
1490
|
}
|
|
@@ -1349,34 +1497,46 @@ export type BodyInit =
|
|
|
1349
1497
|
| URLSearchParams
|
|
1350
1498
|
| FormData;
|
|
1351
1499
|
export declare abstract class Body {
|
|
1500
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1352
1501
|
get body(): ReadableStream | null;
|
|
1502
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1353
1503
|
get bodyUsed(): boolean;
|
|
1504
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1354
1505
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1355
1506
|
bytes(): Promise<Uint8Array>;
|
|
1507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1356
1508
|
text(): Promise<string>;
|
|
1509
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1357
1510
|
json<T>(): Promise<T>;
|
|
1511
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1358
1512
|
formData(): Promise<FormData>;
|
|
1513
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1359
1514
|
blob(): Promise<Blob>;
|
|
1360
1515
|
}
|
|
1516
|
+
/**
|
|
1517
|
+
* This Fetch API interface represents the response to a request.
|
|
1518
|
+
*
|
|
1519
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1520
|
+
*/
|
|
1361
1521
|
export declare class Response extends Body {
|
|
1362
1522
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1363
|
-
|
|
1523
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1364
1524
|
static redirect(url: string, status?: number): Response;
|
|
1365
|
-
|
|
1525
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1366
1526
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1367
|
-
|
|
1527
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1368
1528
|
clone(): Response;
|
|
1369
|
-
|
|
1529
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1370
1530
|
get status(): number;
|
|
1371
|
-
|
|
1531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1372
1532
|
get statusText(): string;
|
|
1373
|
-
|
|
1533
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1374
1534
|
get headers(): Headers;
|
|
1375
|
-
|
|
1535
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1376
1536
|
get ok(): boolean;
|
|
1377
|
-
|
|
1537
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1378
1538
|
get redirected(): boolean;
|
|
1379
|
-
|
|
1539
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1380
1540
|
get url(): string;
|
|
1381
1541
|
get webSocket(): WebSocket | null;
|
|
1382
1542
|
get cf(): any | undefined;
|
|
@@ -1393,12 +1553,17 @@ export type RequestInfo<
|
|
|
1393
1553
|
CfHostMetadata = unknown,
|
|
1394
1554
|
Cf = CfProperties<CfHostMetadata>,
|
|
1395
1555
|
> = Request<CfHostMetadata, Cf> | string | URL;
|
|
1556
|
+
/**
|
|
1557
|
+
* This Fetch API interface represents a resource request.
|
|
1558
|
+
*
|
|
1559
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1560
|
+
*/
|
|
1396
1561
|
export declare class Request<
|
|
1397
1562
|
CfHostMetadata = unknown,
|
|
1398
1563
|
Cf = CfProperties<CfHostMetadata>,
|
|
1399
1564
|
> extends Body {
|
|
1400
1565
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1401
|
-
|
|
1566
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1402
1567
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1403
1568
|
/**
|
|
1404
1569
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1444,21 +1609,29 @@ export declare class Request<
|
|
|
1444
1609
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
1445
1610
|
*/
|
|
1446
1611
|
get keepalive(): boolean;
|
|
1612
|
+
/**
|
|
1613
|
+
* Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
|
|
1614
|
+
*
|
|
1615
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
1616
|
+
*/
|
|
1617
|
+
get cache(): string | undefined;
|
|
1447
1618
|
}
|
|
1448
1619
|
export interface RequestInit<Cf = CfProperties> {
|
|
1449
|
-
|
|
1620
|
+
/* A string to set request's method. */
|
|
1450
1621
|
method?: string;
|
|
1451
|
-
|
|
1622
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1452
1623
|
headers?: HeadersInit;
|
|
1453
|
-
|
|
1624
|
+
/* A BodyInit object or null to set request's body. */
|
|
1454
1625
|
body?: BodyInit | null;
|
|
1455
|
-
|
|
1626
|
+
/* 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. */
|
|
1456
1627
|
redirect?: string;
|
|
1457
1628
|
fetcher?: Fetcher | null;
|
|
1458
1629
|
cf?: Cf;
|
|
1459
|
-
|
|
1630
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
1631
|
+
cache?: string;
|
|
1632
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1460
1633
|
integrity?: string;
|
|
1461
|
-
|
|
1634
|
+
/* An AbortSignal to set request's signal. */
|
|
1462
1635
|
signal?: AbortSignal | null;
|
|
1463
1636
|
}
|
|
1464
1637
|
export type Service<
|
|
@@ -1891,31 +2064,36 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
1891
2064
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1892
2065
|
*/
|
|
1893
2066
|
export interface ReadableStream<R = any> {
|
|
1894
|
-
|
|
2067
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1895
2068
|
get locked(): boolean;
|
|
1896
|
-
|
|
2069
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1897
2070
|
cancel(reason?: any): Promise<void>;
|
|
1898
|
-
|
|
2071
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1899
2072
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1900
|
-
|
|
2073
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1901
2074
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1902
|
-
|
|
2075
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1903
2076
|
pipeThrough<T>(
|
|
1904
2077
|
transform: ReadableWritablePair<T, R>,
|
|
1905
2078
|
options?: StreamPipeOptions,
|
|
1906
2079
|
): ReadableStream<T>;
|
|
1907
|
-
|
|
2080
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1908
2081
|
pipeTo(
|
|
1909
2082
|
destination: WritableStream<R>,
|
|
1910
2083
|
options?: StreamPipeOptions,
|
|
1911
2084
|
): Promise<void>;
|
|
1912
|
-
|
|
2085
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1913
2086
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1914
2087
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1915
2088
|
[Symbol.asyncIterator](
|
|
1916
2089
|
options?: ReadableStreamValuesOptions,
|
|
1917
2090
|
): AsyncIterableIterator<R>;
|
|
1918
2091
|
}
|
|
2092
|
+
/**
|
|
2093
|
+
* 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.
|
|
2094
|
+
*
|
|
2095
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2096
|
+
*/
|
|
1919
2097
|
export declare const ReadableStream: {
|
|
1920
2098
|
prototype: ReadableStream;
|
|
1921
2099
|
new (
|
|
@@ -1927,24 +2105,26 @@ export declare const ReadableStream: {
|
|
|
1927
2105
|
strategy?: QueuingStrategy<R>,
|
|
1928
2106
|
): ReadableStream<R>;
|
|
1929
2107
|
};
|
|
2108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1930
2109
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
1931
2110
|
constructor(stream: ReadableStream);
|
|
1932
2111
|
get closed(): Promise<void>;
|
|
1933
2112
|
cancel(reason?: any): Promise<void>;
|
|
1934
|
-
|
|
2113
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1935
2114
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1936
|
-
|
|
2115
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1937
2116
|
releaseLock(): void;
|
|
1938
2117
|
}
|
|
2118
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1939
2119
|
export declare class ReadableStreamBYOBReader {
|
|
1940
2120
|
constructor(stream: ReadableStream);
|
|
1941
2121
|
get closed(): Promise<void>;
|
|
1942
2122
|
cancel(reason?: any): Promise<void>;
|
|
1943
|
-
|
|
2123
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1944
2124
|
read<T extends ArrayBufferView>(
|
|
1945
2125
|
view: T,
|
|
1946
2126
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1947
|
-
|
|
2127
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1948
2128
|
releaseLock(): void;
|
|
1949
2129
|
readAtLeast<T extends ArrayBufferView>(
|
|
1950
2130
|
minElements: number,
|
|
@@ -1962,38 +2142,38 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
1962
2142
|
*/
|
|
1963
2143
|
mode: "byob";
|
|
1964
2144
|
}
|
|
1965
|
-
|
|
2145
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1966
2146
|
export interface ReadableStreamBYOBRequest {
|
|
1967
|
-
|
|
2147
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1968
2148
|
get view(): Uint8Array | null;
|
|
1969
|
-
|
|
2149
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1970
2150
|
respond(bytesWritten: number): void;
|
|
1971
|
-
|
|
2151
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1972
2152
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1973
2153
|
get atLeast(): number | null;
|
|
1974
2154
|
}
|
|
1975
|
-
|
|
2155
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1976
2156
|
export interface ReadableStreamDefaultController<R = any> {
|
|
1977
|
-
|
|
2157
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1978
2158
|
get desiredSize(): number | null;
|
|
1979
|
-
|
|
2159
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1980
2160
|
close(): void;
|
|
1981
|
-
|
|
2161
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1982
2162
|
enqueue(chunk?: R): void;
|
|
1983
|
-
|
|
2163
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
1984
2164
|
error(reason: any): void;
|
|
1985
2165
|
}
|
|
1986
|
-
|
|
2166
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
1987
2167
|
export interface ReadableByteStreamController {
|
|
1988
|
-
|
|
2168
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
1989
2169
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
1990
|
-
|
|
2170
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
1991
2171
|
get desiredSize(): number | null;
|
|
1992
|
-
|
|
2172
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
1993
2173
|
close(): void;
|
|
1994
|
-
|
|
2174
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
1995
2175
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
1996
|
-
|
|
2176
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
1997
2177
|
error(reason: any): void;
|
|
1998
2178
|
}
|
|
1999
2179
|
/**
|
|
@@ -2002,20 +2182,20 @@ export interface ReadableByteStreamController {
|
|
|
2002
2182
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2003
2183
|
*/
|
|
2004
2184
|
export interface WritableStreamDefaultController {
|
|
2005
|
-
|
|
2185
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2006
2186
|
get signal(): AbortSignal;
|
|
2007
|
-
|
|
2187
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2008
2188
|
error(reason?: any): void;
|
|
2009
2189
|
}
|
|
2010
|
-
|
|
2190
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2011
2191
|
export interface TransformStreamDefaultController<O = any> {
|
|
2012
|
-
|
|
2192
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2013
2193
|
get desiredSize(): number | null;
|
|
2014
|
-
|
|
2194
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2015
2195
|
enqueue(chunk?: O): void;
|
|
2016
|
-
|
|
2196
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2017
2197
|
error(reason: any): void;
|
|
2018
|
-
|
|
2198
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2019
2199
|
terminate(): void;
|
|
2020
2200
|
}
|
|
2021
2201
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2027,46 +2207,57 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
2027
2207
|
writable: WritableStream<W>;
|
|
2028
2208
|
readable: ReadableStream<R>;
|
|
2029
2209
|
}
|
|
2210
|
+
/**
|
|
2211
|
+
* 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.
|
|
2212
|
+
*
|
|
2213
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2214
|
+
*/
|
|
2030
2215
|
export declare class WritableStream<W = any> {
|
|
2031
2216
|
constructor(
|
|
2032
2217
|
underlyingSink?: UnderlyingSink,
|
|
2033
2218
|
queuingStrategy?: QueuingStrategy,
|
|
2034
2219
|
);
|
|
2035
|
-
|
|
2220
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2036
2221
|
get locked(): boolean;
|
|
2037
|
-
|
|
2222
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2038
2223
|
abort(reason?: any): Promise<void>;
|
|
2039
|
-
|
|
2224
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2040
2225
|
close(): Promise<void>;
|
|
2041
|
-
|
|
2226
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2042
2227
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2043
2228
|
}
|
|
2229
|
+
/**
|
|
2230
|
+
* 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.
|
|
2231
|
+
*
|
|
2232
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2233
|
+
*/
|
|
2044
2234
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2045
2235
|
constructor(stream: WritableStream);
|
|
2046
|
-
|
|
2236
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2047
2237
|
get closed(): Promise<void>;
|
|
2048
|
-
|
|
2238
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2049
2239
|
get ready(): Promise<void>;
|
|
2050
|
-
|
|
2240
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2051
2241
|
get desiredSize(): number | null;
|
|
2052
|
-
|
|
2242
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2053
2243
|
abort(reason?: any): Promise<void>;
|
|
2054
|
-
|
|
2244
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2055
2245
|
close(): Promise<void>;
|
|
2056
|
-
|
|
2246
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2057
2247
|
write(chunk?: W): Promise<void>;
|
|
2058
|
-
|
|
2248
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2059
2249
|
releaseLock(): void;
|
|
2060
2250
|
}
|
|
2251
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2061
2252
|
export declare class TransformStream<I = any, O = any> {
|
|
2062
2253
|
constructor(
|
|
2063
2254
|
transformer?: Transformer<I, O>,
|
|
2064
2255
|
writableStrategy?: QueuingStrategy<I>,
|
|
2065
2256
|
readableStrategy?: QueuingStrategy<O>,
|
|
2066
2257
|
);
|
|
2067
|
-
|
|
2258
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2068
2259
|
get readable(): ReadableStream<O>;
|
|
2069
|
-
|
|
2260
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2070
2261
|
get writable(): WritableStream<I>;
|
|
2071
2262
|
}
|
|
2072
2263
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2087,18 +2278,21 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2087
2278
|
export interface ReadableStreamValuesOptions {
|
|
2088
2279
|
preventCancel?: boolean;
|
|
2089
2280
|
}
|
|
2281
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2090
2282
|
export declare class CompressionStream extends TransformStream<
|
|
2091
2283
|
ArrayBuffer | ArrayBufferView,
|
|
2092
2284
|
Uint8Array
|
|
2093
2285
|
> {
|
|
2094
2286
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2095
2287
|
}
|
|
2288
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2096
2289
|
export declare class DecompressionStream extends TransformStream<
|
|
2097
2290
|
ArrayBuffer | ArrayBufferView,
|
|
2098
2291
|
Uint8Array
|
|
2099
2292
|
> {
|
|
2100
2293
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2101
2294
|
}
|
|
2295
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2102
2296
|
export declare class TextEncoderStream extends TransformStream<
|
|
2103
2297
|
string,
|
|
2104
2298
|
Uint8Array
|
|
@@ -2106,6 +2300,7 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2106
2300
|
constructor();
|
|
2107
2301
|
get encoding(): string;
|
|
2108
2302
|
}
|
|
2303
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2109
2304
|
export declare class TextDecoderStream extends TransformStream<
|
|
2110
2305
|
ArrayBuffer | ArrayBufferView,
|
|
2111
2306
|
string
|
|
@@ -2119,20 +2314,30 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2119
2314
|
fatal?: boolean;
|
|
2120
2315
|
ignoreBOM?: boolean;
|
|
2121
2316
|
}
|
|
2317
|
+
/**
|
|
2318
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2319
|
+
*
|
|
2320
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2321
|
+
*/
|
|
2122
2322
|
export declare class ByteLengthQueuingStrategy
|
|
2123
2323
|
implements QueuingStrategy<ArrayBufferView>
|
|
2124
2324
|
{
|
|
2125
2325
|
constructor(init: QueuingStrategyInit);
|
|
2126
|
-
|
|
2326
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2127
2327
|
get highWaterMark(): number;
|
|
2128
|
-
|
|
2328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2129
2329
|
get size(): (chunk?: any) => number;
|
|
2130
2330
|
}
|
|
2331
|
+
/**
|
|
2332
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2333
|
+
*
|
|
2334
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2335
|
+
*/
|
|
2131
2336
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2132
2337
|
constructor(init: QueuingStrategyInit);
|
|
2133
|
-
|
|
2338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2134
2339
|
get highWaterMark(): number;
|
|
2135
|
-
|
|
2340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2136
2341
|
get size(): (chunk?: any) => number;
|
|
2137
2342
|
}
|
|
2138
2343
|
export interface QueuingStrategyInit {
|
|
@@ -2176,6 +2381,7 @@ export interface TraceItem {
|
|
|
2176
2381
|
readonly dispatchNamespace?: string;
|
|
2177
2382
|
readonly scriptTags?: string[];
|
|
2178
2383
|
readonly outcome: string;
|
|
2384
|
+
readonly truncated: boolean;
|
|
2179
2385
|
}
|
|
2180
2386
|
export interface TraceItemAlarmEventInfo {
|
|
2181
2387
|
readonly scheduledTime: Date;
|
|
@@ -2257,56 +2463,63 @@ export interface TraceMetrics {
|
|
|
2257
2463
|
export interface UnsafeTraceMetrics {
|
|
2258
2464
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2259
2465
|
}
|
|
2466
|
+
/**
|
|
2467
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2468
|
+
*
|
|
2469
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2470
|
+
*/
|
|
2260
2471
|
export declare class URL {
|
|
2261
2472
|
constructor(url: string | URL, base?: string | URL);
|
|
2262
|
-
|
|
2473
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2263
2474
|
get href(): string;
|
|
2264
|
-
|
|
2475
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2265
2476
|
set href(value: string);
|
|
2266
|
-
|
|
2477
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2267
2478
|
get origin(): string;
|
|
2268
|
-
|
|
2479
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2269
2480
|
get protocol(): string;
|
|
2270
|
-
|
|
2481
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2271
2482
|
set protocol(value: string);
|
|
2272
|
-
|
|
2483
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2273
2484
|
get username(): string;
|
|
2274
|
-
|
|
2485
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2275
2486
|
set username(value: string);
|
|
2276
|
-
|
|
2487
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2277
2488
|
get password(): string;
|
|
2278
|
-
|
|
2489
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2279
2490
|
set password(value: string);
|
|
2280
|
-
|
|
2491
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2281
2492
|
get host(): string;
|
|
2282
|
-
|
|
2493
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2283
2494
|
set host(value: string);
|
|
2284
|
-
|
|
2495
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2285
2496
|
get hostname(): string;
|
|
2286
|
-
|
|
2497
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2287
2498
|
set hostname(value: string);
|
|
2288
|
-
|
|
2499
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2289
2500
|
get port(): string;
|
|
2290
|
-
|
|
2501
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2291
2502
|
set port(value: string);
|
|
2292
|
-
|
|
2503
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2293
2504
|
get pathname(): string;
|
|
2294
|
-
|
|
2505
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2295
2506
|
set pathname(value: string);
|
|
2296
|
-
|
|
2507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2297
2508
|
get search(): string;
|
|
2298
|
-
|
|
2509
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2299
2510
|
set search(value: string);
|
|
2300
|
-
|
|
2511
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2301
2512
|
get searchParams(): URLSearchParams;
|
|
2302
|
-
|
|
2513
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2303
2514
|
get hash(): string;
|
|
2304
|
-
|
|
2515
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2305
2516
|
set hash(value: string);
|
|
2517
|
+
/*function toString() { [native code] }*/
|
|
2306
2518
|
toString(): string;
|
|
2307
|
-
|
|
2519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2308
2520
|
toJSON(): string;
|
|
2309
2521
|
}
|
|
2522
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2310
2523
|
export declare class URLSearchParams {
|
|
2311
2524
|
constructor(
|
|
2312
2525
|
init?:
|
|
@@ -2315,19 +2528,51 @@ export declare class URLSearchParams {
|
|
|
2315
2528
|
| Record<string, string>
|
|
2316
2529
|
| [key: string, value: string][],
|
|
2317
2530
|
);
|
|
2531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2318
2532
|
get size(): number;
|
|
2533
|
+
/**
|
|
2534
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2535
|
+
*
|
|
2536
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2537
|
+
*/
|
|
2319
2538
|
append(name: string, value: string): void;
|
|
2539
|
+
/**
|
|
2540
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2541
|
+
*
|
|
2542
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2543
|
+
*/
|
|
2320
2544
|
delete(name: string): void;
|
|
2545
|
+
/**
|
|
2546
|
+
* Returns the first value associated to the given search parameter.
|
|
2547
|
+
*
|
|
2548
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2549
|
+
*/
|
|
2321
2550
|
get(name: string): string | null;
|
|
2551
|
+
/**
|
|
2552
|
+
* Returns all the values association with a given search parameter.
|
|
2553
|
+
*
|
|
2554
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2555
|
+
*/
|
|
2322
2556
|
getAll(name: string): string[];
|
|
2557
|
+
/**
|
|
2558
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2559
|
+
*
|
|
2560
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2561
|
+
*/
|
|
2323
2562
|
has(name: string): boolean;
|
|
2563
|
+
/**
|
|
2564
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2565
|
+
*
|
|
2566
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2567
|
+
*/
|
|
2324
2568
|
set(name: string, value: string): void;
|
|
2569
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2325
2570
|
sort(): void;
|
|
2326
|
-
|
|
2571
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2327
2572
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2328
|
-
|
|
2573
|
+
/* Returns a list of keys in the search params. */
|
|
2329
2574
|
keys(): IterableIterator<string>;
|
|
2330
|
-
|
|
2575
|
+
/* Returns a list of values in the search params. */
|
|
2331
2576
|
values(): IterableIterator<string>;
|
|
2332
2577
|
forEach<This = unknown>(
|
|
2333
2578
|
callback: (
|
|
@@ -2338,6 +2583,7 @@ export declare class URLSearchParams {
|
|
|
2338
2583
|
) => void,
|
|
2339
2584
|
thisArg?: This,
|
|
2340
2585
|
): void;
|
|
2586
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2341
2587
|
toString(): string;
|
|
2342
2588
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2343
2589
|
}
|
|
@@ -2390,6 +2636,11 @@ export interface URLPatternURLPatternResult {
|
|
|
2390
2636
|
export interface URLPatternURLPatternOptions {
|
|
2391
2637
|
ignoreCase?: boolean;
|
|
2392
2638
|
}
|
|
2639
|
+
/**
|
|
2640
|
+
* 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.
|
|
2641
|
+
*
|
|
2642
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2643
|
+
*/
|
|
2393
2644
|
export declare class CloseEvent extends Event {
|
|
2394
2645
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2395
2646
|
/**
|
|
@@ -2416,8 +2667,18 @@ export interface CloseEventInit {
|
|
|
2416
2667
|
reason?: string;
|
|
2417
2668
|
wasClean?: boolean;
|
|
2418
2669
|
}
|
|
2670
|
+
/**
|
|
2671
|
+
* A message received by a target object.
|
|
2672
|
+
*
|
|
2673
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2674
|
+
*/
|
|
2419
2675
|
export declare class MessageEvent extends Event {
|
|
2420
2676
|
constructor(type: string, initializer: MessageEventInit);
|
|
2677
|
+
/**
|
|
2678
|
+
* Returns the data of the message.
|
|
2679
|
+
*
|
|
2680
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2681
|
+
*/
|
|
2421
2682
|
readonly data: ArrayBuffer | string;
|
|
2422
2683
|
}
|
|
2423
2684
|
export interface MessageEventInit {
|
|
@@ -2429,6 +2690,11 @@ export type WebSocketEventMap = {
|
|
|
2429
2690
|
open: Event;
|
|
2430
2691
|
error: ErrorEvent;
|
|
2431
2692
|
};
|
|
2693
|
+
/**
|
|
2694
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2695
|
+
*
|
|
2696
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2697
|
+
*/
|
|
2432
2698
|
export declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2433
2699
|
constructor(url: string, protocols?: string[] | string);
|
|
2434
2700
|
accept(): void;
|
|
@@ -3014,6 +3280,7 @@ export interface GPUOrigin3DDict {
|
|
|
3014
3280
|
y?: number;
|
|
3015
3281
|
z?: number;
|
|
3016
3282
|
}
|
|
3283
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3017
3284
|
export declare class EventSource {
|
|
3018
3285
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3019
3286
|
/**
|
|
@@ -3040,17 +3307,17 @@ export declare class EventSource {
|
|
|
3040
3307
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3041
3308
|
*/
|
|
3042
3309
|
get readyState(): number;
|
|
3043
|
-
|
|
3310
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3044
3311
|
get onopen(): any | null;
|
|
3045
|
-
|
|
3312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3046
3313
|
set onopen(value: any | null);
|
|
3047
|
-
|
|
3314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3048
3315
|
get onmessage(): any | null;
|
|
3049
|
-
|
|
3316
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3050
3317
|
set onmessage(value: any | null);
|
|
3051
|
-
|
|
3318
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3052
3319
|
get onerror(): any | null;
|
|
3053
|
-
|
|
3320
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3054
3321
|
set onerror(value: any | null);
|
|
3055
3322
|
static readonly CONNECTING: number;
|
|
3056
3323
|
static readonly OPEN: number;
|