@cloudflare/workers-types 0.20240405.1 → 0.20240712.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 +1229 -600
- package/2021-11-03/index.ts +1016 -366
- package/2022-01-31/index.d.ts +1239 -610
- package/2022-01-31/index.ts +1026 -376
- package/2022-03-21/index.d.ts +1243 -616
- package/2022-03-21/index.ts +1030 -382
- package/2022-08-04/index.d.ts +1243 -616
- package/2022-08-04/index.ts +1030 -382
- package/2022-10-31/index.d.ts +1244 -617
- package/2022-10-31/index.ts +1031 -383
- package/2022-11-30/index.d.ts +1246 -610
- package/2022-11-30/index.ts +1038 -381
- package/2023-03-01/index.d.ts +1247 -610
- package/2023-03-01/index.ts +1039 -381
- package/2023-07-01/index.d.ts +1247 -610
- package/2023-07-01/index.ts +1039 -381
- package/experimental/index.d.ts +1260 -617
- package/experimental/index.ts +1046 -382
- package/index.d.ts +1229 -600
- package/index.ts +1016 -366
- package/oldest/index.d.ts +1229 -600
- package/oldest/index.ts +1016 -366
- package/package.json +1 -1
package/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
|
|
@@ -26,7 +31,6 @@ export declare class DOMException extends Error {
|
|
|
26
31
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
|
|
27
32
|
*/
|
|
28
33
|
readonly code: number;
|
|
29
|
-
readonly stack: any;
|
|
30
34
|
static readonly INDEX_SIZE_ERR: number;
|
|
31
35
|
static readonly DOMSTRING_SIZE_ERR: number;
|
|
32
36
|
static readonly HIERARCHY_REQUEST_ERR: number;
|
|
@@ -52,6 +56,8 @@ export declare class DOMException extends Error {
|
|
|
52
56
|
static readonly TIMEOUT_ERR: number;
|
|
53
57
|
static readonly INVALID_NODE_TYPE_ERR: number;
|
|
54
58
|
static readonly DATA_CLONE_ERR: number;
|
|
59
|
+
get stack(): any;
|
|
60
|
+
set stack(value: any);
|
|
55
61
|
}
|
|
56
62
|
export type WorkerGlobalScopeEventMap = {
|
|
57
63
|
fetch: FetchEvent;
|
|
@@ -63,45 +69,45 @@ export type WorkerGlobalScopeEventMap = {
|
|
|
63
69
|
export declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {
|
|
64
70
|
EventTarget: typeof EventTarget;
|
|
65
71
|
}
|
|
66
|
-
|
|
72
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
|
|
67
73
|
export interface Console {
|
|
68
74
|
"assert"(condition?: boolean, ...data: any[]): void;
|
|
69
|
-
|
|
75
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
|
|
70
76
|
clear(): void;
|
|
71
|
-
|
|
77
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
|
|
72
78
|
count(label?: string): void;
|
|
73
|
-
|
|
79
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */
|
|
74
80
|
countReset(label?: string): void;
|
|
75
|
-
|
|
81
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
|
|
76
82
|
debug(...data: any[]): void;
|
|
77
|
-
|
|
83
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
|
|
78
84
|
dir(item?: any, options?: any): void;
|
|
79
|
-
|
|
85
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
|
|
80
86
|
dirxml(...data: any[]): void;
|
|
81
|
-
|
|
87
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
|
|
82
88
|
error(...data: any[]): void;
|
|
83
|
-
|
|
89
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
|
|
84
90
|
group(...data: any[]): void;
|
|
85
|
-
|
|
91
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */
|
|
86
92
|
groupCollapsed(...data: any[]): void;
|
|
87
|
-
|
|
93
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */
|
|
88
94
|
groupEnd(): void;
|
|
89
|
-
|
|
95
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
|
|
90
96
|
info(...data: any[]): void;
|
|
91
|
-
|
|
97
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
|
|
92
98
|
log(...data: any[]): void;
|
|
93
|
-
|
|
99
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
|
|
94
100
|
table(tabularData?: any, properties?: string[]): void;
|
|
95
|
-
|
|
101
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
|
|
96
102
|
time(label?: string): void;
|
|
97
|
-
|
|
103
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */
|
|
98
104
|
timeEnd(label?: string): void;
|
|
99
|
-
|
|
105
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */
|
|
100
106
|
timeLog(label?: string, ...data: any[]): void;
|
|
101
107
|
timeStamp(label?: string): void;
|
|
102
|
-
|
|
108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
|
|
103
109
|
trace(...data: any[]): void;
|
|
104
|
-
|
|
110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
|
|
105
111
|
warn(...data: any[]): void;
|
|
106
112
|
}
|
|
107
113
|
export declare const console: Console;
|
|
@@ -194,6 +200,7 @@ export declare namespace WebAssembly {
|
|
|
194
200
|
}
|
|
195
201
|
/**
|
|
196
202
|
* This ServiceWorker API interface represents the global execution context of a service worker.
|
|
203
|
+
* Available only in secure contexts.
|
|
197
204
|
*
|
|
198
205
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
|
|
199
206
|
*/
|
|
@@ -218,6 +225,7 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
218
225
|
clearInterval(timeoutId: number | null): void;
|
|
219
226
|
queueMicrotask(task: Function): void;
|
|
220
227
|
structuredClone<T>(value: T, options?: StructuredSerializeOptions): T;
|
|
228
|
+
reportError(error: any): void;
|
|
221
229
|
fetch(
|
|
222
230
|
input: RequestInfo,
|
|
223
231
|
init?: RequestInit<RequestInitCfProperties>,
|
|
@@ -246,6 +254,8 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
246
254
|
TransformStream: typeof TransformStream;
|
|
247
255
|
ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
|
|
248
256
|
CountQueuingStrategy: typeof CountQueuingStrategy;
|
|
257
|
+
ErrorEvent: typeof ErrorEvent;
|
|
258
|
+
EventSource: typeof EventSource;
|
|
249
259
|
CompressionStream: typeof CompressionStream;
|
|
250
260
|
DecompressionStream: typeof DecompressionStream;
|
|
251
261
|
TextEncoderStream: typeof TextEncoderStream;
|
|
@@ -275,16 +285,16 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
275
285
|
FixedLengthStream: typeof FixedLengthStream;
|
|
276
286
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
277
287
|
HTMLRewriter: typeof HTMLRewriter;
|
|
278
|
-
GPUAdapter: typeof
|
|
279
|
-
GPUOutOfMemoryError: typeof
|
|
280
|
-
GPUValidationError: typeof
|
|
281
|
-
GPUInternalError: typeof
|
|
282
|
-
GPUDeviceLostInfo: typeof
|
|
283
|
-
GPUBufferUsage: typeof
|
|
284
|
-
GPUShaderStage: typeof
|
|
285
|
-
GPUMapMode: typeof
|
|
286
|
-
GPUTextureUsage: typeof
|
|
287
|
-
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;
|
|
288
298
|
}
|
|
289
299
|
export declare function addEventListener<
|
|
290
300
|
Type extends keyof WorkerGlobalScopeEventMap,
|
|
@@ -308,52 +318,73 @@ export declare function removeEventListener<
|
|
|
308
318
|
export declare function dispatchEvent(
|
|
309
319
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
310
320
|
): boolean;
|
|
311
|
-
|
|
321
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
312
322
|
export declare function btoa(data: string): string;
|
|
313
|
-
|
|
323
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
314
324
|
export declare function atob(data: string): string;
|
|
315
|
-
|
|
325
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
316
326
|
export declare function setTimeout(
|
|
317
327
|
callback: (...args: any[]) => void,
|
|
318
328
|
msDelay?: number,
|
|
319
329
|
): number;
|
|
320
|
-
|
|
330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
321
331
|
export declare function setTimeout<Args extends any[]>(
|
|
322
332
|
callback: (...args: Args) => void,
|
|
323
333
|
msDelay?: number,
|
|
324
334
|
...args: Args
|
|
325
335
|
): number;
|
|
326
|
-
|
|
336
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
327
337
|
export declare function clearTimeout(timeoutId: number | null): void;
|
|
328
|
-
|
|
338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
329
339
|
export declare function setInterval(
|
|
330
340
|
callback: (...args: any[]) => void,
|
|
331
341
|
msDelay?: number,
|
|
332
342
|
): number;
|
|
333
|
-
|
|
343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
334
344
|
export declare function setInterval<Args extends any[]>(
|
|
335
345
|
callback: (...args: Args) => void,
|
|
336
346
|
msDelay?: number,
|
|
337
347
|
...args: Args
|
|
338
348
|
): number;
|
|
339
|
-
|
|
349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
340
350
|
export declare function clearInterval(timeoutId: number | null): void;
|
|
341
|
-
|
|
351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
342
352
|
export declare function queueMicrotask(task: Function): void;
|
|
343
|
-
|
|
353
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
344
354
|
export declare function structuredClone<T>(
|
|
345
355
|
value: T,
|
|
346
356
|
options?: StructuredSerializeOptions,
|
|
347
357
|
): T;
|
|
348
|
-
|
|
358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
359
|
+
export declare function reportError(error: any): void;
|
|
360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
349
361
|
export declare function fetch(
|
|
350
362
|
input: RequestInfo,
|
|
351
363
|
init?: RequestInit<RequestInitCfProperties>,
|
|
352
364
|
): Promise<Response>;
|
|
353
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
|
+
*/
|
|
354
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
|
+
*/
|
|
355
380
|
export declare const caches: CacheStorage;
|
|
356
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
|
+
*/
|
|
357
388
|
export declare const performance: Performance;
|
|
358
389
|
export declare const origin: string;
|
|
359
390
|
export interface TestController {}
|
|
@@ -410,21 +441,23 @@ export interface ExportedHandler<
|
|
|
410
441
|
export interface StructuredSerializeOptions {
|
|
411
442
|
transfer?: any[];
|
|
412
443
|
}
|
|
444
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
413
445
|
export declare abstract class PromiseRejectionEvent extends Event {
|
|
414
|
-
|
|
446
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
415
447
|
readonly promise: Promise<any>;
|
|
416
|
-
|
|
448
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
417
449
|
readonly reason: any;
|
|
418
450
|
}
|
|
419
451
|
/**
|
|
420
|
-
*
|
|
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.
|
|
421
454
|
*
|
|
422
|
-
* [
|
|
455
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
423
456
|
*/
|
|
424
457
|
export interface Performance {
|
|
425
|
-
|
|
458
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
426
459
|
readonly timeOrigin: number;
|
|
427
|
-
|
|
460
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
428
461
|
now(): number;
|
|
429
462
|
}
|
|
430
463
|
export interface AlarmInvocationInfo {
|
|
@@ -613,6 +646,11 @@ export interface AnalyticsEngineDataPoint {
|
|
|
613
646
|
doubles?: number[];
|
|
614
647
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
615
648
|
}
|
|
649
|
+
/**
|
|
650
|
+
* An event which takes place in the DOM.
|
|
651
|
+
*
|
|
652
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
653
|
+
*/
|
|
616
654
|
export declare class Event {
|
|
617
655
|
constructor(type: string, init?: EventInit);
|
|
618
656
|
/**
|
|
@@ -730,6 +768,11 @@ export interface EventListenerObject<EventType extends Event = Event> {
|
|
|
730
768
|
export type EventListenerOrEventListenerObject<
|
|
731
769
|
EventType extends Event = Event,
|
|
732
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
|
+
*/
|
|
733
776
|
export declare class EventTarget<
|
|
734
777
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
735
778
|
> {
|
|
@@ -785,6 +828,11 @@ export interface EventTargetAddEventListenerOptions {
|
|
|
785
828
|
export interface EventTargetHandlerObject {
|
|
786
829
|
handleEvent: (event: Event) => any | undefined;
|
|
787
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
|
+
*/
|
|
788
836
|
export declare class AbortController {
|
|
789
837
|
constructor();
|
|
790
838
|
/**
|
|
@@ -800,11 +848,17 @@ export declare class AbortController {
|
|
|
800
848
|
*/
|
|
801
849
|
abort(reason?: any): void;
|
|
802
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
|
+
*/
|
|
803
856
|
export declare abstract class AbortSignal extends EventTarget {
|
|
804
|
-
|
|
857
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
805
858
|
static abort(reason?: any): AbortSignal;
|
|
806
|
-
|
|
859
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
807
860
|
static timeout(delay: number): AbortSignal;
|
|
861
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
808
862
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
809
863
|
/**
|
|
810
864
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -812,13 +866,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
812
866
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
813
867
|
*/
|
|
814
868
|
readonly aborted: boolean;
|
|
815
|
-
|
|
869
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
816
870
|
readonly reason: any;
|
|
817
|
-
|
|
871
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
818
872
|
get onabort(): any | null;
|
|
819
|
-
|
|
873
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
820
874
|
set onabort(value: any | null);
|
|
821
|
-
|
|
875
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
822
876
|
throwIfAborted(): void;
|
|
823
877
|
}
|
|
824
878
|
export interface Scheduler {
|
|
@@ -827,10 +881,16 @@ export interface Scheduler {
|
|
|
827
881
|
export interface SchedulerWaitOptions {
|
|
828
882
|
signal?: AbortSignal;
|
|
829
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
|
+
*/
|
|
830
889
|
export declare abstract class ExtendableEvent extends Event {
|
|
831
|
-
|
|
890
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
832
891
|
waitUntil(promise: Promise<any>): void;
|
|
833
892
|
}
|
|
893
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
834
894
|
export declare class CustomEvent<T = any> extends Event {
|
|
835
895
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
836
896
|
/**
|
|
@@ -846,58 +906,90 @@ export interface CustomEventCustomEventInit {
|
|
|
846
906
|
composed?: boolean;
|
|
847
907
|
detail?: any;
|
|
848
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
|
+
*/
|
|
849
914
|
export declare class Blob {
|
|
850
915
|
constructor(
|
|
851
|
-
|
|
916
|
+
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
852
917
|
options?: BlobOptions,
|
|
853
918
|
);
|
|
854
|
-
|
|
919
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
855
920
|
readonly size: number;
|
|
856
|
-
|
|
921
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
857
922
|
readonly type: string;
|
|
858
|
-
|
|
923
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
859
924
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
860
|
-
|
|
925
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
861
926
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
862
|
-
|
|
927
|
+
bytes(): Promise<Uint8Array>;
|
|
928
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
863
929
|
text(): Promise<string>;
|
|
864
|
-
|
|
930
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
865
931
|
stream(): ReadableStream;
|
|
866
932
|
}
|
|
867
933
|
export interface BlobOptions {
|
|
868
934
|
type?: string;
|
|
869
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
|
+
*/
|
|
870
941
|
export declare class File extends Blob {
|
|
871
942
|
constructor(
|
|
872
943
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
873
944
|
name: string,
|
|
874
945
|
options?: FileOptions,
|
|
875
946
|
);
|
|
876
|
-
|
|
947
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
877
948
|
readonly name: string;
|
|
878
|
-
|
|
949
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
879
950
|
readonly lastModified: number;
|
|
880
951
|
}
|
|
881
952
|
export interface FileOptions {
|
|
882
953
|
type?: string;
|
|
883
954
|
lastModified?: number;
|
|
884
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
|
+
*/
|
|
885
961
|
export declare abstract class CacheStorage {
|
|
886
|
-
|
|
962
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
887
963
|
open(cacheName: string): Promise<Cache>;
|
|
888
964
|
readonly default: Cache;
|
|
889
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
|
+
*/
|
|
890
971
|
export declare abstract class Cache {
|
|
972
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
891
973
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
974
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
892
975
|
match(
|
|
893
976
|
request: RequestInfo,
|
|
894
977
|
options?: CacheQueryOptions,
|
|
895
978
|
): Promise<Response | undefined>;
|
|
979
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
896
980
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
897
981
|
}
|
|
898
982
|
export interface CacheQueryOptions {
|
|
899
983
|
ignoreMethod?: boolean;
|
|
900
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
|
+
*/
|
|
901
993
|
export declare abstract class Crypto {
|
|
902
994
|
/**
|
|
903
995
|
* Available only in secure contexts.
|
|
@@ -905,7 +997,7 @@ export declare abstract class Crypto {
|
|
|
905
997
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
906
998
|
*/
|
|
907
999
|
readonly subtle: SubtleCrypto;
|
|
908
|
-
|
|
1000
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
909
1001
|
getRandomValues<
|
|
910
1002
|
T extends
|
|
911
1003
|
| Int8Array
|
|
@@ -925,39 +1017,50 @@ export declare abstract class Crypto {
|
|
|
925
1017
|
randomUUID(): string;
|
|
926
1018
|
DigestStream: typeof DigestStream;
|
|
927
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
|
+
*/
|
|
928
1026
|
export declare abstract class SubtleCrypto {
|
|
1027
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
929
1028
|
encrypt(
|
|
930
1029
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
931
1030
|
key: CryptoKey,
|
|
932
1031
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
933
1032
|
): Promise<ArrayBuffer>;
|
|
1033
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
934
1034
|
decrypt(
|
|
935
1035
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
936
1036
|
key: CryptoKey,
|
|
937
1037
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
938
1038
|
): Promise<ArrayBuffer>;
|
|
1039
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
939
1040
|
sign(
|
|
940
1041
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
941
1042
|
key: CryptoKey,
|
|
942
1043
|
data: ArrayBuffer | ArrayBufferView,
|
|
943
1044
|
): Promise<ArrayBuffer>;
|
|
1045
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
944
1046
|
verify(
|
|
945
1047
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
946
1048
|
key: CryptoKey,
|
|
947
1049
|
signature: ArrayBuffer | ArrayBufferView,
|
|
948
1050
|
data: ArrayBuffer | ArrayBufferView,
|
|
949
1051
|
): Promise<boolean>;
|
|
1052
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
950
1053
|
digest(
|
|
951
1054
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
952
1055
|
data: ArrayBuffer | ArrayBufferView,
|
|
953
1056
|
): Promise<ArrayBuffer>;
|
|
954
|
-
|
|
1057
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
955
1058
|
generateKey(
|
|
956
1059
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
957
1060
|
extractable: boolean,
|
|
958
1061
|
keyUsages: string[],
|
|
959
1062
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
960
|
-
|
|
1063
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
961
1064
|
deriveKey(
|
|
962
1065
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
963
1066
|
baseKey: CryptoKey,
|
|
@@ -965,12 +1068,13 @@ export declare abstract class SubtleCrypto {
|
|
|
965
1068
|
extractable: boolean,
|
|
966
1069
|
keyUsages: string[],
|
|
967
1070
|
): Promise<CryptoKey>;
|
|
1071
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
968
1072
|
deriveBits(
|
|
969
1073
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
970
1074
|
baseKey: CryptoKey,
|
|
971
|
-
length
|
|
1075
|
+
length?: number | null,
|
|
972
1076
|
): Promise<ArrayBuffer>;
|
|
973
|
-
|
|
1077
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
974
1078
|
importKey(
|
|
975
1079
|
format: string,
|
|
976
1080
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -978,14 +1082,16 @@ export declare abstract class SubtleCrypto {
|
|
|
978
1082
|
extractable: boolean,
|
|
979
1083
|
keyUsages: string[],
|
|
980
1084
|
): Promise<CryptoKey>;
|
|
1085
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
981
1086
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1087
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
982
1088
|
wrapKey(
|
|
983
1089
|
format: string,
|
|
984
1090
|
key: CryptoKey,
|
|
985
1091
|
wrappingKey: CryptoKey,
|
|
986
1092
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
987
1093
|
): Promise<ArrayBuffer>;
|
|
988
|
-
|
|
1094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
989
1095
|
unwrapKey(
|
|
990
1096
|
format: string,
|
|
991
1097
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1000,12 +1106,18 @@ export declare abstract class SubtleCrypto {
|
|
|
1000
1106
|
b: ArrayBuffer | ArrayBufferView,
|
|
1001
1107
|
): boolean;
|
|
1002
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
|
+
*/
|
|
1003
1115
|
export declare abstract class CryptoKey {
|
|
1004
|
-
|
|
1116
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1005
1117
|
readonly type: string;
|
|
1006
|
-
|
|
1118
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1007
1119
|
readonly extractable: boolean;
|
|
1008
|
-
|
|
1120
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1009
1121
|
readonly algorithm:
|
|
1010
1122
|
| CryptoKeyKeyAlgorithm
|
|
1011
1123
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1013,7 +1125,7 @@ export declare abstract class CryptoKey {
|
|
|
1013
1125
|
| CryptoKeyRsaKeyAlgorithm
|
|
1014
1126
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1015
1127
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1016
|
-
|
|
1128
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1017
1129
|
readonly usages: string[];
|
|
1018
1130
|
}
|
|
1019
1131
|
export interface CryptoKeyPair {
|
|
@@ -1119,7 +1231,13 @@ export declare class DigestStream extends WritableStream<
|
|
|
1119
1231
|
> {
|
|
1120
1232
|
constructor(algorithm: string | SubtleCryptoHashAlgorithm);
|
|
1121
1233
|
readonly digest: Promise<ArrayBuffer>;
|
|
1234
|
+
get bytesWritten(): number | bigint;
|
|
1122
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
|
+
*/
|
|
1123
1241
|
export declare class TextDecoder {
|
|
1124
1242
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1125
1243
|
/**
|
|
@@ -1145,6 +1263,11 @@ export declare class TextDecoder {
|
|
|
1145
1263
|
readonly fatal: boolean;
|
|
1146
1264
|
readonly ignoreBOM: boolean;
|
|
1147
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
|
+
*/
|
|
1148
1271
|
export declare class TextEncoder {
|
|
1149
1272
|
constructor();
|
|
1150
1273
|
/**
|
|
@@ -1175,21 +1298,59 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1175
1298
|
read: number;
|
|
1176
1299
|
written: number;
|
|
1177
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
|
+
*/
|
|
1306
|
+
export declare class ErrorEvent extends Event {
|
|
1307
|
+
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1308
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1309
|
+
get filename(): string;
|
|
1310
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1311
|
+
get message(): string;
|
|
1312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1313
|
+
get lineno(): number;
|
|
1314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1315
|
+
get colno(): number;
|
|
1316
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1317
|
+
get error(): any;
|
|
1318
|
+
}
|
|
1319
|
+
export interface ErrorEventErrorEventInit {
|
|
1320
|
+
message?: string;
|
|
1321
|
+
filename?: string;
|
|
1322
|
+
lineno?: number;
|
|
1323
|
+
colno?: number;
|
|
1324
|
+
error?: any;
|
|
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
|
+
*/
|
|
1178
1331
|
export declare class FormData {
|
|
1179
1332
|
constructor();
|
|
1333
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1180
1334
|
append(name: string, value: string): void;
|
|
1335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1181
1336
|
append(name: string, value: Blob, filename?: string): void;
|
|
1337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1182
1338
|
delete(name: string): void;
|
|
1339
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1183
1340
|
get(name: string): string | null;
|
|
1341
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1184
1342
|
getAll(name: string): string[];
|
|
1343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1185
1344
|
has(name: string): boolean;
|
|
1345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1186
1346
|
set(name: string, value: string): void;
|
|
1347
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1187
1348
|
set(name: string, value: Blob, filename?: string): void;
|
|
1188
|
-
|
|
1349
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1189
1350
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1190
|
-
|
|
1351
|
+
/* Returns a list of keys in the list. */
|
|
1191
1352
|
keys(): IterableIterator<string>;
|
|
1192
|
-
|
|
1353
|
+
/* Returns a list of values in the list. */
|
|
1193
1354
|
values(): IterableIterator<File | string>;
|
|
1194
1355
|
forEach<This = unknown>(
|
|
1195
1356
|
callback: (
|
|
@@ -1275,10 +1436,15 @@ export interface Text {
|
|
|
1275
1436
|
export interface DocumentEnd {
|
|
1276
1437
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1277
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
|
+
*/
|
|
1278
1444
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1279
|
-
|
|
1445
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1280
1446
|
readonly request: Request;
|
|
1281
|
-
|
|
1447
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1282
1448
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1283
1449
|
passThroughOnException(): void;
|
|
1284
1450
|
}
|
|
@@ -1286,23 +1452,33 @@ export type HeadersInit =
|
|
|
1286
1452
|
| Headers
|
|
1287
1453
|
| Iterable<Iterable<string>>
|
|
1288
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
|
+
*/
|
|
1289
1460
|
export declare class Headers {
|
|
1290
1461
|
constructor(init?: HeadersInit);
|
|
1462
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1291
1463
|
get(name: string): string | null;
|
|
1292
1464
|
getAll(name: string): string[];
|
|
1465
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1293
1466
|
has(name: string): boolean;
|
|
1467
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1294
1468
|
set(name: string, value: string): void;
|
|
1469
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1295
1470
|
append(name: string, value: string): void;
|
|
1471
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1296
1472
|
delete(name: string): void;
|
|
1297
1473
|
forEach<This = unknown>(
|
|
1298
1474
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1299
1475
|
thisArg?: This,
|
|
1300
1476
|
): void;
|
|
1301
|
-
|
|
1477
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1302
1478
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1303
|
-
|
|
1479
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1304
1480
|
keys(): IterableIterator<string>;
|
|
1305
|
-
|
|
1481
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1306
1482
|
values(): IterableIterator<string>;
|
|
1307
1483
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1308
1484
|
}
|
|
@@ -1315,33 +1491,46 @@ export type BodyInit =
|
|
|
1315
1491
|
| URLSearchParams
|
|
1316
1492
|
| FormData;
|
|
1317
1493
|
export declare abstract class Body {
|
|
1494
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1318
1495
|
readonly body: ReadableStream | null;
|
|
1496
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1319
1497
|
readonly bodyUsed: boolean;
|
|
1498
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1320
1499
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1500
|
+
bytes(): Promise<Uint8Array>;
|
|
1501
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1321
1502
|
text(): Promise<string>;
|
|
1503
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1322
1504
|
json<T>(): Promise<T>;
|
|
1505
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1323
1506
|
formData(): Promise<FormData>;
|
|
1507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1324
1508
|
blob(): Promise<Blob>;
|
|
1325
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
|
+
*/
|
|
1326
1515
|
export declare class Response extends Body {
|
|
1327
1516
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1328
|
-
|
|
1517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1329
1518
|
static redirect(url: string, status?: number): Response;
|
|
1330
|
-
|
|
1519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1331
1520
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1332
|
-
|
|
1521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1333
1522
|
clone(): Response;
|
|
1334
|
-
|
|
1523
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1335
1524
|
readonly status: number;
|
|
1336
|
-
|
|
1525
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1337
1526
|
readonly statusText: string;
|
|
1338
|
-
|
|
1527
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1339
1528
|
readonly headers: Headers;
|
|
1340
|
-
|
|
1529
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1341
1530
|
readonly ok: boolean;
|
|
1342
|
-
|
|
1531
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1343
1532
|
readonly redirected: boolean;
|
|
1344
|
-
|
|
1533
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1345
1534
|
readonly url: string;
|
|
1346
1535
|
readonly webSocket: WebSocket | null;
|
|
1347
1536
|
readonly cf?: any;
|
|
@@ -1358,12 +1547,17 @@ export type RequestInfo<
|
|
|
1358
1547
|
CfHostMetadata = unknown,
|
|
1359
1548
|
Cf = CfProperties<CfHostMetadata>,
|
|
1360
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
|
+
*/
|
|
1361
1555
|
export declare class Request<
|
|
1362
1556
|
CfHostMetadata = unknown,
|
|
1363
1557
|
Cf = CfProperties<CfHostMetadata>,
|
|
1364
1558
|
> extends Body {
|
|
1365
1559
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1366
|
-
|
|
1560
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1367
1561
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1368
1562
|
/**
|
|
1369
1563
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1411,19 +1605,19 @@ export declare class Request<
|
|
|
1411
1605
|
readonly keepalive: boolean;
|
|
1412
1606
|
}
|
|
1413
1607
|
export interface RequestInit<Cf = CfProperties> {
|
|
1414
|
-
|
|
1608
|
+
/* A string to set request's method. */
|
|
1415
1609
|
method?: string;
|
|
1416
|
-
|
|
1610
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1417
1611
|
headers?: HeadersInit;
|
|
1418
|
-
|
|
1612
|
+
/* A BodyInit object or null to set request's body. */
|
|
1419
1613
|
body?: BodyInit | null;
|
|
1420
|
-
|
|
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. */
|
|
1421
1615
|
redirect?: string;
|
|
1422
1616
|
fetcher?: Fetcher | null;
|
|
1423
1617
|
cf?: Cf;
|
|
1424
|
-
|
|
1618
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1425
1619
|
integrity?: string;
|
|
1426
|
-
|
|
1620
|
+
/* An AbortSignal to set request's signal. */
|
|
1427
1621
|
signal?: AbortSignal | null;
|
|
1428
1622
|
}
|
|
1429
1623
|
export type Service<
|
|
@@ -1856,31 +2050,36 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
1856
2050
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1857
2051
|
*/
|
|
1858
2052
|
export interface ReadableStream<R = any> {
|
|
1859
|
-
|
|
2053
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1860
2054
|
readonly locked: boolean;
|
|
1861
|
-
|
|
2055
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1862
2056
|
cancel(reason?: any): Promise<void>;
|
|
1863
|
-
|
|
2057
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1864
2058
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1865
|
-
|
|
2059
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1866
2060
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1867
|
-
|
|
2061
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1868
2062
|
pipeThrough<T>(
|
|
1869
2063
|
transform: ReadableWritablePair<T, R>,
|
|
1870
2064
|
options?: StreamPipeOptions,
|
|
1871
2065
|
): ReadableStream<T>;
|
|
1872
|
-
|
|
2066
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1873
2067
|
pipeTo(
|
|
1874
2068
|
destination: WritableStream<R>,
|
|
1875
2069
|
options?: StreamPipeOptions,
|
|
1876
2070
|
): Promise<void>;
|
|
1877
|
-
|
|
2071
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1878
2072
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1879
2073
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1880
2074
|
[Symbol.asyncIterator](
|
|
1881
2075
|
options?: ReadableStreamValuesOptions,
|
|
1882
2076
|
): AsyncIterableIterator<R>;
|
|
1883
2077
|
}
|
|
2078
|
+
/**
|
|
2079
|
+
* 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.
|
|
2080
|
+
*
|
|
2081
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2082
|
+
*/
|
|
1884
2083
|
export declare const ReadableStream: {
|
|
1885
2084
|
prototype: ReadableStream;
|
|
1886
2085
|
new (
|
|
@@ -1892,24 +2091,26 @@ export declare const ReadableStream: {
|
|
|
1892
2091
|
strategy?: QueuingStrategy<R>,
|
|
1893
2092
|
): ReadableStream<R>;
|
|
1894
2093
|
};
|
|
2094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1895
2095
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
1896
2096
|
constructor(stream: ReadableStream);
|
|
1897
2097
|
readonly closed: Promise<void>;
|
|
1898
2098
|
cancel(reason?: any): Promise<void>;
|
|
1899
|
-
|
|
2099
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1900
2100
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1901
|
-
|
|
2101
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1902
2102
|
releaseLock(): void;
|
|
1903
2103
|
}
|
|
2104
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1904
2105
|
export declare class ReadableStreamBYOBReader {
|
|
1905
2106
|
constructor(stream: ReadableStream);
|
|
1906
2107
|
readonly closed: Promise<void>;
|
|
1907
2108
|
cancel(reason?: any): Promise<void>;
|
|
1908
|
-
|
|
2109
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1909
2110
|
read<T extends ArrayBufferView>(
|
|
1910
2111
|
view: T,
|
|
1911
2112
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1912
|
-
|
|
2113
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1913
2114
|
releaseLock(): void;
|
|
1914
2115
|
readAtLeast<T extends ArrayBufferView>(
|
|
1915
2116
|
minElements: number,
|
|
@@ -1927,38 +2128,38 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
1927
2128
|
*/
|
|
1928
2129
|
mode: "byob";
|
|
1929
2130
|
}
|
|
1930
|
-
|
|
2131
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1931
2132
|
export interface ReadableStreamBYOBRequest {
|
|
1932
|
-
|
|
2133
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1933
2134
|
get view(): Uint8Array | null;
|
|
1934
|
-
|
|
2135
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1935
2136
|
respond(bytesWritten: number): void;
|
|
1936
|
-
|
|
2137
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1937
2138
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1938
2139
|
get atLeast(): number | null;
|
|
1939
2140
|
}
|
|
1940
|
-
|
|
2141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1941
2142
|
export interface ReadableStreamDefaultController<R = any> {
|
|
1942
|
-
|
|
2143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1943
2144
|
get desiredSize(): number | null;
|
|
1944
|
-
|
|
2145
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1945
2146
|
close(): void;
|
|
1946
|
-
|
|
2147
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1947
2148
|
enqueue(chunk?: R): void;
|
|
1948
|
-
|
|
2149
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
1949
2150
|
error(reason: any): void;
|
|
1950
2151
|
}
|
|
1951
|
-
|
|
2152
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
1952
2153
|
export interface ReadableByteStreamController {
|
|
1953
|
-
|
|
2154
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
1954
2155
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
1955
|
-
|
|
2156
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
1956
2157
|
get desiredSize(): number | null;
|
|
1957
|
-
|
|
2158
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
1958
2159
|
close(): void;
|
|
1959
|
-
|
|
2160
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
1960
2161
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
1961
|
-
|
|
2162
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
1962
2163
|
error(reason: any): void;
|
|
1963
2164
|
}
|
|
1964
2165
|
/**
|
|
@@ -1967,20 +2168,20 @@ export interface ReadableByteStreamController {
|
|
|
1967
2168
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
1968
2169
|
*/
|
|
1969
2170
|
export interface WritableStreamDefaultController {
|
|
1970
|
-
|
|
2171
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
1971
2172
|
get signal(): AbortSignal;
|
|
1972
|
-
|
|
2173
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
1973
2174
|
error(reason?: any): void;
|
|
1974
2175
|
}
|
|
1975
|
-
|
|
2176
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
1976
2177
|
export interface TransformStreamDefaultController<O = any> {
|
|
1977
|
-
|
|
2178
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
1978
2179
|
get desiredSize(): number | null;
|
|
1979
|
-
|
|
2180
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
1980
2181
|
enqueue(chunk?: O): void;
|
|
1981
|
-
|
|
2182
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
1982
2183
|
error(reason: any): void;
|
|
1983
|
-
|
|
2184
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
1984
2185
|
terminate(): void;
|
|
1985
2186
|
}
|
|
1986
2187
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -1992,46 +2193,57 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
1992
2193
|
writable: WritableStream<W>;
|
|
1993
2194
|
readable: ReadableStream<R>;
|
|
1994
2195
|
}
|
|
2196
|
+
/**
|
|
2197
|
+
* 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.
|
|
2198
|
+
*
|
|
2199
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2200
|
+
*/
|
|
1995
2201
|
export declare class WritableStream<W = any> {
|
|
1996
2202
|
constructor(
|
|
1997
2203
|
underlyingSink?: UnderlyingSink,
|
|
1998
2204
|
queuingStrategy?: QueuingStrategy,
|
|
1999
2205
|
);
|
|
2000
|
-
|
|
2206
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2001
2207
|
readonly locked: boolean;
|
|
2002
|
-
|
|
2208
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2003
2209
|
abort(reason?: any): Promise<void>;
|
|
2004
|
-
|
|
2210
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2005
2211
|
close(): Promise<void>;
|
|
2006
|
-
|
|
2212
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2007
2213
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2008
2214
|
}
|
|
2215
|
+
/**
|
|
2216
|
+
* 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.
|
|
2217
|
+
*
|
|
2218
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2219
|
+
*/
|
|
2009
2220
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2010
2221
|
constructor(stream: WritableStream);
|
|
2011
|
-
|
|
2222
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2012
2223
|
readonly closed: Promise<void>;
|
|
2013
|
-
|
|
2224
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2014
2225
|
readonly ready: Promise<void>;
|
|
2015
|
-
|
|
2226
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2016
2227
|
readonly desiredSize: number | null;
|
|
2017
|
-
|
|
2228
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2018
2229
|
abort(reason?: any): Promise<void>;
|
|
2019
|
-
|
|
2230
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2020
2231
|
close(): Promise<void>;
|
|
2021
|
-
|
|
2232
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2022
2233
|
write(chunk?: W): Promise<void>;
|
|
2023
|
-
|
|
2234
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2024
2235
|
releaseLock(): void;
|
|
2025
2236
|
}
|
|
2237
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2026
2238
|
export declare class TransformStream<I = any, O = any> {
|
|
2027
2239
|
constructor(
|
|
2028
2240
|
transformer?: Transformer<I, O>,
|
|
2029
2241
|
writableStrategy?: QueuingStrategy<I>,
|
|
2030
2242
|
readableStrategy?: QueuingStrategy<O>,
|
|
2031
2243
|
);
|
|
2032
|
-
|
|
2244
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2033
2245
|
readonly readable: ReadableStream<O>;
|
|
2034
|
-
|
|
2246
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2035
2247
|
readonly writable: WritableStream<I>;
|
|
2036
2248
|
}
|
|
2037
2249
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2052,18 +2264,21 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2052
2264
|
export interface ReadableStreamValuesOptions {
|
|
2053
2265
|
preventCancel?: boolean;
|
|
2054
2266
|
}
|
|
2267
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2055
2268
|
export declare class CompressionStream extends TransformStream<
|
|
2056
2269
|
ArrayBuffer | ArrayBufferView,
|
|
2057
2270
|
Uint8Array
|
|
2058
2271
|
> {
|
|
2059
2272
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2060
2273
|
}
|
|
2274
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2061
2275
|
export declare class DecompressionStream extends TransformStream<
|
|
2062
2276
|
ArrayBuffer | ArrayBufferView,
|
|
2063
2277
|
Uint8Array
|
|
2064
2278
|
> {
|
|
2065
2279
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2066
2280
|
}
|
|
2281
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2067
2282
|
export declare class TextEncoderStream extends TransformStream<
|
|
2068
2283
|
string,
|
|
2069
2284
|
Uint8Array
|
|
@@ -2071,6 +2286,7 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2071
2286
|
constructor();
|
|
2072
2287
|
get encoding(): string;
|
|
2073
2288
|
}
|
|
2289
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2074
2290
|
export declare class TextDecoderStream extends TransformStream<
|
|
2075
2291
|
ArrayBuffer | ArrayBufferView,
|
|
2076
2292
|
string
|
|
@@ -2084,20 +2300,30 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2084
2300
|
fatal?: boolean;
|
|
2085
2301
|
ignoreBOM?: boolean;
|
|
2086
2302
|
}
|
|
2303
|
+
/**
|
|
2304
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2305
|
+
*
|
|
2306
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2307
|
+
*/
|
|
2087
2308
|
export declare class ByteLengthQueuingStrategy
|
|
2088
2309
|
implements QueuingStrategy<ArrayBufferView>
|
|
2089
2310
|
{
|
|
2090
2311
|
constructor(init: QueuingStrategyInit);
|
|
2091
|
-
|
|
2312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2092
2313
|
get highWaterMark(): number;
|
|
2093
|
-
|
|
2314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2094
2315
|
get size(): (chunk?: any) => number;
|
|
2095
2316
|
}
|
|
2317
|
+
/**
|
|
2318
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2319
|
+
*
|
|
2320
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2321
|
+
*/
|
|
2096
2322
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2097
2323
|
constructor(init: QueuingStrategyInit);
|
|
2098
|
-
|
|
2324
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2099
2325
|
get highWaterMark(): number;
|
|
2100
|
-
|
|
2326
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2101
2327
|
get size(): (chunk?: any) => number;
|
|
2102
2328
|
}
|
|
2103
2329
|
export interface QueuingStrategyInit {
|
|
@@ -2222,36 +2448,43 @@ export interface TraceMetrics {
|
|
|
2222
2448
|
export interface UnsafeTraceMetrics {
|
|
2223
2449
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2224
2450
|
}
|
|
2451
|
+
/**
|
|
2452
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2453
|
+
*
|
|
2454
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2455
|
+
*/
|
|
2225
2456
|
export declare class URL {
|
|
2226
2457
|
constructor(url: string | URL, base?: string | URL);
|
|
2227
|
-
|
|
2458
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2228
2459
|
href: string;
|
|
2229
|
-
|
|
2460
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2230
2461
|
readonly origin: string;
|
|
2231
|
-
|
|
2462
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2232
2463
|
protocol: string;
|
|
2233
|
-
|
|
2464
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2234
2465
|
username: string;
|
|
2235
|
-
|
|
2466
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2236
2467
|
password: string;
|
|
2237
|
-
|
|
2468
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2238
2469
|
host: string;
|
|
2239
|
-
|
|
2470
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2240
2471
|
hostname: string;
|
|
2241
|
-
|
|
2472
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2242
2473
|
port: string;
|
|
2243
|
-
|
|
2474
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2244
2475
|
pathname: string;
|
|
2245
|
-
|
|
2476
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2246
2477
|
search: string;
|
|
2247
|
-
|
|
2478
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2248
2479
|
readonly searchParams: URLSearchParams;
|
|
2249
|
-
|
|
2480
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2250
2481
|
hash: string;
|
|
2482
|
+
/*function toString() { [native code] }*/
|
|
2251
2483
|
toString(): string;
|
|
2252
|
-
|
|
2484
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2253
2485
|
toJSON(): string;
|
|
2254
2486
|
}
|
|
2487
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2255
2488
|
export declare class URLSearchParams {
|
|
2256
2489
|
constructor(
|
|
2257
2490
|
init?:
|
|
@@ -2260,19 +2493,51 @@ export declare class URLSearchParams {
|
|
|
2260
2493
|
| Record<string, string>
|
|
2261
2494
|
| [key: string, value: string][],
|
|
2262
2495
|
);
|
|
2496
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2263
2497
|
get size(): number;
|
|
2498
|
+
/**
|
|
2499
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2500
|
+
*
|
|
2501
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2502
|
+
*/
|
|
2264
2503
|
append(name: string, value: string): void;
|
|
2504
|
+
/**
|
|
2505
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2506
|
+
*
|
|
2507
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2508
|
+
*/
|
|
2265
2509
|
delete(name: string): void;
|
|
2510
|
+
/**
|
|
2511
|
+
* Returns the first value associated to the given search parameter.
|
|
2512
|
+
*
|
|
2513
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2514
|
+
*/
|
|
2266
2515
|
get(name: string): string | null;
|
|
2516
|
+
/**
|
|
2517
|
+
* Returns all the values association with a given search parameter.
|
|
2518
|
+
*
|
|
2519
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2520
|
+
*/
|
|
2267
2521
|
getAll(name: string): string[];
|
|
2522
|
+
/**
|
|
2523
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2524
|
+
*
|
|
2525
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2526
|
+
*/
|
|
2268
2527
|
has(name: string): boolean;
|
|
2528
|
+
/**
|
|
2529
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2530
|
+
*
|
|
2531
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2532
|
+
*/
|
|
2269
2533
|
set(name: string, value: string): void;
|
|
2534
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2270
2535
|
sort(): void;
|
|
2271
|
-
|
|
2536
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2272
2537
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2273
|
-
|
|
2538
|
+
/* Returns a list of keys in the search params. */
|
|
2274
2539
|
keys(): IterableIterator<string>;
|
|
2275
|
-
|
|
2540
|
+
/* Returns a list of values in the search params. */
|
|
2276
2541
|
values(): IterableIterator<string>;
|
|
2277
2542
|
forEach<This = unknown>(
|
|
2278
2543
|
callback: (
|
|
@@ -2283,6 +2548,7 @@ export declare class URLSearchParams {
|
|
|
2283
2548
|
) => void,
|
|
2284
2549
|
thisArg?: This,
|
|
2285
2550
|
): void;
|
|
2551
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2286
2552
|
toString(): string;
|
|
2287
2553
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2288
2554
|
}
|
|
@@ -2335,6 +2601,11 @@ export interface URLPatternURLPatternResult {
|
|
|
2335
2601
|
export interface URLPatternURLPatternOptions {
|
|
2336
2602
|
ignoreCase?: boolean;
|
|
2337
2603
|
}
|
|
2604
|
+
/**
|
|
2605
|
+
* 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.
|
|
2606
|
+
*
|
|
2607
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2608
|
+
*/
|
|
2338
2609
|
export declare class CloseEvent extends Event {
|
|
2339
2610
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2340
2611
|
/**
|
|
@@ -2361,36 +2632,34 @@ export interface CloseEventInit {
|
|
|
2361
2632
|
reason?: string;
|
|
2362
2633
|
wasClean?: boolean;
|
|
2363
2634
|
}
|
|
2635
|
+
/**
|
|
2636
|
+
* A message received by a target object.
|
|
2637
|
+
*
|
|
2638
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2639
|
+
*/
|
|
2364
2640
|
export declare class MessageEvent extends Event {
|
|
2365
2641
|
constructor(type: string, initializer: MessageEventInit);
|
|
2642
|
+
/**
|
|
2643
|
+
* Returns the data of the message.
|
|
2644
|
+
*
|
|
2645
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2646
|
+
*/
|
|
2366
2647
|
readonly data: ArrayBuffer | string;
|
|
2367
2648
|
}
|
|
2368
2649
|
export interface MessageEventInit {
|
|
2369
2650
|
data: ArrayBuffer | string;
|
|
2370
2651
|
}
|
|
2371
|
-
/**
|
|
2372
|
-
* Events providing information related to errors in scripts or in files.
|
|
2373
|
-
*
|
|
2374
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
2375
|
-
*/
|
|
2376
|
-
export interface ErrorEvent extends Event {
|
|
2377
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
2378
|
-
readonly filename: string;
|
|
2379
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
2380
|
-
readonly message: string;
|
|
2381
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
2382
|
-
readonly lineno: number;
|
|
2383
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
2384
|
-
readonly colno: number;
|
|
2385
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
2386
|
-
readonly error: any;
|
|
2387
|
-
}
|
|
2388
2652
|
export type WebSocketEventMap = {
|
|
2389
2653
|
close: CloseEvent;
|
|
2390
2654
|
message: MessageEvent;
|
|
2391
2655
|
open: Event;
|
|
2392
2656
|
error: ErrorEvent;
|
|
2393
2657
|
};
|
|
2658
|
+
/**
|
|
2659
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2660
|
+
*
|
|
2661
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2662
|
+
*/
|
|
2394
2663
|
export declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2395
2664
|
constructor(url: string, protocols?: string[] | string);
|
|
2396
2665
|
accept(): void;
|
|
@@ -2458,6 +2727,7 @@ export interface Socket {
|
|
|
2458
2727
|
export interface SocketOptions {
|
|
2459
2728
|
secureTransport?: string;
|
|
2460
2729
|
allowHalfOpen: boolean;
|
|
2730
|
+
highWaterMark?: number | bigint;
|
|
2461
2731
|
}
|
|
2462
2732
|
export interface SocketAddress {
|
|
2463
2733
|
hostname: string;
|
|
@@ -2470,60 +2740,58 @@ export interface SocketInfo {
|
|
|
2470
2740
|
remoteAddress?: string;
|
|
2471
2741
|
localAddress?: string;
|
|
2472
2742
|
}
|
|
2473
|
-
export declare abstract class
|
|
2474
|
-
requestDevice(param1?:
|
|
2475
|
-
requestAdapterInfo(unmaskHints?: string[]): Promise<
|
|
2476
|
-
get features():
|
|
2477
|
-
get limits():
|
|
2743
|
+
export declare abstract class GPUAdapter {
|
|
2744
|
+
requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
|
|
2745
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
|
|
2746
|
+
get features(): GPUSupportedFeatures;
|
|
2747
|
+
get limits(): GPUSupportedLimits;
|
|
2478
2748
|
}
|
|
2479
|
-
export interface
|
|
2480
|
-
createBuffer(param1:
|
|
2749
|
+
export interface GPUDevice extends EventTarget {
|
|
2750
|
+
createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
|
|
2481
2751
|
createBindGroupLayout(
|
|
2482
|
-
descriptor:
|
|
2483
|
-
):
|
|
2484
|
-
createBindGroup(descriptor:
|
|
2485
|
-
createSampler(descriptor:
|
|
2486
|
-
createShaderModule(
|
|
2487
|
-
descriptor: gpuGPUShaderModuleDescriptor,
|
|
2488
|
-
): gpuGPUShaderModule;
|
|
2752
|
+
descriptor: GPUBindGroupLayoutDescriptor,
|
|
2753
|
+
): GPUBindGroupLayout;
|
|
2754
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
2755
|
+
createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
|
|
2756
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
2489
2757
|
createPipelineLayout(
|
|
2490
|
-
descriptor:
|
|
2491
|
-
):
|
|
2758
|
+
descriptor: GPUPipelineLayoutDescriptor,
|
|
2759
|
+
): GPUPipelineLayout;
|
|
2492
2760
|
createComputePipeline(
|
|
2493
|
-
descriptor:
|
|
2494
|
-
):
|
|
2761
|
+
descriptor: GPUComputePipelineDescriptor,
|
|
2762
|
+
): GPUComputePipeline;
|
|
2495
2763
|
createRenderPipeline(
|
|
2496
|
-
descriptor:
|
|
2497
|
-
):
|
|
2764
|
+
descriptor: GPURenderPipelineDescriptor,
|
|
2765
|
+
): GPURenderPipeline;
|
|
2498
2766
|
createCommandEncoder(
|
|
2499
|
-
descriptor?:
|
|
2500
|
-
):
|
|
2501
|
-
createTexture(param1:
|
|
2767
|
+
descriptor?: GPUCommandEncoderDescriptor,
|
|
2768
|
+
): GPUCommandEncoder;
|
|
2769
|
+
createTexture(param1: GPUTextureDescriptor): GPUTexture;
|
|
2502
2770
|
destroy(): void;
|
|
2503
|
-
createQuerySet(descriptor:
|
|
2771
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
2504
2772
|
pushErrorScope(filter: string): void;
|
|
2505
|
-
popErrorScope(): Promise<
|
|
2506
|
-
get queue():
|
|
2507
|
-
get lost(): Promise<
|
|
2508
|
-
get features():
|
|
2509
|
-
get limits():
|
|
2773
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
2774
|
+
get queue(): GPUQueue;
|
|
2775
|
+
get lost(): Promise<GPUDeviceLostInfo>;
|
|
2776
|
+
get features(): GPUSupportedFeatures;
|
|
2777
|
+
get limits(): GPUSupportedLimits;
|
|
2510
2778
|
}
|
|
2511
|
-
export interface
|
|
2779
|
+
export interface GPUDeviceDescriptor {
|
|
2512
2780
|
label?: string;
|
|
2513
2781
|
requiredFeatures?: string[];
|
|
2514
2782
|
requiredLimits?: Record<string, number | bigint>;
|
|
2515
|
-
defaultQueue?:
|
|
2783
|
+
defaultQueue?: GPUQueueDescriptor;
|
|
2516
2784
|
}
|
|
2517
|
-
export interface
|
|
2785
|
+
export interface GPUBufferDescriptor {
|
|
2518
2786
|
label: string;
|
|
2519
2787
|
size: number | bigint;
|
|
2520
2788
|
usage: number;
|
|
2521
2789
|
mappedAtCreation: boolean;
|
|
2522
2790
|
}
|
|
2523
|
-
export interface
|
|
2791
|
+
export interface GPUQueueDescriptor {
|
|
2524
2792
|
label?: string;
|
|
2525
2793
|
}
|
|
2526
|
-
export declare abstract class
|
|
2794
|
+
export declare abstract class GPUBufferUsage {
|
|
2527
2795
|
static readonly MAP_READ: number;
|
|
2528
2796
|
static readonly MAP_WRITE: number;
|
|
2529
2797
|
static readonly COPY_SRC: number;
|
|
@@ -2535,7 +2803,7 @@ export declare abstract class gpuGPUBufferUsage {
|
|
|
2535
2803
|
static readonly INDIRECT: number;
|
|
2536
2804
|
static readonly QUERY_RESOLVE: number;
|
|
2537
2805
|
}
|
|
2538
|
-
export interface
|
|
2806
|
+
export interface GPUBuffer {
|
|
2539
2807
|
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2540
2808
|
unmap(): void;
|
|
2541
2809
|
destroy(): void;
|
|
@@ -2548,59 +2816,59 @@ export interface gpuGPUBuffer {
|
|
|
2548
2816
|
get usage(): number;
|
|
2549
2817
|
get mapState(): string;
|
|
2550
2818
|
}
|
|
2551
|
-
export declare abstract class
|
|
2819
|
+
export declare abstract class GPUShaderStage {
|
|
2552
2820
|
static readonly VERTEX: number;
|
|
2553
2821
|
static readonly FRAGMENT: number;
|
|
2554
2822
|
static readonly COMPUTE: number;
|
|
2555
2823
|
}
|
|
2556
|
-
export interface
|
|
2824
|
+
export interface GPUBindGroupLayoutDescriptor {
|
|
2557
2825
|
label?: string;
|
|
2558
|
-
entries:
|
|
2826
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
2559
2827
|
}
|
|
2560
|
-
export interface
|
|
2828
|
+
export interface GPUBindGroupLayoutEntry {
|
|
2561
2829
|
binding: number;
|
|
2562
2830
|
visibility: number;
|
|
2563
|
-
buffer?:
|
|
2564
|
-
sampler?:
|
|
2565
|
-
texture?:
|
|
2566
|
-
storageTexture?:
|
|
2831
|
+
buffer?: GPUBufferBindingLayout;
|
|
2832
|
+
sampler?: GPUSamplerBindingLayout;
|
|
2833
|
+
texture?: GPUTextureBindingLayout;
|
|
2834
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
2567
2835
|
}
|
|
2568
|
-
export interface
|
|
2836
|
+
export interface GPUStorageTextureBindingLayout {
|
|
2569
2837
|
access?: string;
|
|
2570
2838
|
format: string;
|
|
2571
2839
|
viewDimension?: string;
|
|
2572
2840
|
}
|
|
2573
|
-
export interface
|
|
2841
|
+
export interface GPUTextureBindingLayout {
|
|
2574
2842
|
sampleType?: string;
|
|
2575
2843
|
viewDimension?: string;
|
|
2576
2844
|
multisampled?: boolean;
|
|
2577
2845
|
}
|
|
2578
|
-
export interface
|
|
2846
|
+
export interface GPUSamplerBindingLayout {
|
|
2579
2847
|
type?: string;
|
|
2580
2848
|
}
|
|
2581
|
-
export interface
|
|
2849
|
+
export interface GPUBufferBindingLayout {
|
|
2582
2850
|
type?: string;
|
|
2583
2851
|
hasDynamicOffset?: boolean;
|
|
2584
2852
|
minBindingSize?: number | bigint;
|
|
2585
2853
|
}
|
|
2586
|
-
export interface
|
|
2587
|
-
export interface
|
|
2588
|
-
export interface
|
|
2854
|
+
export interface GPUBindGroupLayout {}
|
|
2855
|
+
export interface GPUBindGroup {}
|
|
2856
|
+
export interface GPUBindGroupDescriptor {
|
|
2589
2857
|
label?: string;
|
|
2590
|
-
layout:
|
|
2591
|
-
entries:
|
|
2858
|
+
layout: GPUBindGroupLayout;
|
|
2859
|
+
entries: GPUBindGroupEntry[];
|
|
2592
2860
|
}
|
|
2593
|
-
export interface
|
|
2861
|
+
export interface GPUBindGroupEntry {
|
|
2594
2862
|
binding: number;
|
|
2595
|
-
resource:
|
|
2863
|
+
resource: GPUBufferBinding | GPUSampler;
|
|
2596
2864
|
}
|
|
2597
|
-
export interface
|
|
2598
|
-
buffer:
|
|
2865
|
+
export interface GPUBufferBinding {
|
|
2866
|
+
buffer: GPUBuffer;
|
|
2599
2867
|
offset?: number | bigint;
|
|
2600
2868
|
size?: number | bigint;
|
|
2601
2869
|
}
|
|
2602
|
-
export interface
|
|
2603
|
-
export interface
|
|
2870
|
+
export interface GPUSampler {}
|
|
2871
|
+
export interface GPUSamplerDescriptor {
|
|
2604
2872
|
label?: string;
|
|
2605
2873
|
addressModeU?: string;
|
|
2606
2874
|
addressModeV?: string;
|
|
@@ -2613,76 +2881,74 @@ export interface gpuGPUSamplerDescriptor {
|
|
|
2613
2881
|
compare: string;
|
|
2614
2882
|
maxAnisotropy?: number;
|
|
2615
2883
|
}
|
|
2616
|
-
export interface
|
|
2617
|
-
getCompilationInfo(): Promise<
|
|
2884
|
+
export interface GPUShaderModule {
|
|
2885
|
+
getCompilationInfo(): Promise<GPUCompilationInfo>;
|
|
2618
2886
|
}
|
|
2619
|
-
export interface
|
|
2887
|
+
export interface GPUShaderModuleDescriptor {
|
|
2620
2888
|
label?: string;
|
|
2621
2889
|
code: string;
|
|
2622
2890
|
}
|
|
2623
|
-
export interface
|
|
2624
|
-
export interface
|
|
2891
|
+
export interface GPUPipelineLayout {}
|
|
2892
|
+
export interface GPUPipelineLayoutDescriptor {
|
|
2625
2893
|
label?: string;
|
|
2626
|
-
bindGroupLayouts:
|
|
2894
|
+
bindGroupLayouts: GPUBindGroupLayout[];
|
|
2627
2895
|
}
|
|
2628
|
-
export interface
|
|
2629
|
-
getBindGroupLayout(index: number):
|
|
2896
|
+
export interface GPUComputePipeline {
|
|
2897
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
2630
2898
|
}
|
|
2631
|
-
export interface
|
|
2899
|
+
export interface GPUComputePipelineDescriptor {
|
|
2632
2900
|
label?: string;
|
|
2633
|
-
compute:
|
|
2634
|
-
layout: string |
|
|
2901
|
+
compute: GPUProgrammableStage;
|
|
2902
|
+
layout: string | GPUPipelineLayout;
|
|
2635
2903
|
}
|
|
2636
|
-
export interface
|
|
2637
|
-
module:
|
|
2904
|
+
export interface GPUProgrammableStage {
|
|
2905
|
+
module: GPUShaderModule;
|
|
2638
2906
|
entryPoint: string;
|
|
2639
2907
|
constants?: Record<string, number>;
|
|
2640
2908
|
}
|
|
2641
|
-
export interface
|
|
2909
|
+
export interface GPUCommandEncoder {
|
|
2642
2910
|
get label(): string;
|
|
2643
2911
|
beginComputePass(
|
|
2644
|
-
descriptor?:
|
|
2645
|
-
):
|
|
2646
|
-
beginRenderPass(
|
|
2647
|
-
descriptor: gpuGPURenderPassDescriptor,
|
|
2648
|
-
): gpuGPURenderPassEncoder;
|
|
2912
|
+
descriptor?: GPUComputePassDescriptor,
|
|
2913
|
+
): GPUComputePassEncoder;
|
|
2914
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
2649
2915
|
copyBufferToBuffer(
|
|
2650
|
-
source:
|
|
2916
|
+
source: GPUBuffer,
|
|
2651
2917
|
sourceOffset: number | bigint,
|
|
2652
|
-
destination:
|
|
2918
|
+
destination: GPUBuffer,
|
|
2653
2919
|
destinationOffset: number | bigint,
|
|
2654
2920
|
size: number | bigint,
|
|
2655
2921
|
): void;
|
|
2656
|
-
finish(param0?:
|
|
2922
|
+
finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
2657
2923
|
copyTextureToBuffer(
|
|
2658
|
-
source:
|
|
2659
|
-
destination:
|
|
2660
|
-
copySize: Iterable<number> |
|
|
2924
|
+
source: GPUImageCopyTexture,
|
|
2925
|
+
destination: GPUImageCopyBuffer,
|
|
2926
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2661
2927
|
): void;
|
|
2662
2928
|
copyBufferToTexture(
|
|
2663
|
-
source:
|
|
2664
|
-
destination:
|
|
2665
|
-
copySize: Iterable<number> |
|
|
2929
|
+
source: GPUImageCopyBuffer,
|
|
2930
|
+
destination: GPUImageCopyTexture,
|
|
2931
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2666
2932
|
): void;
|
|
2667
2933
|
copyTextureToTexture(
|
|
2668
|
-
source:
|
|
2669
|
-
destination:
|
|
2670
|
-
copySize: Iterable<number> |
|
|
2934
|
+
source: GPUImageCopyTexture,
|
|
2935
|
+
destination: GPUImageCopyTexture,
|
|
2936
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2671
2937
|
): void;
|
|
2672
2938
|
clearBuffer(
|
|
2673
|
-
buffer:
|
|
2939
|
+
buffer: GPUBuffer,
|
|
2674
2940
|
offset?: number | bigint,
|
|
2675
2941
|
size?: number | bigint,
|
|
2676
2942
|
): void;
|
|
2677
2943
|
}
|
|
2678
|
-
export interface
|
|
2944
|
+
export interface GPUCommandEncoderDescriptor {
|
|
2679
2945
|
label?: string;
|
|
2680
2946
|
}
|
|
2681
|
-
export interface
|
|
2682
|
-
setPipeline(pipeline:
|
|
2947
|
+
export interface GPUComputePassEncoder {
|
|
2948
|
+
setPipeline(pipeline: GPUComputePipeline): void;
|
|
2683
2949
|
setBindGroup(
|
|
2684
2950
|
index: number,
|
|
2685
|
-
bindGroup:
|
|
2951
|
+
bindGroup: GPUBindGroup | null,
|
|
2686
2952
|
dynamicOffsets?: Iterable<number>,
|
|
2687
2953
|
): void;
|
|
2688
2954
|
dispatchWorkgroups(
|
|
@@ -2692,48 +2958,48 @@ export interface gpuGPUComputePassEncoder {
|
|
|
2692
2958
|
): void;
|
|
2693
2959
|
end(): void;
|
|
2694
2960
|
}
|
|
2695
|
-
export interface
|
|
2961
|
+
export interface GPUComputePassDescriptor {
|
|
2696
2962
|
label?: string;
|
|
2697
|
-
timestampWrites?:
|
|
2963
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
2698
2964
|
}
|
|
2699
|
-
export interface
|
|
2700
|
-
export interface
|
|
2965
|
+
export interface GPUQuerySet {}
|
|
2966
|
+
export interface GPUQuerySetDescriptor {
|
|
2701
2967
|
label?: string;
|
|
2702
2968
|
}
|
|
2703
|
-
export interface
|
|
2704
|
-
querySet:
|
|
2969
|
+
export interface GPUComputePassTimestampWrites {
|
|
2970
|
+
querySet: GPUQuerySet;
|
|
2705
2971
|
beginningOfPassWriteIndex?: number;
|
|
2706
2972
|
endOfPassWriteIndex?: number;
|
|
2707
2973
|
}
|
|
2708
|
-
export interface
|
|
2974
|
+
export interface GPUCommandBufferDescriptor {
|
|
2709
2975
|
label?: string;
|
|
2710
2976
|
}
|
|
2711
|
-
export interface
|
|
2712
|
-
export interface
|
|
2713
|
-
submit(commandBuffers:
|
|
2977
|
+
export interface GPUCommandBuffer {}
|
|
2978
|
+
export interface GPUQueue {
|
|
2979
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
2714
2980
|
writeBuffer(
|
|
2715
|
-
buffer:
|
|
2981
|
+
buffer: GPUBuffer,
|
|
2716
2982
|
bufferOffset: number | bigint,
|
|
2717
2983
|
data: ArrayBuffer | ArrayBufferView,
|
|
2718
2984
|
dataOffset?: number | bigint,
|
|
2719
2985
|
size?: number | bigint,
|
|
2720
2986
|
): void;
|
|
2721
2987
|
}
|
|
2722
|
-
export declare abstract class
|
|
2988
|
+
export declare abstract class GPUMapMode {
|
|
2723
2989
|
static readonly READ: number;
|
|
2724
2990
|
static readonly WRITE: number;
|
|
2725
2991
|
}
|
|
2726
|
-
export interface
|
|
2992
|
+
export interface GPUAdapterInfo {
|
|
2727
2993
|
get vendor(): string;
|
|
2728
2994
|
get architecture(): string;
|
|
2729
2995
|
get device(): string;
|
|
2730
2996
|
get description(): string;
|
|
2731
2997
|
}
|
|
2732
|
-
export interface
|
|
2998
|
+
export interface GPUSupportedFeatures {
|
|
2733
2999
|
has(name: string): boolean;
|
|
2734
3000
|
keys(): string[];
|
|
2735
3001
|
}
|
|
2736
|
-
export interface
|
|
3002
|
+
export interface GPUSupportedLimits {
|
|
2737
3003
|
get maxTextureDimension1D(): number;
|
|
2738
3004
|
get maxTextureDimension2D(): number;
|
|
2739
3005
|
get maxTextureDimension3D(): number;
|
|
@@ -2766,17 +3032,17 @@ export interface gpuGPUSupportedLimits {
|
|
|
2766
3032
|
get maxComputeWorkgroupSizeZ(): number;
|
|
2767
3033
|
get maxComputeWorkgroupsPerDimension(): number;
|
|
2768
3034
|
}
|
|
2769
|
-
export declare abstract class
|
|
3035
|
+
export declare abstract class GPUError {
|
|
2770
3036
|
get message(): string;
|
|
2771
3037
|
}
|
|
2772
|
-
export declare abstract class
|
|
2773
|
-
export declare abstract class
|
|
2774
|
-
export declare abstract class
|
|
2775
|
-
export declare abstract class
|
|
3038
|
+
export declare abstract class GPUOutOfMemoryError extends GPUError {}
|
|
3039
|
+
export declare abstract class GPUInternalError extends GPUError {}
|
|
3040
|
+
export declare abstract class GPUValidationError extends GPUError {}
|
|
3041
|
+
export declare abstract class GPUDeviceLostInfo {
|
|
2776
3042
|
get message(): string;
|
|
2777
3043
|
get reason(): string;
|
|
2778
3044
|
}
|
|
2779
|
-
export interface
|
|
3045
|
+
export interface GPUCompilationMessage {
|
|
2780
3046
|
get message(): string;
|
|
2781
3047
|
get type(): string;
|
|
2782
3048
|
get lineNum(): number;
|
|
@@ -2784,19 +3050,19 @@ export interface gpuGPUCompilationMessage {
|
|
|
2784
3050
|
get offset(): number;
|
|
2785
3051
|
get length(): number;
|
|
2786
3052
|
}
|
|
2787
|
-
export interface
|
|
2788
|
-
get messages():
|
|
3053
|
+
export interface GPUCompilationInfo {
|
|
3054
|
+
get messages(): GPUCompilationMessage[];
|
|
2789
3055
|
}
|
|
2790
|
-
export declare abstract class
|
|
3056
|
+
export declare abstract class GPUTextureUsage {
|
|
2791
3057
|
static readonly COPY_SRC: number;
|
|
2792
3058
|
static readonly COPY_DST: number;
|
|
2793
3059
|
static readonly TEXTURE_BINDING: number;
|
|
2794
3060
|
static readonly STORAGE_BINDING: number;
|
|
2795
3061
|
static readonly RENDER_ATTACHMENT: number;
|
|
2796
3062
|
}
|
|
2797
|
-
export interface
|
|
3063
|
+
export interface GPUTextureDescriptor {
|
|
2798
3064
|
label: string;
|
|
2799
|
-
size: number[] |
|
|
3065
|
+
size: number[] | GPUExtent3DDict;
|
|
2800
3066
|
mipLevelCount?: number;
|
|
2801
3067
|
sampleCount?: number;
|
|
2802
3068
|
dimension?: string;
|
|
@@ -2804,13 +3070,13 @@ export interface gpuGPUTextureDescriptor {
|
|
|
2804
3070
|
usage: number;
|
|
2805
3071
|
viewFormats?: string[];
|
|
2806
3072
|
}
|
|
2807
|
-
export interface
|
|
3073
|
+
export interface GPUExtent3DDict {
|
|
2808
3074
|
width: number;
|
|
2809
3075
|
height?: number;
|
|
2810
3076
|
depthOrArrayLayers?: number;
|
|
2811
3077
|
}
|
|
2812
|
-
export interface
|
|
2813
|
-
createView(descriptor?:
|
|
3078
|
+
export interface GPUTexture {
|
|
3079
|
+
createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
|
|
2814
3080
|
destroy(): void;
|
|
2815
3081
|
get width(): number;
|
|
2816
3082
|
get height(): number;
|
|
@@ -2820,8 +3086,8 @@ export interface gpuGPUTexture {
|
|
|
2820
3086
|
get format(): string;
|
|
2821
3087
|
get usage(): number;
|
|
2822
3088
|
}
|
|
2823
|
-
export interface
|
|
2824
|
-
export interface
|
|
3089
|
+
export interface GPUTextureView {}
|
|
3090
|
+
export interface GPUTextureViewDescriptor {
|
|
2825
3091
|
label: string;
|
|
2826
3092
|
format: string;
|
|
2827
3093
|
dimension: string;
|
|
@@ -2831,91 +3097,91 @@ export interface gpuGPUTextureViewDescriptor {
|
|
|
2831
3097
|
baseArrayLayer?: number;
|
|
2832
3098
|
arrayLayerCount: number;
|
|
2833
3099
|
}
|
|
2834
|
-
export declare abstract class
|
|
3100
|
+
export declare abstract class GPUColorWrite {
|
|
2835
3101
|
static readonly RED: number;
|
|
2836
3102
|
static readonly GREEN: number;
|
|
2837
3103
|
static readonly BLUE: number;
|
|
2838
3104
|
static readonly ALPHA: number;
|
|
2839
3105
|
static readonly ALL: number;
|
|
2840
3106
|
}
|
|
2841
|
-
export interface
|
|
2842
|
-
export interface
|
|
3107
|
+
export interface GPURenderPipeline {}
|
|
3108
|
+
export interface GPURenderPipelineDescriptor {
|
|
2843
3109
|
label?: string;
|
|
2844
|
-
layout: string |
|
|
2845
|
-
vertex:
|
|
2846
|
-
primitive?:
|
|
2847
|
-
depthStencil?:
|
|
2848
|
-
multisample?:
|
|
2849
|
-
fragment?:
|
|
2850
|
-
}
|
|
2851
|
-
export interface
|
|
2852
|
-
module:
|
|
3110
|
+
layout: string | GPUPipelineLayout;
|
|
3111
|
+
vertex: GPUVertexState;
|
|
3112
|
+
primitive?: GPUPrimitiveState;
|
|
3113
|
+
depthStencil?: GPUDepthStencilState;
|
|
3114
|
+
multisample?: GPUMultisampleState;
|
|
3115
|
+
fragment?: GPUFragmentState;
|
|
3116
|
+
}
|
|
3117
|
+
export interface GPUVertexState {
|
|
3118
|
+
module: GPUShaderModule;
|
|
2853
3119
|
entryPoint: string;
|
|
2854
3120
|
constants?: Record<string, number>;
|
|
2855
|
-
buffers?:
|
|
3121
|
+
buffers?: GPUVertexBufferLayout[];
|
|
2856
3122
|
}
|
|
2857
|
-
export interface
|
|
3123
|
+
export interface GPUVertexBufferLayout {
|
|
2858
3124
|
arrayStride: number | bigint;
|
|
2859
3125
|
stepMode?: string;
|
|
2860
|
-
attributes:
|
|
3126
|
+
attributes: GPUVertexAttribute[];
|
|
2861
3127
|
}
|
|
2862
|
-
export interface
|
|
3128
|
+
export interface GPUVertexAttribute {
|
|
2863
3129
|
format: string;
|
|
2864
3130
|
offset: number | bigint;
|
|
2865
3131
|
shaderLocation: number;
|
|
2866
3132
|
}
|
|
2867
|
-
export interface
|
|
3133
|
+
export interface GPUPrimitiveState {
|
|
2868
3134
|
topology?: string;
|
|
2869
3135
|
stripIndexFormat?: string;
|
|
2870
3136
|
frontFace?: string;
|
|
2871
3137
|
cullMode?: string;
|
|
2872
3138
|
unclippedDepth?: boolean;
|
|
2873
3139
|
}
|
|
2874
|
-
export interface
|
|
3140
|
+
export interface GPUStencilFaceState {
|
|
2875
3141
|
compare?: string;
|
|
2876
3142
|
failOp?: string;
|
|
2877
3143
|
depthFailOp?: string;
|
|
2878
3144
|
passOp?: string;
|
|
2879
3145
|
}
|
|
2880
|
-
export interface
|
|
3146
|
+
export interface GPUDepthStencilState {
|
|
2881
3147
|
format: string;
|
|
2882
3148
|
depthWriteEnabled: boolean;
|
|
2883
3149
|
depthCompare: string;
|
|
2884
|
-
stencilFront?:
|
|
2885
|
-
stencilBack?:
|
|
3150
|
+
stencilFront?: GPUStencilFaceState;
|
|
3151
|
+
stencilBack?: GPUStencilFaceState;
|
|
2886
3152
|
stencilReadMask?: number;
|
|
2887
3153
|
stencilWriteMask?: number;
|
|
2888
3154
|
depthBias?: number;
|
|
2889
3155
|
depthBiasSlopeScale?: number;
|
|
2890
3156
|
depthBiasClamp?: number;
|
|
2891
3157
|
}
|
|
2892
|
-
export interface
|
|
3158
|
+
export interface GPUMultisampleState {
|
|
2893
3159
|
count?: number;
|
|
2894
3160
|
mask?: number;
|
|
2895
3161
|
alphaToCoverageEnabled?: boolean;
|
|
2896
3162
|
}
|
|
2897
|
-
export interface
|
|
2898
|
-
module:
|
|
3163
|
+
export interface GPUFragmentState {
|
|
3164
|
+
module: GPUShaderModule;
|
|
2899
3165
|
entryPoint: string;
|
|
2900
3166
|
constants?: Record<string, number>;
|
|
2901
|
-
targets:
|
|
3167
|
+
targets: GPUColorTargetState[];
|
|
2902
3168
|
}
|
|
2903
|
-
export interface
|
|
3169
|
+
export interface GPUColorTargetState {
|
|
2904
3170
|
format: string;
|
|
2905
|
-
blend:
|
|
3171
|
+
blend: GPUBlendState;
|
|
2906
3172
|
writeMask?: number;
|
|
2907
3173
|
}
|
|
2908
|
-
export interface
|
|
2909
|
-
color:
|
|
2910
|
-
alpha:
|
|
3174
|
+
export interface GPUBlendState {
|
|
3175
|
+
color: GPUBlendComponent;
|
|
3176
|
+
alpha: GPUBlendComponent;
|
|
2911
3177
|
}
|
|
2912
|
-
export interface
|
|
3178
|
+
export interface GPUBlendComponent {
|
|
2913
3179
|
operation?: string;
|
|
2914
3180
|
srcFactor?: string;
|
|
2915
3181
|
dstFactor?: string;
|
|
2916
3182
|
}
|
|
2917
|
-
export interface
|
|
2918
|
-
setPipeline(pipeline:
|
|
3183
|
+
export interface GPURenderPassEncoder {
|
|
3184
|
+
setPipeline(pipeline: GPURenderPipeline): void;
|
|
2919
3185
|
draw(
|
|
2920
3186
|
vertexCount: number,
|
|
2921
3187
|
instanceCount?: number,
|
|
@@ -2924,30 +3190,30 @@ export interface gpuGPURenderPassEncoder {
|
|
|
2924
3190
|
): void;
|
|
2925
3191
|
end(): void;
|
|
2926
3192
|
}
|
|
2927
|
-
export interface
|
|
3193
|
+
export interface GPURenderPassDescriptor {
|
|
2928
3194
|
label?: string;
|
|
2929
|
-
colorAttachments:
|
|
2930
|
-
depthStencilAttachment?:
|
|
2931
|
-
occlusionQuerySet?:
|
|
2932
|
-
timestampWrites?:
|
|
3195
|
+
colorAttachments: GPURenderPassColorAttachment[];
|
|
3196
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
3197
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
3198
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
2933
3199
|
maxDrawCount?: number | bigint;
|
|
2934
3200
|
}
|
|
2935
|
-
export interface
|
|
2936
|
-
view:
|
|
3201
|
+
export interface GPURenderPassColorAttachment {
|
|
3202
|
+
view: GPUTextureView;
|
|
2937
3203
|
depthSlice?: number;
|
|
2938
|
-
resolveTarget?:
|
|
2939
|
-
clearValue?: number[] |
|
|
3204
|
+
resolveTarget?: GPUTextureView;
|
|
3205
|
+
clearValue?: number[] | GPUColorDict;
|
|
2940
3206
|
loadOp: string;
|
|
2941
3207
|
storeOp: string;
|
|
2942
3208
|
}
|
|
2943
|
-
export interface
|
|
3209
|
+
export interface GPUColorDict {
|
|
2944
3210
|
r: number;
|
|
2945
3211
|
g: number;
|
|
2946
3212
|
b: number;
|
|
2947
3213
|
a: number;
|
|
2948
3214
|
}
|
|
2949
|
-
export interface
|
|
2950
|
-
view:
|
|
3215
|
+
export interface GPURenderPassDepthStencilAttachment {
|
|
3216
|
+
view: GPUTextureView;
|
|
2951
3217
|
depthClearValue?: number;
|
|
2952
3218
|
depthLoadOp?: string;
|
|
2953
3219
|
depthStoreOp?: string;
|
|
@@ -2957,28 +3223,373 @@ export interface gpuGPURenderPassDepthStencilAttachment {
|
|
|
2957
3223
|
stencilStoreOp?: string;
|
|
2958
3224
|
stencilReadOnly?: boolean;
|
|
2959
3225
|
}
|
|
2960
|
-
export interface
|
|
2961
|
-
querySet:
|
|
3226
|
+
export interface GPURenderPassTimestampWrites {
|
|
3227
|
+
querySet: GPUQuerySet;
|
|
2962
3228
|
beginningOfPassWriteIndex?: number;
|
|
2963
3229
|
endOfPassWriteIndex?: number;
|
|
2964
3230
|
}
|
|
2965
|
-
export interface
|
|
2966
|
-
texture:
|
|
3231
|
+
export interface GPUImageCopyTexture {
|
|
3232
|
+
texture: GPUTexture;
|
|
2967
3233
|
mipLevel?: number;
|
|
2968
|
-
origin?: number[] |
|
|
3234
|
+
origin?: number[] | GPUOrigin3DDict;
|
|
2969
3235
|
aspect?: string;
|
|
2970
3236
|
}
|
|
2971
|
-
export interface
|
|
2972
|
-
buffer:
|
|
3237
|
+
export interface GPUImageCopyBuffer {
|
|
3238
|
+
buffer: GPUBuffer;
|
|
2973
3239
|
offset?: number | bigint;
|
|
2974
3240
|
bytesPerRow?: number;
|
|
2975
3241
|
rowsPerImage?: number;
|
|
2976
3242
|
}
|
|
2977
|
-
export interface
|
|
3243
|
+
export interface GPUOrigin3DDict {
|
|
2978
3244
|
x?: number;
|
|
2979
3245
|
y?: number;
|
|
2980
3246
|
z?: number;
|
|
2981
3247
|
}
|
|
3248
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3249
|
+
export declare class EventSource {
|
|
3250
|
+
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3251
|
+
/**
|
|
3252
|
+
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
3253
|
+
*
|
|
3254
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3255
|
+
*/
|
|
3256
|
+
close(): void;
|
|
3257
|
+
/**
|
|
3258
|
+
* Returns the URL providing the event stream.
|
|
3259
|
+
*
|
|
3260
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3261
|
+
*/
|
|
3262
|
+
get url(): string;
|
|
3263
|
+
/**
|
|
3264
|
+
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
3265
|
+
*
|
|
3266
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3267
|
+
*/
|
|
3268
|
+
get withCredentials(): boolean;
|
|
3269
|
+
/**
|
|
3270
|
+
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
3271
|
+
*
|
|
3272
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3273
|
+
*/
|
|
3274
|
+
get readyState(): number;
|
|
3275
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3276
|
+
get onopen(): any | null;
|
|
3277
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3278
|
+
set onopen(value: any | null);
|
|
3279
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3280
|
+
get onmessage(): any | null;
|
|
3281
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3282
|
+
set onmessage(value: any | null);
|
|
3283
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3284
|
+
get onerror(): any | null;
|
|
3285
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3286
|
+
set onerror(value: any | null);
|
|
3287
|
+
static readonly CONNECTING: number;
|
|
3288
|
+
static readonly OPEN: number;
|
|
3289
|
+
static readonly CLOSED: number;
|
|
3290
|
+
static from(stream: ReadableStream): EventSource;
|
|
3291
|
+
}
|
|
3292
|
+
export interface EventSourceEventSourceInit {
|
|
3293
|
+
withCredentials?: boolean;
|
|
3294
|
+
fetcher?: Fetcher;
|
|
3295
|
+
}
|
|
3296
|
+
export type AiImageClassificationInput = {
|
|
3297
|
+
image: number[];
|
|
3298
|
+
};
|
|
3299
|
+
export type AiImageClassificationOutput = {
|
|
3300
|
+
score?: number;
|
|
3301
|
+
label?: string;
|
|
3302
|
+
}[];
|
|
3303
|
+
export declare abstract class BaseAiImageClassification {
|
|
3304
|
+
inputs: AiImageClassificationInput;
|
|
3305
|
+
postProcessedOutputs: AiImageClassificationOutput;
|
|
3306
|
+
}
|
|
3307
|
+
export type AiImageToTextInput = {
|
|
3308
|
+
image: number[];
|
|
3309
|
+
prompt?: string;
|
|
3310
|
+
max_tokens?: number;
|
|
3311
|
+
temperature?: number;
|
|
3312
|
+
top_p?: number;
|
|
3313
|
+
top_k?: number;
|
|
3314
|
+
seed?: number;
|
|
3315
|
+
repetition_penalty?: number;
|
|
3316
|
+
frequency_penalty?: number;
|
|
3317
|
+
presence_penalty?: number;
|
|
3318
|
+
raw?: boolean;
|
|
3319
|
+
messages?: RoleScopedChatInput[];
|
|
3320
|
+
};
|
|
3321
|
+
export type AiImageToTextOutput = {
|
|
3322
|
+
description: string;
|
|
3323
|
+
};
|
|
3324
|
+
export declare abstract class BaseAiImageToText {
|
|
3325
|
+
inputs: AiImageToTextInput;
|
|
3326
|
+
postProcessedOutputs: AiImageToTextOutput;
|
|
3327
|
+
}
|
|
3328
|
+
export type AiObjectDetectionInput = {
|
|
3329
|
+
image: number[];
|
|
3330
|
+
};
|
|
3331
|
+
export type AiObjectDetectionOutput = {
|
|
3332
|
+
score?: number;
|
|
3333
|
+
label?: string;
|
|
3334
|
+
}[];
|
|
3335
|
+
export declare abstract class BaseAiObjectDetection {
|
|
3336
|
+
inputs: AiObjectDetectionInput;
|
|
3337
|
+
postProcessedOutputs: AiObjectDetectionOutput;
|
|
3338
|
+
}
|
|
3339
|
+
export type AiSentenceSimilarityInput = {
|
|
3340
|
+
source: string;
|
|
3341
|
+
sentences: string[];
|
|
3342
|
+
};
|
|
3343
|
+
export type AiSentenceSimilarityOutput = number[];
|
|
3344
|
+
export declare abstract class BaseAiSentenceSimilarity {
|
|
3345
|
+
inputs: AiSentenceSimilarityInput;
|
|
3346
|
+
postProcessedOutputs: AiSentenceSimilarityOutput;
|
|
3347
|
+
}
|
|
3348
|
+
export type AiSpeechRecognitionInput = {
|
|
3349
|
+
audio: number[];
|
|
3350
|
+
};
|
|
3351
|
+
export type AiSpeechRecognitionOutput = {
|
|
3352
|
+
text?: string;
|
|
3353
|
+
words?: {
|
|
3354
|
+
word: string;
|
|
3355
|
+
start: number;
|
|
3356
|
+
end: number;
|
|
3357
|
+
}[];
|
|
3358
|
+
vtt?: string;
|
|
3359
|
+
};
|
|
3360
|
+
export declare abstract class BaseAiSpeechRecognition {
|
|
3361
|
+
inputs: AiSpeechRecognitionInput;
|
|
3362
|
+
postProcessedOutputs: AiSpeechRecognitionOutput;
|
|
3363
|
+
}
|
|
3364
|
+
export type AiSummarizationInput = {
|
|
3365
|
+
input_text: string;
|
|
3366
|
+
max_length?: number;
|
|
3367
|
+
};
|
|
3368
|
+
export type AiSummarizationOutput = {
|
|
3369
|
+
summary: string;
|
|
3370
|
+
};
|
|
3371
|
+
export declare abstract class BaseAiSummarization {
|
|
3372
|
+
inputs: AiSummarizationInput;
|
|
3373
|
+
postProcessedOutputs: AiSummarizationOutput;
|
|
3374
|
+
}
|
|
3375
|
+
export type AiTextClassificationInput = {
|
|
3376
|
+
text: string;
|
|
3377
|
+
};
|
|
3378
|
+
export type AiTextClassificationOutput = {
|
|
3379
|
+
score?: number;
|
|
3380
|
+
label?: string;
|
|
3381
|
+
}[];
|
|
3382
|
+
export declare abstract class BaseAiTextClassification {
|
|
3383
|
+
inputs: AiTextClassificationInput;
|
|
3384
|
+
postProcessedOutputs: AiTextClassificationOutput;
|
|
3385
|
+
}
|
|
3386
|
+
export type AiTextEmbeddingsInput = {
|
|
3387
|
+
text: string | string[];
|
|
3388
|
+
};
|
|
3389
|
+
export type AiTextEmbeddingsOutput = {
|
|
3390
|
+
shape: number[];
|
|
3391
|
+
data: number[][];
|
|
3392
|
+
};
|
|
3393
|
+
export declare abstract class BaseAiTextEmbeddings {
|
|
3394
|
+
inputs: AiTextEmbeddingsInput;
|
|
3395
|
+
postProcessedOutputs: AiTextEmbeddingsOutput;
|
|
3396
|
+
}
|
|
3397
|
+
export type RoleScopedChatInput = {
|
|
3398
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
3399
|
+
content: string;
|
|
3400
|
+
};
|
|
3401
|
+
export type AiTextGenerationToolInput = {
|
|
3402
|
+
type: "function";
|
|
3403
|
+
function: {
|
|
3404
|
+
name: string;
|
|
3405
|
+
description: string;
|
|
3406
|
+
parameters?: {
|
|
3407
|
+
type: "object";
|
|
3408
|
+
properties: {
|
|
3409
|
+
[key: string]: {
|
|
3410
|
+
type: string;
|
|
3411
|
+
description?: string;
|
|
3412
|
+
};
|
|
3413
|
+
};
|
|
3414
|
+
required: string[];
|
|
3415
|
+
};
|
|
3416
|
+
};
|
|
3417
|
+
};
|
|
3418
|
+
export type AiTextGenerationInput = {
|
|
3419
|
+
prompt?: string;
|
|
3420
|
+
raw?: boolean;
|
|
3421
|
+
stream?: boolean;
|
|
3422
|
+
max_tokens?: number;
|
|
3423
|
+
temperature?: number;
|
|
3424
|
+
top_p?: number;
|
|
3425
|
+
top_k?: number;
|
|
3426
|
+
seed?: number;
|
|
3427
|
+
repetition_penalty?: number;
|
|
3428
|
+
frequency_penalty?: number;
|
|
3429
|
+
presence_penalty?: number;
|
|
3430
|
+
messages?: RoleScopedChatInput[];
|
|
3431
|
+
tools?: AiTextGenerationToolInput[];
|
|
3432
|
+
};
|
|
3433
|
+
export type AiTextGenerationOutput =
|
|
3434
|
+
| {
|
|
3435
|
+
response?: string;
|
|
3436
|
+
tool_calls?: {
|
|
3437
|
+
name: string;
|
|
3438
|
+
arguments: unknown;
|
|
3439
|
+
}[];
|
|
3440
|
+
}
|
|
3441
|
+
| ReadableStream;
|
|
3442
|
+
export declare abstract class BaseAiTextGeneration {
|
|
3443
|
+
inputs: AiTextGenerationInput;
|
|
3444
|
+
postProcessedOutputs: AiTextGenerationOutput;
|
|
3445
|
+
}
|
|
3446
|
+
export type AiTextToImageInput = {
|
|
3447
|
+
prompt: string;
|
|
3448
|
+
image?: number[];
|
|
3449
|
+
mask?: number[];
|
|
3450
|
+
num_steps?: number;
|
|
3451
|
+
strength?: number;
|
|
3452
|
+
guidance?: number;
|
|
3453
|
+
};
|
|
3454
|
+
export type AiTextToImageOutput = Uint8Array;
|
|
3455
|
+
export declare abstract class BaseAiTextToImage {
|
|
3456
|
+
inputs: AiTextToImageInput;
|
|
3457
|
+
postProcessedOutputs: AiTextToImageOutput;
|
|
3458
|
+
}
|
|
3459
|
+
export type AiTranslationInput = {
|
|
3460
|
+
text: string;
|
|
3461
|
+
target_lang: string;
|
|
3462
|
+
source_lang?: string;
|
|
3463
|
+
};
|
|
3464
|
+
export type AiTranslationOutput = {
|
|
3465
|
+
translated_text?: string;
|
|
3466
|
+
};
|
|
3467
|
+
export declare abstract class BaseAiTranslation {
|
|
3468
|
+
inputs: AiTranslationInput;
|
|
3469
|
+
postProcessedOutputs: AiTranslationOutput;
|
|
3470
|
+
}
|
|
3471
|
+
export type GatewayOptions = {
|
|
3472
|
+
id: string;
|
|
3473
|
+
cacheTtl?: number;
|
|
3474
|
+
skipCache?: boolean;
|
|
3475
|
+
metadata?: Record<string, number | string | boolean | null | bigint>;
|
|
3476
|
+
};
|
|
3477
|
+
export type AiOptions = {
|
|
3478
|
+
gateway?: GatewayOptions;
|
|
3479
|
+
prefix?: string;
|
|
3480
|
+
extraHeaders?: object;
|
|
3481
|
+
};
|
|
3482
|
+
export type BaseAiTextClassificationModels =
|
|
3483
|
+
"@cf/huggingface/distilbert-sst-2-int8";
|
|
3484
|
+
export type BaseAiTextToImageModels =
|
|
3485
|
+
| "@cf/stabilityai/stable-diffusion-xl-base-1.0"
|
|
3486
|
+
| "@cf/runwayml/stable-diffusion-v1-5-inpainting"
|
|
3487
|
+
| "@cf/runwayml/stable-diffusion-v1-5-img2img"
|
|
3488
|
+
| "@cf/lykon/dreamshaper-8-lcm"
|
|
3489
|
+
| "@cf/bytedance/stable-diffusion-xl-lightning";
|
|
3490
|
+
export type BaseAiTextEmbeddingsModels =
|
|
3491
|
+
| "@cf/baai/bge-small-en-v1.5"
|
|
3492
|
+
| "@cf/baai/bge-base-en-v1.5"
|
|
3493
|
+
| "@cf/baai/bge-large-en-v1.5";
|
|
3494
|
+
export type BaseAiSpeechRecognitionModels =
|
|
3495
|
+
| "@cf/openai/whisper"
|
|
3496
|
+
| "@cf/openai/whisper-tiny-en"
|
|
3497
|
+
| "@cf/openai/whisper-sherpa";
|
|
3498
|
+
export type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
|
|
3499
|
+
export type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
|
|
3500
|
+
export type BaseAiTextGenerationModels =
|
|
3501
|
+
| "@cf/meta/llama-3-8b-instruct"
|
|
3502
|
+
| "@cf/meta/llama-3-8b-instruct-awq"
|
|
3503
|
+
| "@cf/meta/llama-2-7b-chat-int8"
|
|
3504
|
+
| "@cf/mistral/mistral-7b-instruct-v0.1"
|
|
3505
|
+
| "@cf/mistral/mistral-7b-instruct-v0.2-lora"
|
|
3506
|
+
| "@cf/meta/llama-2-7b-chat-fp16"
|
|
3507
|
+
| "@hf/thebloke/llama-2-13b-chat-awq"
|
|
3508
|
+
| "@hf/thebloke/zephyr-7b-beta-awq"
|
|
3509
|
+
| "@hf/thebloke/mistral-7b-instruct-v0.1-awq"
|
|
3510
|
+
| "@hf/thebloke/codellama-7b-instruct-awq"
|
|
3511
|
+
| "@hf/thebloke/openhermes-2.5-mistral-7b-awq"
|
|
3512
|
+
| "@hf/thebloke/neural-chat-7b-v3-1-awq"
|
|
3513
|
+
| "@hf/thebloke/llamaguard-7b-awq"
|
|
3514
|
+
| "@hf/thebloke/deepseek-coder-6.7b-base-awq"
|
|
3515
|
+
| "@hf/thebloke/deepseek-coder-6.7b-instruct-awq"
|
|
3516
|
+
| "@hf/nousresearch/hermes-2-pro-mistral-7b"
|
|
3517
|
+
| "@hf/mistral/mistral-7b-instruct-v0.2"
|
|
3518
|
+
| "@hf/google/gemma-7b-it"
|
|
3519
|
+
| "@hf/nexusflow/starling-lm-7b-beta"
|
|
3520
|
+
| "@cf/deepseek-ai/deepseek-math-7b-instruct"
|
|
3521
|
+
| "@cf/defog/sqlcoder-7b-2"
|
|
3522
|
+
| "@cf/openchat/openchat-3.5-0106"
|
|
3523
|
+
| "@cf/tiiuae/falcon-7b-instruct"
|
|
3524
|
+
| "@cf/thebloke/discolm-german-7b-v1-awq"
|
|
3525
|
+
| "@cf/qwen/qwen1.5-0.5b-chat"
|
|
3526
|
+
| "@cf/qwen/qwen1.5-1.8b-chat"
|
|
3527
|
+
| "@cf/qwen/qwen1.5-7b-chat-awq"
|
|
3528
|
+
| "@cf/qwen/qwen1.5-14b-chat-awq"
|
|
3529
|
+
| "@cf/tinyllama/tinyllama-1.1b-chat-v1.0"
|
|
3530
|
+
| "@cf/microsoft/phi-2"
|
|
3531
|
+
| "@cf/google/gemma-2b-it-lora"
|
|
3532
|
+
| "@cf/google/gemma-7b-it-lora"
|
|
3533
|
+
| "@cf/meta-llama/llama-2-7b-chat-hf-lora"
|
|
3534
|
+
| "@cf/fblgit/una-cybertron-7b-v2-bf16"
|
|
3535
|
+
| "@cf/fblgit/una-cybertron-7b-v2-awq";
|
|
3536
|
+
export type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
|
|
3537
|
+
export type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
|
|
3538
|
+
export type BaseAiImageToTextModels =
|
|
3539
|
+
| "@cf/unum/uform-gen2-qwen-500m"
|
|
3540
|
+
| "@cf/llava-hf/llava-1.5-7b-hf";
|
|
3541
|
+
export declare abstract class Ai {
|
|
3542
|
+
run(
|
|
3543
|
+
model: BaseAiTextClassificationModels,
|
|
3544
|
+
inputs: BaseAiTextClassification["inputs"],
|
|
3545
|
+
options?: AiOptions,
|
|
3546
|
+
): Promise<BaseAiTextClassification["postProcessedOutputs"]>;
|
|
3547
|
+
run(
|
|
3548
|
+
model: BaseAiTextToImageModels,
|
|
3549
|
+
inputs: BaseAiTextToImage["inputs"],
|
|
3550
|
+
options?: AiOptions,
|
|
3551
|
+
): Promise<BaseAiTextToImage["postProcessedOutputs"]>;
|
|
3552
|
+
run(
|
|
3553
|
+
model: BaseAiTextEmbeddingsModels,
|
|
3554
|
+
inputs: BaseAiTextEmbeddings["inputs"],
|
|
3555
|
+
options?: AiOptions,
|
|
3556
|
+
): Promise<BaseAiTextEmbeddings["postProcessedOutputs"]>;
|
|
3557
|
+
run(
|
|
3558
|
+
model: BaseAiSpeechRecognitionModels,
|
|
3559
|
+
inputs: BaseAiSpeechRecognition["inputs"],
|
|
3560
|
+
options?: AiOptions,
|
|
3561
|
+
): Promise<BaseAiSpeechRecognition["postProcessedOutputs"]>;
|
|
3562
|
+
run(
|
|
3563
|
+
model: BaseAiImageClassificationModels,
|
|
3564
|
+
inputs: BaseAiImageClassification["inputs"],
|
|
3565
|
+
options?: AiOptions,
|
|
3566
|
+
): Promise<BaseAiImageClassification["postProcessedOutputs"]>;
|
|
3567
|
+
run(
|
|
3568
|
+
model: BaseAiObjectDetectionModels,
|
|
3569
|
+
inputs: BaseAiObjectDetection["inputs"],
|
|
3570
|
+
options?: AiOptions,
|
|
3571
|
+
): Promise<BaseAiObjectDetection["postProcessedOutputs"]>;
|
|
3572
|
+
run(
|
|
3573
|
+
model: BaseAiTextGenerationModels,
|
|
3574
|
+
inputs: BaseAiTextGeneration["inputs"],
|
|
3575
|
+
options?: AiOptions,
|
|
3576
|
+
): Promise<BaseAiTextGeneration["postProcessedOutputs"]>;
|
|
3577
|
+
run(
|
|
3578
|
+
model: BaseAiTranslationModels,
|
|
3579
|
+
inputs: BaseAiTranslation["inputs"],
|
|
3580
|
+
options?: AiOptions,
|
|
3581
|
+
): Promise<BaseAiTranslation["postProcessedOutputs"]>;
|
|
3582
|
+
run(
|
|
3583
|
+
model: BaseAiSummarizationModels,
|
|
3584
|
+
inputs: BaseAiSummarization["inputs"],
|
|
3585
|
+
options?: AiOptions,
|
|
3586
|
+
): Promise<BaseAiSummarization["postProcessedOutputs"]>;
|
|
3587
|
+
run(
|
|
3588
|
+
model: BaseAiImageToTextModels,
|
|
3589
|
+
inputs: BaseAiImageToText["inputs"],
|
|
3590
|
+
options?: AiOptions,
|
|
3591
|
+
): Promise<BaseAiImageToText["postProcessedOutputs"]>;
|
|
3592
|
+
}
|
|
2982
3593
|
export interface BasicImageTransformations {
|
|
2983
3594
|
/**
|
|
2984
3595
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3093,6 +3704,7 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
3093
3704
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
3094
3705
|
mirage?: boolean;
|
|
3095
3706
|
polish?: "lossy" | "lossless" | "off";
|
|
3707
|
+
r2?: RequestInitCfPropertiesR2;
|
|
3096
3708
|
/**
|
|
3097
3709
|
* Redirects the request to an alternate origin server. You can use this,
|
|
3098
3710
|
* for example, to implement load balancing across several origins.
|
|
@@ -3277,6 +3889,12 @@ export interface RequestInitCfPropertiesImageMinify {
|
|
|
3277
3889
|
css?: boolean;
|
|
3278
3890
|
html?: boolean;
|
|
3279
3891
|
}
|
|
3892
|
+
export interface RequestInitCfPropertiesR2 {
|
|
3893
|
+
/**
|
|
3894
|
+
* Colo id of bucket that an object is stored in
|
|
3895
|
+
*/
|
|
3896
|
+
bucketColoId?: number;
|
|
3897
|
+
}
|
|
3280
3898
|
/**
|
|
3281
3899
|
* Request metadata provided by Cloudflare's edge.
|
|
3282
3900
|
*/
|
|
@@ -3669,7 +4287,7 @@ export interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
|
|
|
3669
4287
|
certNotAfter: "";
|
|
3670
4288
|
}
|
|
3671
4289
|
/** Possible outcomes of TLS verification */
|
|
3672
|
-
export type CertVerificationStatus =
|
|
4290
|
+
export declare type CertVerificationStatus =
|
|
3673
4291
|
/** Authentication succeeded */
|
|
3674
4292
|
| "SUCCESS"
|
|
3675
4293
|
/** No certificate was presented */
|
|
@@ -3687,7 +4305,7 @@ export type CertVerificationStatus =
|
|
|
3687
4305
|
/**
|
|
3688
4306
|
* An upstream endpoint's response to a TCP `keepalive` message from Cloudflare.
|
|
3689
4307
|
*/
|
|
3690
|
-
export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
4308
|
+
export declare type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
3691
4309
|
| 0 /** Unknown */
|
|
3692
4310
|
| 1 /** no keepalives (not found) */
|
|
3693
4311
|
| 2 /** no connection re-use, opening keepalive connection failed */
|
|
@@ -3695,7 +4313,7 @@ export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
|
3695
4313
|
| 4 /** connection re-use, refused by the origin server (`TCP FIN`) */
|
|
3696
4314
|
| 5; /** connection re-use, accepted by the origin server */
|
|
3697
4315
|
/** ISO 3166-1 Alpha-2 codes */
|
|
3698
|
-
export type Iso3166Alpha2Code =
|
|
4316
|
+
export declare type Iso3166Alpha2Code =
|
|
3699
4317
|
| "AD"
|
|
3700
4318
|
| "AE"
|
|
3701
4319
|
| "AF"
|
|
@@ -3946,7 +4564,14 @@ export type Iso3166Alpha2Code =
|
|
|
3946
4564
|
| "ZM"
|
|
3947
4565
|
| "ZW";
|
|
3948
4566
|
/** The 2-letter continent codes Cloudflare uses */
|
|
3949
|
-
export type ContinentCode =
|
|
4567
|
+
export declare type ContinentCode =
|
|
4568
|
+
| "AF"
|
|
4569
|
+
| "AN"
|
|
4570
|
+
| "AS"
|
|
4571
|
+
| "EU"
|
|
4572
|
+
| "NA"
|
|
4573
|
+
| "OC"
|
|
4574
|
+
| "SA";
|
|
3950
4575
|
export type CfProperties<HostMetadata = unknown> =
|
|
3951
4576
|
| IncomingRequestCfProperties<HostMetadata>
|
|
3952
4577
|
| RequestInitCfProperties;
|
|
@@ -4047,7 +4672,7 @@ export interface SendEmail {
|
|
|
4047
4672
|
export declare abstract class EmailEvent extends ExtendableEvent {
|
|
4048
4673
|
readonly message: ForwardableEmailMessage;
|
|
4049
4674
|
}
|
|
4050
|
-
export type EmailExportedHandler<Env = unknown> = (
|
|
4675
|
+
export declare type EmailExportedHandler<Env = unknown> = (
|
|
4051
4676
|
message: ForwardableEmailMessage,
|
|
4052
4677
|
env: Env,
|
|
4053
4678
|
ctx: ExecutionContext,
|
|
@@ -4176,6 +4801,20 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
|
|
|
4176
4801
|
// Key Identifier of the JWK
|
|
4177
4802
|
readonly kid: string;
|
|
4178
4803
|
}
|
|
4804
|
+
export interface RateLimitOptions {
|
|
4805
|
+
key: string;
|
|
4806
|
+
}
|
|
4807
|
+
export interface RateLimitOutcome {
|
|
4808
|
+
success: boolean;
|
|
4809
|
+
}
|
|
4810
|
+
export interface RateLimit {
|
|
4811
|
+
/**
|
|
4812
|
+
* Rate limit a request based on the provided options.
|
|
4813
|
+
* @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
|
|
4814
|
+
* @returns A promise that resolves with the outcome of the rate limit.
|
|
4815
|
+
*/
|
|
4816
|
+
limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
|
|
4817
|
+
}
|
|
4179
4818
|
// Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
|
|
4180
4819
|
// to referenced by `Fetcher`. This is included in the "importable" version of the types which
|
|
4181
4820
|
// strips all `module` blocks.
|
|
@@ -4439,6 +5078,15 @@ export interface VectorizeVectorMutation {
|
|
|
4439
5078
|
/* Total count of the number of processed vectors. */
|
|
4440
5079
|
count: number;
|
|
4441
5080
|
}
|
|
5081
|
+
/**
|
|
5082
|
+
* Results of an operation that performed a mutation on a set of vectors
|
|
5083
|
+
* with the v2 version of Vectorize.
|
|
5084
|
+
* Here, `mutationId` is the identifier for the last mutation processed by Vectorize.
|
|
5085
|
+
*/
|
|
5086
|
+
export interface VectorizeVectorMutationV2 {
|
|
5087
|
+
/* The identifier for the last mutation processed by Vectorize. */
|
|
5088
|
+
mutationId: string;
|
|
5089
|
+
}
|
|
4442
5090
|
export declare abstract class VectorizeIndex {
|
|
4443
5091
|
/**
|
|
4444
5092
|
* Get information about the currently bound index.
|
|
@@ -4489,6 +5137,8 @@ export type WorkerVersionMetadata = {
|
|
|
4489
5137
|
id: string;
|
|
4490
5138
|
/** The tag of the Worker Version using this binding */
|
|
4491
5139
|
tag: string;
|
|
5140
|
+
/** The timestamp of when the Worker Version was uploaded */
|
|
5141
|
+
timestamp: string;
|
|
4492
5142
|
};
|
|
4493
5143
|
export interface DynamicDispatchLimits {
|
|
4494
5144
|
/**
|