@cloudflare/workers-types 4.20240701.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 +891 -634
- package/2021-11-03/index.ts +637 -359
- package/2022-01-31/index.d.ts +907 -644
- package/2022-01-31/index.ts +653 -369
- package/2022-03-21/index.d.ts +911 -650
- package/2022-03-21/index.ts +657 -375
- package/2022-08-04/index.d.ts +911 -650
- package/2022-08-04/index.ts +657 -375
- package/2022-10-31/index.d.ts +912 -651
- package/2022-10-31/index.ts +658 -376
- package/2022-11-30/index.d.ts +912 -642
- package/2022-11-30/index.ts +663 -372
- package/2023-03-01/index.d.ts +913 -642
- package/2023-03-01/index.ts +664 -372
- package/2023-07-01/index.d.ts +913 -642
- package/2023-07-01/index.ts +664 -372
- package/experimental/index.d.ts +920 -649
- package/experimental/index.ts +664 -372
- package/index.d.ts +891 -634
- package/index.ts +637 -359
- package/oldest/index.d.ts +891 -634
- package/oldest/index.ts +637 -359
- 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
|
*/
|
|
@@ -279,16 +285,16 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
279
285
|
FixedLengthStream: typeof FixedLengthStream;
|
|
280
286
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
281
287
|
HTMLRewriter: typeof HTMLRewriter;
|
|
282
|
-
GPUAdapter: typeof
|
|
283
|
-
GPUOutOfMemoryError: typeof
|
|
284
|
-
GPUValidationError: typeof
|
|
285
|
-
GPUInternalError: typeof
|
|
286
|
-
GPUDeviceLostInfo: typeof
|
|
287
|
-
GPUBufferUsage: typeof
|
|
288
|
-
GPUShaderStage: typeof
|
|
289
|
-
GPUMapMode: typeof
|
|
290
|
-
GPUTextureUsage: typeof
|
|
291
|
-
GPUColorWrite: typeof
|
|
288
|
+
GPUAdapter: typeof GPUAdapter;
|
|
289
|
+
GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
|
|
290
|
+
GPUValidationError: typeof GPUValidationError;
|
|
291
|
+
GPUInternalError: typeof GPUInternalError;
|
|
292
|
+
GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
|
|
293
|
+
GPUBufferUsage: typeof GPUBufferUsage;
|
|
294
|
+
GPUShaderStage: typeof GPUShaderStage;
|
|
295
|
+
GPUMapMode: typeof GPUMapMode;
|
|
296
|
+
GPUTextureUsage: typeof GPUTextureUsage;
|
|
297
|
+
GPUColorWrite: typeof GPUColorWrite;
|
|
292
298
|
}
|
|
293
299
|
export declare function addEventListener<
|
|
294
300
|
Type extends keyof WorkerGlobalScopeEventMap,
|
|
@@ -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;
|
|
@@ -2483,60 +2743,58 @@ export interface SocketInfo {
|
|
|
2483
2743
|
remoteAddress?: string;
|
|
2484
2744
|
localAddress?: string;
|
|
2485
2745
|
}
|
|
2486
|
-
export declare abstract class
|
|
2487
|
-
requestDevice(param1?:
|
|
2488
|
-
requestAdapterInfo(unmaskHints?: string[]): Promise<
|
|
2489
|
-
get features():
|
|
2490
|
-
get limits():
|
|
2746
|
+
export declare abstract class GPUAdapter {
|
|
2747
|
+
requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
|
|
2748
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
|
|
2749
|
+
get features(): GPUSupportedFeatures;
|
|
2750
|
+
get limits(): GPUSupportedLimits;
|
|
2491
2751
|
}
|
|
2492
|
-
export interface
|
|
2493
|
-
createBuffer(param1:
|
|
2752
|
+
export interface GPUDevice extends EventTarget {
|
|
2753
|
+
createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
|
|
2494
2754
|
createBindGroupLayout(
|
|
2495
|
-
descriptor:
|
|
2496
|
-
):
|
|
2497
|
-
createBindGroup(descriptor:
|
|
2498
|
-
createSampler(descriptor:
|
|
2499
|
-
createShaderModule(
|
|
2500
|
-
descriptor: gpuGPUShaderModuleDescriptor,
|
|
2501
|
-
): gpuGPUShaderModule;
|
|
2755
|
+
descriptor: GPUBindGroupLayoutDescriptor,
|
|
2756
|
+
): GPUBindGroupLayout;
|
|
2757
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
2758
|
+
createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
|
|
2759
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
2502
2760
|
createPipelineLayout(
|
|
2503
|
-
descriptor:
|
|
2504
|
-
):
|
|
2761
|
+
descriptor: GPUPipelineLayoutDescriptor,
|
|
2762
|
+
): GPUPipelineLayout;
|
|
2505
2763
|
createComputePipeline(
|
|
2506
|
-
descriptor:
|
|
2507
|
-
):
|
|
2764
|
+
descriptor: GPUComputePipelineDescriptor,
|
|
2765
|
+
): GPUComputePipeline;
|
|
2508
2766
|
createRenderPipeline(
|
|
2509
|
-
descriptor:
|
|
2510
|
-
):
|
|
2767
|
+
descriptor: GPURenderPipelineDescriptor,
|
|
2768
|
+
): GPURenderPipeline;
|
|
2511
2769
|
createCommandEncoder(
|
|
2512
|
-
descriptor?:
|
|
2513
|
-
):
|
|
2514
|
-
createTexture(param1:
|
|
2770
|
+
descriptor?: GPUCommandEncoderDescriptor,
|
|
2771
|
+
): GPUCommandEncoder;
|
|
2772
|
+
createTexture(param1: GPUTextureDescriptor): GPUTexture;
|
|
2515
2773
|
destroy(): void;
|
|
2516
|
-
createQuerySet(descriptor:
|
|
2774
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
2517
2775
|
pushErrorScope(filter: string): void;
|
|
2518
|
-
popErrorScope(): Promise<
|
|
2519
|
-
get queue():
|
|
2520
|
-
get lost(): Promise<
|
|
2521
|
-
get features():
|
|
2522
|
-
get limits():
|
|
2776
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
2777
|
+
get queue(): GPUQueue;
|
|
2778
|
+
get lost(): Promise<GPUDeviceLostInfo>;
|
|
2779
|
+
get features(): GPUSupportedFeatures;
|
|
2780
|
+
get limits(): GPUSupportedLimits;
|
|
2523
2781
|
}
|
|
2524
|
-
export interface
|
|
2782
|
+
export interface GPUDeviceDescriptor {
|
|
2525
2783
|
label?: string;
|
|
2526
2784
|
requiredFeatures?: string[];
|
|
2527
2785
|
requiredLimits?: Record<string, number | bigint>;
|
|
2528
|
-
defaultQueue?:
|
|
2786
|
+
defaultQueue?: GPUQueueDescriptor;
|
|
2529
2787
|
}
|
|
2530
|
-
export interface
|
|
2788
|
+
export interface GPUBufferDescriptor {
|
|
2531
2789
|
label: string;
|
|
2532
2790
|
size: number | bigint;
|
|
2533
2791
|
usage: number;
|
|
2534
2792
|
mappedAtCreation: boolean;
|
|
2535
2793
|
}
|
|
2536
|
-
export interface
|
|
2794
|
+
export interface GPUQueueDescriptor {
|
|
2537
2795
|
label?: string;
|
|
2538
2796
|
}
|
|
2539
|
-
export declare abstract class
|
|
2797
|
+
export declare abstract class GPUBufferUsage {
|
|
2540
2798
|
static readonly MAP_READ: number;
|
|
2541
2799
|
static readonly MAP_WRITE: number;
|
|
2542
2800
|
static readonly COPY_SRC: number;
|
|
@@ -2548,7 +2806,7 @@ export declare abstract class gpuGPUBufferUsage {
|
|
|
2548
2806
|
static readonly INDIRECT: number;
|
|
2549
2807
|
static readonly QUERY_RESOLVE: number;
|
|
2550
2808
|
}
|
|
2551
|
-
export interface
|
|
2809
|
+
export interface GPUBuffer {
|
|
2552
2810
|
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2553
2811
|
unmap(): void;
|
|
2554
2812
|
destroy(): void;
|
|
@@ -2561,59 +2819,59 @@ export interface gpuGPUBuffer {
|
|
|
2561
2819
|
get usage(): number;
|
|
2562
2820
|
get mapState(): string;
|
|
2563
2821
|
}
|
|
2564
|
-
export declare abstract class
|
|
2822
|
+
export declare abstract class GPUShaderStage {
|
|
2565
2823
|
static readonly VERTEX: number;
|
|
2566
2824
|
static readonly FRAGMENT: number;
|
|
2567
2825
|
static readonly COMPUTE: number;
|
|
2568
2826
|
}
|
|
2569
|
-
export interface
|
|
2827
|
+
export interface GPUBindGroupLayoutDescriptor {
|
|
2570
2828
|
label?: string;
|
|
2571
|
-
entries:
|
|
2829
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
2572
2830
|
}
|
|
2573
|
-
export interface
|
|
2831
|
+
export interface GPUBindGroupLayoutEntry {
|
|
2574
2832
|
binding: number;
|
|
2575
2833
|
visibility: number;
|
|
2576
|
-
buffer?:
|
|
2577
|
-
sampler?:
|
|
2578
|
-
texture?:
|
|
2579
|
-
storageTexture?:
|
|
2834
|
+
buffer?: GPUBufferBindingLayout;
|
|
2835
|
+
sampler?: GPUSamplerBindingLayout;
|
|
2836
|
+
texture?: GPUTextureBindingLayout;
|
|
2837
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
2580
2838
|
}
|
|
2581
|
-
export interface
|
|
2839
|
+
export interface GPUStorageTextureBindingLayout {
|
|
2582
2840
|
access?: string;
|
|
2583
2841
|
format: string;
|
|
2584
2842
|
viewDimension?: string;
|
|
2585
2843
|
}
|
|
2586
|
-
export interface
|
|
2844
|
+
export interface GPUTextureBindingLayout {
|
|
2587
2845
|
sampleType?: string;
|
|
2588
2846
|
viewDimension?: string;
|
|
2589
2847
|
multisampled?: boolean;
|
|
2590
2848
|
}
|
|
2591
|
-
export interface
|
|
2849
|
+
export interface GPUSamplerBindingLayout {
|
|
2592
2850
|
type?: string;
|
|
2593
2851
|
}
|
|
2594
|
-
export interface
|
|
2852
|
+
export interface GPUBufferBindingLayout {
|
|
2595
2853
|
type?: string;
|
|
2596
2854
|
hasDynamicOffset?: boolean;
|
|
2597
2855
|
minBindingSize?: number | bigint;
|
|
2598
2856
|
}
|
|
2599
|
-
export interface
|
|
2600
|
-
export interface
|
|
2601
|
-
export interface
|
|
2857
|
+
export interface GPUBindGroupLayout {}
|
|
2858
|
+
export interface GPUBindGroup {}
|
|
2859
|
+
export interface GPUBindGroupDescriptor {
|
|
2602
2860
|
label?: string;
|
|
2603
|
-
layout:
|
|
2604
|
-
entries:
|
|
2861
|
+
layout: GPUBindGroupLayout;
|
|
2862
|
+
entries: GPUBindGroupEntry[];
|
|
2605
2863
|
}
|
|
2606
|
-
export interface
|
|
2864
|
+
export interface GPUBindGroupEntry {
|
|
2607
2865
|
binding: number;
|
|
2608
|
-
resource:
|
|
2866
|
+
resource: GPUBufferBinding | GPUSampler;
|
|
2609
2867
|
}
|
|
2610
|
-
export interface
|
|
2611
|
-
buffer:
|
|
2868
|
+
export interface GPUBufferBinding {
|
|
2869
|
+
buffer: GPUBuffer;
|
|
2612
2870
|
offset?: number | bigint;
|
|
2613
2871
|
size?: number | bigint;
|
|
2614
2872
|
}
|
|
2615
|
-
export interface
|
|
2616
|
-
export interface
|
|
2873
|
+
export interface GPUSampler {}
|
|
2874
|
+
export interface GPUSamplerDescriptor {
|
|
2617
2875
|
label?: string;
|
|
2618
2876
|
addressModeU?: string;
|
|
2619
2877
|
addressModeV?: string;
|
|
@@ -2626,76 +2884,74 @@ export interface gpuGPUSamplerDescriptor {
|
|
|
2626
2884
|
compare: string;
|
|
2627
2885
|
maxAnisotropy?: number;
|
|
2628
2886
|
}
|
|
2629
|
-
export interface
|
|
2630
|
-
getCompilationInfo(): Promise<
|
|
2887
|
+
export interface GPUShaderModule {
|
|
2888
|
+
getCompilationInfo(): Promise<GPUCompilationInfo>;
|
|
2631
2889
|
}
|
|
2632
|
-
export interface
|
|
2890
|
+
export interface GPUShaderModuleDescriptor {
|
|
2633
2891
|
label?: string;
|
|
2634
2892
|
code: string;
|
|
2635
2893
|
}
|
|
2636
|
-
export interface
|
|
2637
|
-
export interface
|
|
2894
|
+
export interface GPUPipelineLayout {}
|
|
2895
|
+
export interface GPUPipelineLayoutDescriptor {
|
|
2638
2896
|
label?: string;
|
|
2639
|
-
bindGroupLayouts:
|
|
2897
|
+
bindGroupLayouts: GPUBindGroupLayout[];
|
|
2640
2898
|
}
|
|
2641
|
-
export interface
|
|
2642
|
-
getBindGroupLayout(index: number):
|
|
2899
|
+
export interface GPUComputePipeline {
|
|
2900
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
2643
2901
|
}
|
|
2644
|
-
export interface
|
|
2902
|
+
export interface GPUComputePipelineDescriptor {
|
|
2645
2903
|
label?: string;
|
|
2646
|
-
compute:
|
|
2647
|
-
layout: string |
|
|
2904
|
+
compute: GPUProgrammableStage;
|
|
2905
|
+
layout: string | GPUPipelineLayout;
|
|
2648
2906
|
}
|
|
2649
|
-
export interface
|
|
2650
|
-
module:
|
|
2907
|
+
export interface GPUProgrammableStage {
|
|
2908
|
+
module: GPUShaderModule;
|
|
2651
2909
|
entryPoint: string;
|
|
2652
2910
|
constants?: Record<string, number>;
|
|
2653
2911
|
}
|
|
2654
|
-
export interface
|
|
2912
|
+
export interface GPUCommandEncoder {
|
|
2655
2913
|
get label(): string;
|
|
2656
2914
|
beginComputePass(
|
|
2657
|
-
descriptor?:
|
|
2658
|
-
):
|
|
2659
|
-
beginRenderPass(
|
|
2660
|
-
descriptor: gpuGPURenderPassDescriptor,
|
|
2661
|
-
): gpuGPURenderPassEncoder;
|
|
2915
|
+
descriptor?: GPUComputePassDescriptor,
|
|
2916
|
+
): GPUComputePassEncoder;
|
|
2917
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
2662
2918
|
copyBufferToBuffer(
|
|
2663
|
-
source:
|
|
2919
|
+
source: GPUBuffer,
|
|
2664
2920
|
sourceOffset: number | bigint,
|
|
2665
|
-
destination:
|
|
2921
|
+
destination: GPUBuffer,
|
|
2666
2922
|
destinationOffset: number | bigint,
|
|
2667
2923
|
size: number | bigint,
|
|
2668
2924
|
): void;
|
|
2669
|
-
finish(param0?:
|
|
2925
|
+
finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
2670
2926
|
copyTextureToBuffer(
|
|
2671
|
-
source:
|
|
2672
|
-
destination:
|
|
2673
|
-
copySize: Iterable<number> |
|
|
2927
|
+
source: GPUImageCopyTexture,
|
|
2928
|
+
destination: GPUImageCopyBuffer,
|
|
2929
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2674
2930
|
): void;
|
|
2675
2931
|
copyBufferToTexture(
|
|
2676
|
-
source:
|
|
2677
|
-
destination:
|
|
2678
|
-
copySize: Iterable<number> |
|
|
2932
|
+
source: GPUImageCopyBuffer,
|
|
2933
|
+
destination: GPUImageCopyTexture,
|
|
2934
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2679
2935
|
): void;
|
|
2680
2936
|
copyTextureToTexture(
|
|
2681
|
-
source:
|
|
2682
|
-
destination:
|
|
2683
|
-
copySize: Iterable<number> |
|
|
2937
|
+
source: GPUImageCopyTexture,
|
|
2938
|
+
destination: GPUImageCopyTexture,
|
|
2939
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2684
2940
|
): void;
|
|
2685
2941
|
clearBuffer(
|
|
2686
|
-
buffer:
|
|
2942
|
+
buffer: GPUBuffer,
|
|
2687
2943
|
offset?: number | bigint,
|
|
2688
2944
|
size?: number | bigint,
|
|
2689
2945
|
): void;
|
|
2690
2946
|
}
|
|
2691
|
-
export interface
|
|
2947
|
+
export interface GPUCommandEncoderDescriptor {
|
|
2692
2948
|
label?: string;
|
|
2693
2949
|
}
|
|
2694
|
-
export interface
|
|
2695
|
-
setPipeline(pipeline:
|
|
2950
|
+
export interface GPUComputePassEncoder {
|
|
2951
|
+
setPipeline(pipeline: GPUComputePipeline): void;
|
|
2696
2952
|
setBindGroup(
|
|
2697
2953
|
index: number,
|
|
2698
|
-
bindGroup:
|
|
2954
|
+
bindGroup: GPUBindGroup | null,
|
|
2699
2955
|
dynamicOffsets?: Iterable<number>,
|
|
2700
2956
|
): void;
|
|
2701
2957
|
dispatchWorkgroups(
|
|
@@ -2705,48 +2961,48 @@ export interface gpuGPUComputePassEncoder {
|
|
|
2705
2961
|
): void;
|
|
2706
2962
|
end(): void;
|
|
2707
2963
|
}
|
|
2708
|
-
export interface
|
|
2964
|
+
export interface GPUComputePassDescriptor {
|
|
2709
2965
|
label?: string;
|
|
2710
|
-
timestampWrites?:
|
|
2966
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
2711
2967
|
}
|
|
2712
|
-
export interface
|
|
2713
|
-
export interface
|
|
2968
|
+
export interface GPUQuerySet {}
|
|
2969
|
+
export interface GPUQuerySetDescriptor {
|
|
2714
2970
|
label?: string;
|
|
2715
2971
|
}
|
|
2716
|
-
export interface
|
|
2717
|
-
querySet:
|
|
2972
|
+
export interface GPUComputePassTimestampWrites {
|
|
2973
|
+
querySet: GPUQuerySet;
|
|
2718
2974
|
beginningOfPassWriteIndex?: number;
|
|
2719
2975
|
endOfPassWriteIndex?: number;
|
|
2720
2976
|
}
|
|
2721
|
-
export interface
|
|
2977
|
+
export interface GPUCommandBufferDescriptor {
|
|
2722
2978
|
label?: string;
|
|
2723
2979
|
}
|
|
2724
|
-
export interface
|
|
2725
|
-
export interface
|
|
2726
|
-
submit(commandBuffers:
|
|
2980
|
+
export interface GPUCommandBuffer {}
|
|
2981
|
+
export interface GPUQueue {
|
|
2982
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
2727
2983
|
writeBuffer(
|
|
2728
|
-
buffer:
|
|
2984
|
+
buffer: GPUBuffer,
|
|
2729
2985
|
bufferOffset: number | bigint,
|
|
2730
2986
|
data: ArrayBuffer | ArrayBufferView,
|
|
2731
2987
|
dataOffset?: number | bigint,
|
|
2732
2988
|
size?: number | bigint,
|
|
2733
2989
|
): void;
|
|
2734
2990
|
}
|
|
2735
|
-
export declare abstract class
|
|
2991
|
+
export declare abstract class GPUMapMode {
|
|
2736
2992
|
static readonly READ: number;
|
|
2737
2993
|
static readonly WRITE: number;
|
|
2738
2994
|
}
|
|
2739
|
-
export interface
|
|
2995
|
+
export interface GPUAdapterInfo {
|
|
2740
2996
|
get vendor(): string;
|
|
2741
2997
|
get architecture(): string;
|
|
2742
2998
|
get device(): string;
|
|
2743
2999
|
get description(): string;
|
|
2744
3000
|
}
|
|
2745
|
-
export interface
|
|
3001
|
+
export interface GPUSupportedFeatures {
|
|
2746
3002
|
has(name: string): boolean;
|
|
2747
3003
|
keys(): string[];
|
|
2748
3004
|
}
|
|
2749
|
-
export interface
|
|
3005
|
+
export interface GPUSupportedLimits {
|
|
2750
3006
|
get maxTextureDimension1D(): number;
|
|
2751
3007
|
get maxTextureDimension2D(): number;
|
|
2752
3008
|
get maxTextureDimension3D(): number;
|
|
@@ -2779,17 +3035,17 @@ export interface gpuGPUSupportedLimits {
|
|
|
2779
3035
|
get maxComputeWorkgroupSizeZ(): number;
|
|
2780
3036
|
get maxComputeWorkgroupsPerDimension(): number;
|
|
2781
3037
|
}
|
|
2782
|
-
export declare abstract class
|
|
3038
|
+
export declare abstract class GPUError {
|
|
2783
3039
|
get message(): string;
|
|
2784
3040
|
}
|
|
2785
|
-
export declare abstract class
|
|
2786
|
-
export declare abstract class
|
|
2787
|
-
export declare abstract class
|
|
2788
|
-
export declare abstract class
|
|
3041
|
+
export declare abstract class GPUOutOfMemoryError extends GPUError {}
|
|
3042
|
+
export declare abstract class GPUInternalError extends GPUError {}
|
|
3043
|
+
export declare abstract class GPUValidationError extends GPUError {}
|
|
3044
|
+
export declare abstract class GPUDeviceLostInfo {
|
|
2789
3045
|
get message(): string;
|
|
2790
3046
|
get reason(): string;
|
|
2791
3047
|
}
|
|
2792
|
-
export interface
|
|
3048
|
+
export interface GPUCompilationMessage {
|
|
2793
3049
|
get message(): string;
|
|
2794
3050
|
get type(): string;
|
|
2795
3051
|
get lineNum(): number;
|
|
@@ -2797,19 +3053,19 @@ export interface gpuGPUCompilationMessage {
|
|
|
2797
3053
|
get offset(): number;
|
|
2798
3054
|
get length(): number;
|
|
2799
3055
|
}
|
|
2800
|
-
export interface
|
|
2801
|
-
get messages():
|
|
3056
|
+
export interface GPUCompilationInfo {
|
|
3057
|
+
get messages(): GPUCompilationMessage[];
|
|
2802
3058
|
}
|
|
2803
|
-
export declare abstract class
|
|
3059
|
+
export declare abstract class GPUTextureUsage {
|
|
2804
3060
|
static readonly COPY_SRC: number;
|
|
2805
3061
|
static readonly COPY_DST: number;
|
|
2806
3062
|
static readonly TEXTURE_BINDING: number;
|
|
2807
3063
|
static readonly STORAGE_BINDING: number;
|
|
2808
3064
|
static readonly RENDER_ATTACHMENT: number;
|
|
2809
3065
|
}
|
|
2810
|
-
export interface
|
|
3066
|
+
export interface GPUTextureDescriptor {
|
|
2811
3067
|
label: string;
|
|
2812
|
-
size: number[] |
|
|
3068
|
+
size: number[] | GPUExtent3DDict;
|
|
2813
3069
|
mipLevelCount?: number;
|
|
2814
3070
|
sampleCount?: number;
|
|
2815
3071
|
dimension?: string;
|
|
@@ -2817,13 +3073,13 @@ export interface gpuGPUTextureDescriptor {
|
|
|
2817
3073
|
usage: number;
|
|
2818
3074
|
viewFormats?: string[];
|
|
2819
3075
|
}
|
|
2820
|
-
export interface
|
|
3076
|
+
export interface GPUExtent3DDict {
|
|
2821
3077
|
width: number;
|
|
2822
3078
|
height?: number;
|
|
2823
3079
|
depthOrArrayLayers?: number;
|
|
2824
3080
|
}
|
|
2825
|
-
export interface
|
|
2826
|
-
createView(descriptor?:
|
|
3081
|
+
export interface GPUTexture {
|
|
3082
|
+
createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
|
|
2827
3083
|
destroy(): void;
|
|
2828
3084
|
get width(): number;
|
|
2829
3085
|
get height(): number;
|
|
@@ -2833,8 +3089,8 @@ export interface gpuGPUTexture {
|
|
|
2833
3089
|
get format(): string;
|
|
2834
3090
|
get usage(): number;
|
|
2835
3091
|
}
|
|
2836
|
-
export interface
|
|
2837
|
-
export interface
|
|
3092
|
+
export interface GPUTextureView {}
|
|
3093
|
+
export interface GPUTextureViewDescriptor {
|
|
2838
3094
|
label: string;
|
|
2839
3095
|
format: string;
|
|
2840
3096
|
dimension: string;
|
|
@@ -2844,91 +3100,91 @@ export interface gpuGPUTextureViewDescriptor {
|
|
|
2844
3100
|
baseArrayLayer?: number;
|
|
2845
3101
|
arrayLayerCount: number;
|
|
2846
3102
|
}
|
|
2847
|
-
export declare abstract class
|
|
3103
|
+
export declare abstract class GPUColorWrite {
|
|
2848
3104
|
static readonly RED: number;
|
|
2849
3105
|
static readonly GREEN: number;
|
|
2850
3106
|
static readonly BLUE: number;
|
|
2851
3107
|
static readonly ALPHA: number;
|
|
2852
3108
|
static readonly ALL: number;
|
|
2853
3109
|
}
|
|
2854
|
-
export interface
|
|
2855
|
-
export interface
|
|
3110
|
+
export interface GPURenderPipeline {}
|
|
3111
|
+
export interface GPURenderPipelineDescriptor {
|
|
2856
3112
|
label?: string;
|
|
2857
|
-
layout: string |
|
|
2858
|
-
vertex:
|
|
2859
|
-
primitive?:
|
|
2860
|
-
depthStencil?:
|
|
2861
|
-
multisample?:
|
|
2862
|
-
fragment?:
|
|
2863
|
-
}
|
|
2864
|
-
export interface
|
|
2865
|
-
module:
|
|
3113
|
+
layout: string | GPUPipelineLayout;
|
|
3114
|
+
vertex: GPUVertexState;
|
|
3115
|
+
primitive?: GPUPrimitiveState;
|
|
3116
|
+
depthStencil?: GPUDepthStencilState;
|
|
3117
|
+
multisample?: GPUMultisampleState;
|
|
3118
|
+
fragment?: GPUFragmentState;
|
|
3119
|
+
}
|
|
3120
|
+
export interface GPUVertexState {
|
|
3121
|
+
module: GPUShaderModule;
|
|
2866
3122
|
entryPoint: string;
|
|
2867
3123
|
constants?: Record<string, number>;
|
|
2868
|
-
buffers?:
|
|
3124
|
+
buffers?: GPUVertexBufferLayout[];
|
|
2869
3125
|
}
|
|
2870
|
-
export interface
|
|
3126
|
+
export interface GPUVertexBufferLayout {
|
|
2871
3127
|
arrayStride: number | bigint;
|
|
2872
3128
|
stepMode?: string;
|
|
2873
|
-
attributes:
|
|
3129
|
+
attributes: GPUVertexAttribute[];
|
|
2874
3130
|
}
|
|
2875
|
-
export interface
|
|
3131
|
+
export interface GPUVertexAttribute {
|
|
2876
3132
|
format: string;
|
|
2877
3133
|
offset: number | bigint;
|
|
2878
3134
|
shaderLocation: number;
|
|
2879
3135
|
}
|
|
2880
|
-
export interface
|
|
3136
|
+
export interface GPUPrimitiveState {
|
|
2881
3137
|
topology?: string;
|
|
2882
3138
|
stripIndexFormat?: string;
|
|
2883
3139
|
frontFace?: string;
|
|
2884
3140
|
cullMode?: string;
|
|
2885
3141
|
unclippedDepth?: boolean;
|
|
2886
3142
|
}
|
|
2887
|
-
export interface
|
|
3143
|
+
export interface GPUStencilFaceState {
|
|
2888
3144
|
compare?: string;
|
|
2889
3145
|
failOp?: string;
|
|
2890
3146
|
depthFailOp?: string;
|
|
2891
3147
|
passOp?: string;
|
|
2892
3148
|
}
|
|
2893
|
-
export interface
|
|
3149
|
+
export interface GPUDepthStencilState {
|
|
2894
3150
|
format: string;
|
|
2895
3151
|
depthWriteEnabled: boolean;
|
|
2896
3152
|
depthCompare: string;
|
|
2897
|
-
stencilFront?:
|
|
2898
|
-
stencilBack?:
|
|
3153
|
+
stencilFront?: GPUStencilFaceState;
|
|
3154
|
+
stencilBack?: GPUStencilFaceState;
|
|
2899
3155
|
stencilReadMask?: number;
|
|
2900
3156
|
stencilWriteMask?: number;
|
|
2901
3157
|
depthBias?: number;
|
|
2902
3158
|
depthBiasSlopeScale?: number;
|
|
2903
3159
|
depthBiasClamp?: number;
|
|
2904
3160
|
}
|
|
2905
|
-
export interface
|
|
3161
|
+
export interface GPUMultisampleState {
|
|
2906
3162
|
count?: number;
|
|
2907
3163
|
mask?: number;
|
|
2908
3164
|
alphaToCoverageEnabled?: boolean;
|
|
2909
3165
|
}
|
|
2910
|
-
export interface
|
|
2911
|
-
module:
|
|
3166
|
+
export interface GPUFragmentState {
|
|
3167
|
+
module: GPUShaderModule;
|
|
2912
3168
|
entryPoint: string;
|
|
2913
3169
|
constants?: Record<string, number>;
|
|
2914
|
-
targets:
|
|
3170
|
+
targets: GPUColorTargetState[];
|
|
2915
3171
|
}
|
|
2916
|
-
export interface
|
|
3172
|
+
export interface GPUColorTargetState {
|
|
2917
3173
|
format: string;
|
|
2918
|
-
blend:
|
|
3174
|
+
blend: GPUBlendState;
|
|
2919
3175
|
writeMask?: number;
|
|
2920
3176
|
}
|
|
2921
|
-
export interface
|
|
2922
|
-
color:
|
|
2923
|
-
alpha:
|
|
3177
|
+
export interface GPUBlendState {
|
|
3178
|
+
color: GPUBlendComponent;
|
|
3179
|
+
alpha: GPUBlendComponent;
|
|
2924
3180
|
}
|
|
2925
|
-
export interface
|
|
3181
|
+
export interface GPUBlendComponent {
|
|
2926
3182
|
operation?: string;
|
|
2927
3183
|
srcFactor?: string;
|
|
2928
3184
|
dstFactor?: string;
|
|
2929
3185
|
}
|
|
2930
|
-
export interface
|
|
2931
|
-
setPipeline(pipeline:
|
|
3186
|
+
export interface GPURenderPassEncoder {
|
|
3187
|
+
setPipeline(pipeline: GPURenderPipeline): void;
|
|
2932
3188
|
draw(
|
|
2933
3189
|
vertexCount: number,
|
|
2934
3190
|
instanceCount?: number,
|
|
@@ -2937,30 +3193,30 @@ export interface gpuGPURenderPassEncoder {
|
|
|
2937
3193
|
): void;
|
|
2938
3194
|
end(): void;
|
|
2939
3195
|
}
|
|
2940
|
-
export interface
|
|
3196
|
+
export interface GPURenderPassDescriptor {
|
|
2941
3197
|
label?: string;
|
|
2942
|
-
colorAttachments:
|
|
2943
|
-
depthStencilAttachment?:
|
|
2944
|
-
occlusionQuerySet?:
|
|
2945
|
-
timestampWrites?:
|
|
3198
|
+
colorAttachments: GPURenderPassColorAttachment[];
|
|
3199
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
3200
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
3201
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
2946
3202
|
maxDrawCount?: number | bigint;
|
|
2947
3203
|
}
|
|
2948
|
-
export interface
|
|
2949
|
-
view:
|
|
3204
|
+
export interface GPURenderPassColorAttachment {
|
|
3205
|
+
view: GPUTextureView;
|
|
2950
3206
|
depthSlice?: number;
|
|
2951
|
-
resolveTarget?:
|
|
2952
|
-
clearValue?: number[] |
|
|
3207
|
+
resolveTarget?: GPUTextureView;
|
|
3208
|
+
clearValue?: number[] | GPUColorDict;
|
|
2953
3209
|
loadOp: string;
|
|
2954
3210
|
storeOp: string;
|
|
2955
3211
|
}
|
|
2956
|
-
export interface
|
|
3212
|
+
export interface GPUColorDict {
|
|
2957
3213
|
r: number;
|
|
2958
3214
|
g: number;
|
|
2959
3215
|
b: number;
|
|
2960
3216
|
a: number;
|
|
2961
3217
|
}
|
|
2962
|
-
export interface
|
|
2963
|
-
view:
|
|
3218
|
+
export interface GPURenderPassDepthStencilAttachment {
|
|
3219
|
+
view: GPUTextureView;
|
|
2964
3220
|
depthClearValue?: number;
|
|
2965
3221
|
depthLoadOp?: string;
|
|
2966
3222
|
depthStoreOp?: string;
|
|
@@ -2970,28 +3226,29 @@ export interface gpuGPURenderPassDepthStencilAttachment {
|
|
|
2970
3226
|
stencilStoreOp?: string;
|
|
2971
3227
|
stencilReadOnly?: boolean;
|
|
2972
3228
|
}
|
|
2973
|
-
export interface
|
|
2974
|
-
querySet:
|
|
3229
|
+
export interface GPURenderPassTimestampWrites {
|
|
3230
|
+
querySet: GPUQuerySet;
|
|
2975
3231
|
beginningOfPassWriteIndex?: number;
|
|
2976
3232
|
endOfPassWriteIndex?: number;
|
|
2977
3233
|
}
|
|
2978
|
-
export interface
|
|
2979
|
-
texture:
|
|
3234
|
+
export interface GPUImageCopyTexture {
|
|
3235
|
+
texture: GPUTexture;
|
|
2980
3236
|
mipLevel?: number;
|
|
2981
|
-
origin?: number[] |
|
|
3237
|
+
origin?: number[] | GPUOrigin3DDict;
|
|
2982
3238
|
aspect?: string;
|
|
2983
3239
|
}
|
|
2984
|
-
export interface
|
|
2985
|
-
buffer:
|
|
3240
|
+
export interface GPUImageCopyBuffer {
|
|
3241
|
+
buffer: GPUBuffer;
|
|
2986
3242
|
offset?: number | bigint;
|
|
2987
3243
|
bytesPerRow?: number;
|
|
2988
3244
|
rowsPerImage?: number;
|
|
2989
3245
|
}
|
|
2990
|
-
export interface
|
|
3246
|
+
export interface GPUOrigin3DDict {
|
|
2991
3247
|
x?: number;
|
|
2992
3248
|
y?: number;
|
|
2993
3249
|
z?: number;
|
|
2994
3250
|
}
|
|
3251
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
2995
3252
|
export declare class EventSource {
|
|
2996
3253
|
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
2997
3254
|
/**
|
|
@@ -3018,17 +3275,17 @@ export declare class EventSource {
|
|
|
3018
3275
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3019
3276
|
*/
|
|
3020
3277
|
get readyState(): number;
|
|
3021
|
-
|
|
3278
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3022
3279
|
get onopen(): any | null;
|
|
3023
|
-
|
|
3280
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3024
3281
|
set onopen(value: any | null);
|
|
3025
|
-
|
|
3282
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3026
3283
|
get onmessage(): any | null;
|
|
3027
|
-
|
|
3284
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3028
3285
|
set onmessage(value: any | null);
|
|
3029
|
-
|
|
3286
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3030
3287
|
get onerror(): any | null;
|
|
3031
|
-
|
|
3288
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3032
3289
|
set onerror(value: any | null);
|
|
3033
3290
|
static readonly CONNECTING: number;
|
|
3034
3291
|
static readonly OPEN: number;
|
|
@@ -4033,7 +4290,7 @@ export interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
|
|
|
4033
4290
|
certNotAfter: "";
|
|
4034
4291
|
}
|
|
4035
4292
|
/** Possible outcomes of TLS verification */
|
|
4036
|
-
export type CertVerificationStatus =
|
|
4293
|
+
export declare type CertVerificationStatus =
|
|
4037
4294
|
/** Authentication succeeded */
|
|
4038
4295
|
| "SUCCESS"
|
|
4039
4296
|
/** No certificate was presented */
|
|
@@ -4051,7 +4308,7 @@ export type CertVerificationStatus =
|
|
|
4051
4308
|
/**
|
|
4052
4309
|
* An upstream endpoint's response to a TCP `keepalive` message from Cloudflare.
|
|
4053
4310
|
*/
|
|
4054
|
-
export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
4311
|
+
export declare type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
4055
4312
|
| 0 /** Unknown */
|
|
4056
4313
|
| 1 /** no keepalives (not found) */
|
|
4057
4314
|
| 2 /** no connection re-use, opening keepalive connection failed */
|
|
@@ -4059,7 +4316,7 @@ export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
|
4059
4316
|
| 4 /** connection re-use, refused by the origin server (`TCP FIN`) */
|
|
4060
4317
|
| 5; /** connection re-use, accepted by the origin server */
|
|
4061
4318
|
/** ISO 3166-1 Alpha-2 codes */
|
|
4062
|
-
export type Iso3166Alpha2Code =
|
|
4319
|
+
export declare type Iso3166Alpha2Code =
|
|
4063
4320
|
| "AD"
|
|
4064
4321
|
| "AE"
|
|
4065
4322
|
| "AF"
|
|
@@ -4310,7 +4567,14 @@ export type Iso3166Alpha2Code =
|
|
|
4310
4567
|
| "ZM"
|
|
4311
4568
|
| "ZW";
|
|
4312
4569
|
/** The 2-letter continent codes Cloudflare uses */
|
|
4313
|
-
export type ContinentCode =
|
|
4570
|
+
export declare type ContinentCode =
|
|
4571
|
+
| "AF"
|
|
4572
|
+
| "AN"
|
|
4573
|
+
| "AS"
|
|
4574
|
+
| "EU"
|
|
4575
|
+
| "NA"
|
|
4576
|
+
| "OC"
|
|
4577
|
+
| "SA";
|
|
4314
4578
|
export type CfProperties<HostMetadata = unknown> =
|
|
4315
4579
|
| IncomingRequestCfProperties<HostMetadata>
|
|
4316
4580
|
| RequestInitCfProperties;
|
|
@@ -4411,7 +4675,7 @@ export interface SendEmail {
|
|
|
4411
4675
|
export declare abstract class EmailEvent extends ExtendableEvent {
|
|
4412
4676
|
readonly message: ForwardableEmailMessage;
|
|
4413
4677
|
}
|
|
4414
|
-
export type EmailExportedHandler<Env = unknown> = (
|
|
4678
|
+
export declare type EmailExportedHandler<Env = unknown> = (
|
|
4415
4679
|
message: ForwardableEmailMessage,
|
|
4416
4680
|
env: Env,
|
|
4417
4681
|
ctx: ExecutionContext,
|
|
@@ -4540,6 +4804,20 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
|
|
|
4540
4804
|
// Key Identifier of the JWK
|
|
4541
4805
|
readonly kid: string;
|
|
4542
4806
|
}
|
|
4807
|
+
export interface RateLimitOptions {
|
|
4808
|
+
key: string;
|
|
4809
|
+
}
|
|
4810
|
+
export interface RateLimitOutcome {
|
|
4811
|
+
success: boolean;
|
|
4812
|
+
}
|
|
4813
|
+
export interface RateLimit {
|
|
4814
|
+
/**
|
|
4815
|
+
* Rate limit a request based on the provided options.
|
|
4816
|
+
* @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
|
|
4817
|
+
* @returns A promise that resolves with the outcome of the rate limit.
|
|
4818
|
+
*/
|
|
4819
|
+
limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
|
|
4820
|
+
}
|
|
4543
4821
|
// Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
|
|
4544
4822
|
// to referenced by `Fetcher`. This is included in the "importable" version of the types which
|
|
4545
4823
|
// strips all `module` blocks.
|