@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/2022-03-21/index.ts
CHANGED
|
@@ -14,11 +14,16 @@ and limitations under the License.
|
|
|
14
14
|
***************************************************************************** */
|
|
15
15
|
/* eslint-disable */
|
|
16
16
|
// noinspection JSUnusedGlobalSymbols
|
|
17
|
+
/**
|
|
18
|
+
* An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
|
|
19
|
+
*
|
|
20
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
|
|
21
|
+
*/
|
|
17
22
|
export declare class DOMException extends Error {
|
|
18
23
|
constructor(message?: string, name?: string);
|
|
19
|
-
|
|
24
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
|
|
20
25
|
readonly message: string;
|
|
21
|
-
|
|
26
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
|
|
22
27
|
readonly name: string;
|
|
23
28
|
/**
|
|
24
29
|
* @deprecated
|
|
@@ -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;
|
|
@@ -277,16 +287,16 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
277
287
|
FixedLengthStream: typeof FixedLengthStream;
|
|
278
288
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
279
289
|
HTMLRewriter: typeof HTMLRewriter;
|
|
280
|
-
GPUAdapter: typeof
|
|
281
|
-
GPUOutOfMemoryError: typeof
|
|
282
|
-
GPUValidationError: typeof
|
|
283
|
-
GPUInternalError: typeof
|
|
284
|
-
GPUDeviceLostInfo: typeof
|
|
285
|
-
GPUBufferUsage: typeof
|
|
286
|
-
GPUShaderStage: typeof
|
|
287
|
-
GPUMapMode: typeof
|
|
288
|
-
GPUTextureUsage: typeof
|
|
289
|
-
GPUColorWrite: typeof
|
|
290
|
+
GPUAdapter: typeof GPUAdapter;
|
|
291
|
+
GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
|
|
292
|
+
GPUValidationError: typeof GPUValidationError;
|
|
293
|
+
GPUInternalError: typeof GPUInternalError;
|
|
294
|
+
GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
|
|
295
|
+
GPUBufferUsage: typeof GPUBufferUsage;
|
|
296
|
+
GPUShaderStage: typeof GPUShaderStage;
|
|
297
|
+
GPUMapMode: typeof GPUMapMode;
|
|
298
|
+
GPUTextureUsage: typeof GPUTextureUsage;
|
|
299
|
+
GPUColorWrite: typeof GPUColorWrite;
|
|
290
300
|
}
|
|
291
301
|
export declare function addEventListener<
|
|
292
302
|
Type extends keyof WorkerGlobalScopeEventMap,
|
|
@@ -310,52 +320,73 @@ export declare function removeEventListener<
|
|
|
310
320
|
export declare function dispatchEvent(
|
|
311
321
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
312
322
|
): boolean;
|
|
313
|
-
|
|
323
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
314
324
|
export declare function btoa(data: string): string;
|
|
315
|
-
|
|
325
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
316
326
|
export declare function atob(data: string): string;
|
|
317
|
-
|
|
327
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
318
328
|
export declare function setTimeout(
|
|
319
329
|
callback: (...args: any[]) => void,
|
|
320
330
|
msDelay?: number,
|
|
321
331
|
): number;
|
|
322
|
-
|
|
332
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
323
333
|
export declare function setTimeout<Args extends any[]>(
|
|
324
334
|
callback: (...args: Args) => void,
|
|
325
335
|
msDelay?: number,
|
|
326
336
|
...args: Args
|
|
327
337
|
): number;
|
|
328
|
-
|
|
338
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
329
339
|
export declare function clearTimeout(timeoutId: number | null): void;
|
|
330
|
-
|
|
340
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
331
341
|
export declare function setInterval(
|
|
332
342
|
callback: (...args: any[]) => void,
|
|
333
343
|
msDelay?: number,
|
|
334
344
|
): number;
|
|
335
|
-
|
|
345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
336
346
|
export declare function setInterval<Args extends any[]>(
|
|
337
347
|
callback: (...args: Args) => void,
|
|
338
348
|
msDelay?: number,
|
|
339
349
|
...args: Args
|
|
340
350
|
): number;
|
|
341
|
-
|
|
351
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
342
352
|
export declare function clearInterval(timeoutId: number | null): void;
|
|
343
|
-
|
|
353
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
344
354
|
export declare function queueMicrotask(task: Function): void;
|
|
345
|
-
|
|
355
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
346
356
|
export declare function structuredClone<T>(
|
|
347
357
|
value: T,
|
|
348
358
|
options?: StructuredSerializeOptions,
|
|
349
359
|
): T;
|
|
350
|
-
|
|
360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
361
|
+
export declare function reportError(error: any): void;
|
|
362
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
351
363
|
export declare function fetch(
|
|
352
364
|
input: RequestInfo,
|
|
353
365
|
init?: RequestInit<RequestInitCfProperties>,
|
|
354
366
|
): Promise<Response>;
|
|
355
367
|
export declare const self: ServiceWorkerGlobalScope;
|
|
368
|
+
/**
|
|
369
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
370
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
371
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
372
|
+
* compared to those implemented in most browsers.
|
|
373
|
+
*
|
|
374
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
375
|
+
*/
|
|
356
376
|
export declare const crypto: Crypto;
|
|
377
|
+
/**
|
|
378
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
379
|
+
*
|
|
380
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
381
|
+
*/
|
|
357
382
|
export declare const caches: CacheStorage;
|
|
358
383
|
export declare const scheduler: Scheduler;
|
|
384
|
+
/**
|
|
385
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
386
|
+
* as well as timing of subrequests and other operations.
|
|
387
|
+
*
|
|
388
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
389
|
+
*/
|
|
359
390
|
export declare const performance: Performance;
|
|
360
391
|
export declare const origin: string;
|
|
361
392
|
export declare const navigator: Navigator;
|
|
@@ -413,10 +444,11 @@ export interface ExportedHandler<
|
|
|
413
444
|
export interface StructuredSerializeOptions {
|
|
414
445
|
transfer?: any[];
|
|
415
446
|
}
|
|
447
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
416
448
|
export declare abstract class PromiseRejectionEvent extends Event {
|
|
417
|
-
|
|
449
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
418
450
|
readonly promise: Promise<any>;
|
|
419
|
-
|
|
451
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
420
452
|
readonly reason: any;
|
|
421
453
|
}
|
|
422
454
|
export declare abstract class Navigator {
|
|
@@ -431,17 +463,18 @@ export declare abstract class Navigator {
|
|
|
431
463
|
| FormData,
|
|
432
464
|
): boolean;
|
|
433
465
|
readonly userAgent: string;
|
|
434
|
-
readonly gpu:
|
|
466
|
+
readonly gpu: GPU;
|
|
435
467
|
}
|
|
436
468
|
/**
|
|
437
|
-
*
|
|
469
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
470
|
+
* as well as timing of subrequests and other operations.
|
|
438
471
|
*
|
|
439
|
-
* [
|
|
472
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
440
473
|
*/
|
|
441
474
|
export interface Performance {
|
|
442
|
-
|
|
475
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
443
476
|
readonly timeOrigin: number;
|
|
444
|
-
|
|
477
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
445
478
|
now(): number;
|
|
446
479
|
}
|
|
447
480
|
export interface AlarmInvocationInfo {
|
|
@@ -630,6 +663,11 @@ export interface AnalyticsEngineDataPoint {
|
|
|
630
663
|
doubles?: number[];
|
|
631
664
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
632
665
|
}
|
|
666
|
+
/**
|
|
667
|
+
* An event which takes place in the DOM.
|
|
668
|
+
*
|
|
669
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
670
|
+
*/
|
|
633
671
|
export declare class Event {
|
|
634
672
|
constructor(type: string, init?: EventInit);
|
|
635
673
|
/**
|
|
@@ -753,6 +791,11 @@ export interface EventListenerObject<EventType extends Event = Event> {
|
|
|
753
791
|
export type EventListenerOrEventListenerObject<
|
|
754
792
|
EventType extends Event = Event,
|
|
755
793
|
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
794
|
+
/**
|
|
795
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
796
|
+
*
|
|
797
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
798
|
+
*/
|
|
756
799
|
export declare class EventTarget<
|
|
757
800
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
758
801
|
> {
|
|
@@ -808,6 +851,11 @@ export interface EventTargetAddEventListenerOptions {
|
|
|
808
851
|
export interface EventTargetHandlerObject {
|
|
809
852
|
handleEvent: (event: Event) => any | undefined;
|
|
810
853
|
}
|
|
854
|
+
/**
|
|
855
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
856
|
+
*
|
|
857
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
858
|
+
*/
|
|
811
859
|
export declare class AbortController {
|
|
812
860
|
constructor();
|
|
813
861
|
/**
|
|
@@ -823,11 +871,17 @@ export declare class AbortController {
|
|
|
823
871
|
*/
|
|
824
872
|
abort(reason?: any): void;
|
|
825
873
|
}
|
|
874
|
+
/**
|
|
875
|
+
* A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
|
|
876
|
+
*
|
|
877
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
878
|
+
*/
|
|
826
879
|
export declare abstract class AbortSignal extends EventTarget {
|
|
827
|
-
|
|
880
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
828
881
|
static abort(reason?: any): AbortSignal;
|
|
829
|
-
|
|
882
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
830
883
|
static timeout(delay: number): AbortSignal;
|
|
884
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
831
885
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
832
886
|
/**
|
|
833
887
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -835,13 +889,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
835
889
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
836
890
|
*/
|
|
837
891
|
get aborted(): boolean;
|
|
838
|
-
|
|
892
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
839
893
|
get reason(): any;
|
|
840
|
-
|
|
894
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
841
895
|
get onabort(): any | null;
|
|
842
|
-
|
|
896
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
843
897
|
set onabort(value: any | null);
|
|
844
|
-
|
|
898
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
845
899
|
throwIfAborted(): void;
|
|
846
900
|
}
|
|
847
901
|
export interface Scheduler {
|
|
@@ -850,10 +904,16 @@ export interface Scheduler {
|
|
|
850
904
|
export interface SchedulerWaitOptions {
|
|
851
905
|
signal?: AbortSignal;
|
|
852
906
|
}
|
|
907
|
+
/**
|
|
908
|
+
* Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
|
|
909
|
+
*
|
|
910
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
911
|
+
*/
|
|
853
912
|
export declare abstract class ExtendableEvent extends Event {
|
|
854
|
-
|
|
913
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
855
914
|
waitUntil(promise: Promise<any>): void;
|
|
856
915
|
}
|
|
916
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
857
917
|
export declare class CustomEvent<T = any> extends Event {
|
|
858
918
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
859
919
|
/**
|
|
@@ -869,58 +929,90 @@ export interface CustomEventCustomEventInit {
|
|
|
869
929
|
composed?: boolean;
|
|
870
930
|
detail?: any;
|
|
871
931
|
}
|
|
932
|
+
/**
|
|
933
|
+
* A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
|
|
934
|
+
*
|
|
935
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
936
|
+
*/
|
|
872
937
|
export declare class Blob {
|
|
873
938
|
constructor(
|
|
874
|
-
|
|
939
|
+
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
875
940
|
options?: BlobOptions,
|
|
876
941
|
);
|
|
877
|
-
|
|
942
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
878
943
|
get size(): number;
|
|
879
|
-
|
|
944
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
880
945
|
get type(): string;
|
|
881
|
-
|
|
946
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
882
947
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
883
|
-
|
|
948
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
884
949
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
885
|
-
|
|
950
|
+
bytes(): Promise<Uint8Array>;
|
|
951
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
886
952
|
text(): Promise<string>;
|
|
887
|
-
|
|
953
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
888
954
|
stream(): ReadableStream;
|
|
889
955
|
}
|
|
890
956
|
export interface BlobOptions {
|
|
891
957
|
type?: string;
|
|
892
958
|
}
|
|
959
|
+
/**
|
|
960
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
961
|
+
*
|
|
962
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
963
|
+
*/
|
|
893
964
|
export declare class File extends Blob {
|
|
894
965
|
constructor(
|
|
895
966
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
896
967
|
name: string,
|
|
897
968
|
options?: FileOptions,
|
|
898
969
|
);
|
|
899
|
-
|
|
970
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
900
971
|
get name(): string;
|
|
901
|
-
|
|
972
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
902
973
|
get lastModified(): number;
|
|
903
974
|
}
|
|
904
975
|
export interface FileOptions {
|
|
905
976
|
type?: string;
|
|
906
977
|
lastModified?: number;
|
|
907
978
|
}
|
|
979
|
+
/**
|
|
980
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
981
|
+
*
|
|
982
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
983
|
+
*/
|
|
908
984
|
export declare abstract class CacheStorage {
|
|
909
|
-
|
|
985
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
910
986
|
open(cacheName: string): Promise<Cache>;
|
|
911
987
|
readonly default: Cache;
|
|
912
988
|
}
|
|
989
|
+
/**
|
|
990
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
991
|
+
*
|
|
992
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
993
|
+
*/
|
|
913
994
|
export declare abstract class Cache {
|
|
995
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
914
996
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
997
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
915
998
|
match(
|
|
916
999
|
request: RequestInfo,
|
|
917
1000
|
options?: CacheQueryOptions,
|
|
918
1001
|
): Promise<Response | undefined>;
|
|
1002
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
919
1003
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
920
1004
|
}
|
|
921
1005
|
export interface CacheQueryOptions {
|
|
922
1006
|
ignoreMethod?: boolean;
|
|
923
1007
|
}
|
|
1008
|
+
/**
|
|
1009
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
1010
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
1011
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
1012
|
+
* compared to those implemented in most browsers.
|
|
1013
|
+
*
|
|
1014
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
1015
|
+
*/
|
|
924
1016
|
export declare abstract class Crypto {
|
|
925
1017
|
/**
|
|
926
1018
|
* Available only in secure contexts.
|
|
@@ -928,7 +1020,7 @@ export declare abstract class Crypto {
|
|
|
928
1020
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
929
1021
|
*/
|
|
930
1022
|
get subtle(): SubtleCrypto;
|
|
931
|
-
|
|
1023
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
932
1024
|
getRandomValues<
|
|
933
1025
|
T extends
|
|
934
1026
|
| Int8Array
|
|
@@ -948,39 +1040,50 @@ export declare abstract class Crypto {
|
|
|
948
1040
|
randomUUID(): string;
|
|
949
1041
|
DigestStream: typeof DigestStream;
|
|
950
1042
|
}
|
|
1043
|
+
/**
|
|
1044
|
+
* This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
|
|
1045
|
+
* Available only in secure contexts.
|
|
1046
|
+
*
|
|
1047
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1048
|
+
*/
|
|
951
1049
|
export declare abstract class SubtleCrypto {
|
|
1050
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
952
1051
|
encrypt(
|
|
953
1052
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
954
1053
|
key: CryptoKey,
|
|
955
1054
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
956
1055
|
): Promise<ArrayBuffer>;
|
|
1056
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
957
1057
|
decrypt(
|
|
958
1058
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
959
1059
|
key: CryptoKey,
|
|
960
1060
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
961
1061
|
): Promise<ArrayBuffer>;
|
|
1062
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
962
1063
|
sign(
|
|
963
1064
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
964
1065
|
key: CryptoKey,
|
|
965
1066
|
data: ArrayBuffer | ArrayBufferView,
|
|
966
1067
|
): Promise<ArrayBuffer>;
|
|
1068
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
967
1069
|
verify(
|
|
968
1070
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
969
1071
|
key: CryptoKey,
|
|
970
1072
|
signature: ArrayBuffer | ArrayBufferView,
|
|
971
1073
|
data: ArrayBuffer | ArrayBufferView,
|
|
972
1074
|
): Promise<boolean>;
|
|
1075
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
973
1076
|
digest(
|
|
974
1077
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
975
1078
|
data: ArrayBuffer | ArrayBufferView,
|
|
976
1079
|
): Promise<ArrayBuffer>;
|
|
977
|
-
|
|
1080
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
978
1081
|
generateKey(
|
|
979
1082
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
980
1083
|
extractable: boolean,
|
|
981
1084
|
keyUsages: string[],
|
|
982
1085
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
983
|
-
|
|
1086
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
984
1087
|
deriveKey(
|
|
985
1088
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
986
1089
|
baseKey: CryptoKey,
|
|
@@ -988,12 +1091,13 @@ export declare abstract class SubtleCrypto {
|
|
|
988
1091
|
extractable: boolean,
|
|
989
1092
|
keyUsages: string[],
|
|
990
1093
|
): Promise<CryptoKey>;
|
|
1094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
991
1095
|
deriveBits(
|
|
992
1096
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
993
1097
|
baseKey: CryptoKey,
|
|
994
|
-
length
|
|
1098
|
+
length?: number | null,
|
|
995
1099
|
): Promise<ArrayBuffer>;
|
|
996
|
-
|
|
1100
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
997
1101
|
importKey(
|
|
998
1102
|
format: string,
|
|
999
1103
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1001,14 +1105,16 @@ export declare abstract class SubtleCrypto {
|
|
|
1001
1105
|
extractable: boolean,
|
|
1002
1106
|
keyUsages: string[],
|
|
1003
1107
|
): Promise<CryptoKey>;
|
|
1108
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
1004
1109
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1110
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
1005
1111
|
wrapKey(
|
|
1006
1112
|
format: string,
|
|
1007
1113
|
key: CryptoKey,
|
|
1008
1114
|
wrappingKey: CryptoKey,
|
|
1009
1115
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1010
1116
|
): Promise<ArrayBuffer>;
|
|
1011
|
-
|
|
1117
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
1012
1118
|
unwrapKey(
|
|
1013
1119
|
format: string,
|
|
1014
1120
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1023,12 +1129,18 @@ export declare abstract class SubtleCrypto {
|
|
|
1023
1129
|
b: ArrayBuffer | ArrayBufferView,
|
|
1024
1130
|
): boolean;
|
|
1025
1131
|
}
|
|
1132
|
+
/**
|
|
1133
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1134
|
+
* Available only in secure contexts.
|
|
1135
|
+
*
|
|
1136
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1137
|
+
*/
|
|
1026
1138
|
export declare abstract class CryptoKey {
|
|
1027
|
-
|
|
1139
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1028
1140
|
readonly type: string;
|
|
1029
|
-
|
|
1141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1030
1142
|
readonly extractable: boolean;
|
|
1031
|
-
|
|
1143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1032
1144
|
readonly algorithm:
|
|
1033
1145
|
| CryptoKeyKeyAlgorithm
|
|
1034
1146
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1036,7 +1148,7 @@ export declare abstract class CryptoKey {
|
|
|
1036
1148
|
| CryptoKeyRsaKeyAlgorithm
|
|
1037
1149
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1038
1150
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1039
|
-
|
|
1151
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1040
1152
|
readonly usages: string[];
|
|
1041
1153
|
}
|
|
1042
1154
|
export interface CryptoKeyPair {
|
|
@@ -1142,7 +1254,13 @@ export declare class DigestStream extends WritableStream<
|
|
|
1142
1254
|
> {
|
|
1143
1255
|
constructor(algorithm: string | SubtleCryptoHashAlgorithm);
|
|
1144
1256
|
get digest(): Promise<ArrayBuffer>;
|
|
1257
|
+
get bytesWritten(): number | bigint;
|
|
1145
1258
|
}
|
|
1259
|
+
/**
|
|
1260
|
+
* A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
|
|
1261
|
+
*
|
|
1262
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1263
|
+
*/
|
|
1146
1264
|
export declare class TextDecoder {
|
|
1147
1265
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1148
1266
|
/**
|
|
@@ -1168,6 +1286,11 @@ export declare class TextDecoder {
|
|
|
1168
1286
|
get fatal(): boolean;
|
|
1169
1287
|
get ignoreBOM(): boolean;
|
|
1170
1288
|
}
|
|
1289
|
+
/**
|
|
1290
|
+
* TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
|
|
1291
|
+
*
|
|
1292
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1293
|
+
*/
|
|
1171
1294
|
export declare class TextEncoder {
|
|
1172
1295
|
constructor();
|
|
1173
1296
|
/**
|
|
@@ -1198,21 +1321,59 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1198
1321
|
read: number;
|
|
1199
1322
|
written: number;
|
|
1200
1323
|
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Events providing information related to errors in scripts or in files.
|
|
1326
|
+
*
|
|
1327
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1328
|
+
*/
|
|
1329
|
+
export declare class ErrorEvent extends Event {
|
|
1330
|
+
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1331
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1332
|
+
get filename(): string;
|
|
1333
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1334
|
+
get message(): string;
|
|
1335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1336
|
+
get lineno(): number;
|
|
1337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1338
|
+
get colno(): number;
|
|
1339
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1340
|
+
get error(): any;
|
|
1341
|
+
}
|
|
1342
|
+
export interface ErrorEventErrorEventInit {
|
|
1343
|
+
message?: string;
|
|
1344
|
+
filename?: string;
|
|
1345
|
+
lineno?: number;
|
|
1346
|
+
colno?: number;
|
|
1347
|
+
error?: any;
|
|
1348
|
+
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
|
|
1351
|
+
*
|
|
1352
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1353
|
+
*/
|
|
1201
1354
|
export declare class FormData {
|
|
1202
1355
|
constructor();
|
|
1356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1203
1357
|
append(name: string, value: string): void;
|
|
1358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1204
1359
|
append(name: string, value: Blob, filename?: string): void;
|
|
1360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1205
1361
|
delete(name: string): void;
|
|
1362
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1206
1363
|
get(name: string): (File | string) | null;
|
|
1364
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1207
1365
|
getAll(name: string): (File | string)[];
|
|
1366
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1208
1367
|
has(name: string): boolean;
|
|
1368
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1209
1369
|
set(name: string, value: string): void;
|
|
1370
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1210
1371
|
set(name: string, value: Blob, filename?: string): void;
|
|
1211
|
-
|
|
1372
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1212
1373
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1213
|
-
|
|
1374
|
+
/* Returns a list of keys in the list. */
|
|
1214
1375
|
keys(): IterableIterator<string>;
|
|
1215
|
-
|
|
1376
|
+
/* Returns a list of values in the list. */
|
|
1216
1377
|
values(): IterableIterator<File | string>;
|
|
1217
1378
|
forEach<This = unknown>(
|
|
1218
1379
|
callback: (
|
|
@@ -1298,10 +1459,15 @@ export interface Text {
|
|
|
1298
1459
|
export interface DocumentEnd {
|
|
1299
1460
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1300
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.
|
|
1464
|
+
*
|
|
1465
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1466
|
+
*/
|
|
1301
1467
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1302
|
-
|
|
1468
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1303
1469
|
readonly request: Request;
|
|
1304
|
-
|
|
1470
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1305
1471
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1306
1472
|
passThroughOnException(): void;
|
|
1307
1473
|
}
|
|
@@ -1309,23 +1475,33 @@ export type HeadersInit =
|
|
|
1309
1475
|
| Headers
|
|
1310
1476
|
| Iterable<Iterable<string>>
|
|
1311
1477
|
| Record<string, string>;
|
|
1478
|
+
/**
|
|
1479
|
+
* This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
|
|
1480
|
+
*
|
|
1481
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1482
|
+
*/
|
|
1312
1483
|
export declare class Headers {
|
|
1313
1484
|
constructor(init?: HeadersInit);
|
|
1485
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1314
1486
|
get(name: string): string | null;
|
|
1315
1487
|
getAll(name: string): string[];
|
|
1488
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1316
1489
|
has(name: string): boolean;
|
|
1490
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1317
1491
|
set(name: string, value: string): void;
|
|
1492
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1318
1493
|
append(name: string, value: string): void;
|
|
1494
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1319
1495
|
delete(name: string): void;
|
|
1320
1496
|
forEach<This = unknown>(
|
|
1321
1497
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1322
1498
|
thisArg?: This,
|
|
1323
1499
|
): void;
|
|
1324
|
-
|
|
1500
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1325
1501
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1326
|
-
|
|
1502
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1327
1503
|
keys(): IterableIterator<string>;
|
|
1328
|
-
|
|
1504
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1329
1505
|
values(): IterableIterator<string>;
|
|
1330
1506
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1331
1507
|
}
|
|
@@ -1338,33 +1514,46 @@ export type BodyInit =
|
|
|
1338
1514
|
| URLSearchParams
|
|
1339
1515
|
| FormData;
|
|
1340
1516
|
export declare abstract class Body {
|
|
1517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1341
1518
|
get body(): ReadableStream | null;
|
|
1519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1342
1520
|
get bodyUsed(): boolean;
|
|
1521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1343
1522
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1523
|
+
bytes(): Promise<Uint8Array>;
|
|
1524
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1344
1525
|
text(): Promise<string>;
|
|
1526
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1345
1527
|
json<T>(): Promise<T>;
|
|
1528
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1346
1529
|
formData(): Promise<FormData>;
|
|
1530
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1347
1531
|
blob(): Promise<Blob>;
|
|
1348
1532
|
}
|
|
1533
|
+
/**
|
|
1534
|
+
* This Fetch API interface represents the response to a request.
|
|
1535
|
+
*
|
|
1536
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1537
|
+
*/
|
|
1349
1538
|
export declare class Response extends Body {
|
|
1350
1539
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1351
|
-
|
|
1540
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1352
1541
|
static redirect(url: string, status?: number): Response;
|
|
1353
|
-
|
|
1542
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1354
1543
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1355
|
-
|
|
1544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1356
1545
|
clone(): Response;
|
|
1357
|
-
|
|
1546
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1358
1547
|
get status(): number;
|
|
1359
|
-
|
|
1548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1360
1549
|
get statusText(): string;
|
|
1361
|
-
|
|
1550
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1362
1551
|
get headers(): Headers;
|
|
1363
|
-
|
|
1552
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1364
1553
|
get ok(): boolean;
|
|
1365
|
-
|
|
1554
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1366
1555
|
get redirected(): boolean;
|
|
1367
|
-
|
|
1556
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1368
1557
|
get url(): string;
|
|
1369
1558
|
get webSocket(): WebSocket | null;
|
|
1370
1559
|
get cf(): any | undefined;
|
|
@@ -1381,12 +1570,17 @@ export type RequestInfo<
|
|
|
1381
1570
|
CfHostMetadata = unknown,
|
|
1382
1571
|
Cf = CfProperties<CfHostMetadata>,
|
|
1383
1572
|
> = Request<CfHostMetadata, Cf> | string | URL;
|
|
1573
|
+
/**
|
|
1574
|
+
* This Fetch API interface represents a resource request.
|
|
1575
|
+
*
|
|
1576
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1577
|
+
*/
|
|
1384
1578
|
export declare class Request<
|
|
1385
1579
|
CfHostMetadata = unknown,
|
|
1386
1580
|
Cf = CfProperties<CfHostMetadata>,
|
|
1387
1581
|
> extends Body {
|
|
1388
1582
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1389
|
-
|
|
1583
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1390
1584
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1391
1585
|
/**
|
|
1392
1586
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1434,19 +1628,19 @@ export declare class Request<
|
|
|
1434
1628
|
get keepalive(): boolean;
|
|
1435
1629
|
}
|
|
1436
1630
|
export interface RequestInit<Cf = CfProperties> {
|
|
1437
|
-
|
|
1631
|
+
/* A string to set request's method. */
|
|
1438
1632
|
method?: string;
|
|
1439
|
-
|
|
1633
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1440
1634
|
headers?: HeadersInit;
|
|
1441
|
-
|
|
1635
|
+
/* A BodyInit object or null to set request's body. */
|
|
1442
1636
|
body?: BodyInit | null;
|
|
1443
|
-
|
|
1637
|
+
/* 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. */
|
|
1444
1638
|
redirect?: string;
|
|
1445
1639
|
fetcher?: Fetcher | null;
|
|
1446
1640
|
cf?: Cf;
|
|
1447
|
-
|
|
1641
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1448
1642
|
integrity?: string;
|
|
1449
|
-
|
|
1643
|
+
/* An AbortSignal to set request's signal. */
|
|
1450
1644
|
signal?: AbortSignal | null;
|
|
1451
1645
|
}
|
|
1452
1646
|
export type Service<
|
|
@@ -1879,31 +2073,36 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
1879
2073
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1880
2074
|
*/
|
|
1881
2075
|
export interface ReadableStream<R = any> {
|
|
1882
|
-
|
|
2076
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1883
2077
|
get locked(): boolean;
|
|
1884
|
-
|
|
2078
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1885
2079
|
cancel(reason?: any): Promise<void>;
|
|
1886
|
-
|
|
2080
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1887
2081
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1888
|
-
|
|
2082
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1889
2083
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1890
|
-
|
|
2084
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1891
2085
|
pipeThrough<T>(
|
|
1892
2086
|
transform: ReadableWritablePair<T, R>,
|
|
1893
2087
|
options?: StreamPipeOptions,
|
|
1894
2088
|
): ReadableStream<T>;
|
|
1895
|
-
|
|
2089
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1896
2090
|
pipeTo(
|
|
1897
2091
|
destination: WritableStream<R>,
|
|
1898
2092
|
options?: StreamPipeOptions,
|
|
1899
2093
|
): Promise<void>;
|
|
1900
|
-
|
|
2094
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1901
2095
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1902
2096
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1903
2097
|
[Symbol.asyncIterator](
|
|
1904
2098
|
options?: ReadableStreamValuesOptions,
|
|
1905
2099
|
): AsyncIterableIterator<R>;
|
|
1906
2100
|
}
|
|
2101
|
+
/**
|
|
2102
|
+
* 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.
|
|
2103
|
+
*
|
|
2104
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2105
|
+
*/
|
|
1907
2106
|
export declare const ReadableStream: {
|
|
1908
2107
|
prototype: ReadableStream;
|
|
1909
2108
|
new (
|
|
@@ -1915,24 +2114,26 @@ export declare const ReadableStream: {
|
|
|
1915
2114
|
strategy?: QueuingStrategy<R>,
|
|
1916
2115
|
): ReadableStream<R>;
|
|
1917
2116
|
};
|
|
2117
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1918
2118
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
1919
2119
|
constructor(stream: ReadableStream);
|
|
1920
2120
|
get closed(): Promise<void>;
|
|
1921
2121
|
cancel(reason?: any): Promise<void>;
|
|
1922
|
-
|
|
2122
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1923
2123
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1924
|
-
|
|
2124
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1925
2125
|
releaseLock(): void;
|
|
1926
2126
|
}
|
|
2127
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1927
2128
|
export declare class ReadableStreamBYOBReader {
|
|
1928
2129
|
constructor(stream: ReadableStream);
|
|
1929
2130
|
get closed(): Promise<void>;
|
|
1930
2131
|
cancel(reason?: any): Promise<void>;
|
|
1931
|
-
|
|
2132
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1932
2133
|
read<T extends ArrayBufferView>(
|
|
1933
2134
|
view: T,
|
|
1934
2135
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1935
|
-
|
|
2136
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1936
2137
|
releaseLock(): void;
|
|
1937
2138
|
readAtLeast<T extends ArrayBufferView>(
|
|
1938
2139
|
minElements: number,
|
|
@@ -1950,38 +2151,38 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
1950
2151
|
*/
|
|
1951
2152
|
mode: "byob";
|
|
1952
2153
|
}
|
|
1953
|
-
|
|
2154
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1954
2155
|
export interface ReadableStreamBYOBRequest {
|
|
1955
|
-
|
|
2156
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1956
2157
|
get view(): Uint8Array | null;
|
|
1957
|
-
|
|
2158
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
1958
2159
|
respond(bytesWritten: number): void;
|
|
1959
|
-
|
|
2160
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
1960
2161
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
1961
2162
|
get atLeast(): number | null;
|
|
1962
2163
|
}
|
|
1963
|
-
|
|
2164
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1964
2165
|
export interface ReadableStreamDefaultController<R = any> {
|
|
1965
|
-
|
|
2166
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1966
2167
|
get desiredSize(): number | null;
|
|
1967
|
-
|
|
2168
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
1968
2169
|
close(): void;
|
|
1969
|
-
|
|
2170
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
1970
2171
|
enqueue(chunk?: R): void;
|
|
1971
|
-
|
|
2172
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
1972
2173
|
error(reason: any): void;
|
|
1973
2174
|
}
|
|
1974
|
-
|
|
2175
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
1975
2176
|
export interface ReadableByteStreamController {
|
|
1976
|
-
|
|
2177
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
1977
2178
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
1978
|
-
|
|
2179
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
1979
2180
|
get desiredSize(): number | null;
|
|
1980
|
-
|
|
2181
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
1981
2182
|
close(): void;
|
|
1982
|
-
|
|
2183
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
1983
2184
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
1984
|
-
|
|
2185
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
1985
2186
|
error(reason: any): void;
|
|
1986
2187
|
}
|
|
1987
2188
|
/**
|
|
@@ -1990,20 +2191,20 @@ export interface ReadableByteStreamController {
|
|
|
1990
2191
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
1991
2192
|
*/
|
|
1992
2193
|
export interface WritableStreamDefaultController {
|
|
1993
|
-
|
|
2194
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
1994
2195
|
get signal(): AbortSignal;
|
|
1995
|
-
|
|
2196
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
1996
2197
|
error(reason?: any): void;
|
|
1997
2198
|
}
|
|
1998
|
-
|
|
2199
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
1999
2200
|
export interface TransformStreamDefaultController<O = any> {
|
|
2000
|
-
|
|
2201
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2001
2202
|
get desiredSize(): number | null;
|
|
2002
|
-
|
|
2203
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2003
2204
|
enqueue(chunk?: O): void;
|
|
2004
|
-
|
|
2205
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2005
2206
|
error(reason: any): void;
|
|
2006
|
-
|
|
2207
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2007
2208
|
terminate(): void;
|
|
2008
2209
|
}
|
|
2009
2210
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2015,46 +2216,57 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
2015
2216
|
writable: WritableStream<W>;
|
|
2016
2217
|
readable: ReadableStream<R>;
|
|
2017
2218
|
}
|
|
2219
|
+
/**
|
|
2220
|
+
* 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.
|
|
2221
|
+
*
|
|
2222
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2223
|
+
*/
|
|
2018
2224
|
export declare class WritableStream<W = any> {
|
|
2019
2225
|
constructor(
|
|
2020
2226
|
underlyingSink?: UnderlyingSink,
|
|
2021
2227
|
queuingStrategy?: QueuingStrategy,
|
|
2022
2228
|
);
|
|
2023
|
-
|
|
2229
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2024
2230
|
get locked(): boolean;
|
|
2025
|
-
|
|
2231
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2026
2232
|
abort(reason?: any): Promise<void>;
|
|
2027
|
-
|
|
2233
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2028
2234
|
close(): Promise<void>;
|
|
2029
|
-
|
|
2235
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2030
2236
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2031
2237
|
}
|
|
2238
|
+
/**
|
|
2239
|
+
* 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.
|
|
2240
|
+
*
|
|
2241
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2242
|
+
*/
|
|
2032
2243
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2033
2244
|
constructor(stream: WritableStream);
|
|
2034
|
-
|
|
2245
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2035
2246
|
get closed(): Promise<void>;
|
|
2036
|
-
|
|
2247
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2037
2248
|
get ready(): Promise<void>;
|
|
2038
|
-
|
|
2249
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2039
2250
|
get desiredSize(): number | null;
|
|
2040
|
-
|
|
2251
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2041
2252
|
abort(reason?: any): Promise<void>;
|
|
2042
|
-
|
|
2253
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2043
2254
|
close(): Promise<void>;
|
|
2044
|
-
|
|
2255
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2045
2256
|
write(chunk?: W): Promise<void>;
|
|
2046
|
-
|
|
2257
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2047
2258
|
releaseLock(): void;
|
|
2048
2259
|
}
|
|
2260
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2049
2261
|
export declare class TransformStream<I = any, O = any> {
|
|
2050
2262
|
constructor(
|
|
2051
2263
|
transformer?: Transformer<I, O>,
|
|
2052
2264
|
writableStrategy?: QueuingStrategy<I>,
|
|
2053
2265
|
readableStrategy?: QueuingStrategy<O>,
|
|
2054
2266
|
);
|
|
2055
|
-
|
|
2267
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2056
2268
|
get readable(): ReadableStream<O>;
|
|
2057
|
-
|
|
2269
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2058
2270
|
get writable(): WritableStream<I>;
|
|
2059
2271
|
}
|
|
2060
2272
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2075,18 +2287,21 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2075
2287
|
export interface ReadableStreamValuesOptions {
|
|
2076
2288
|
preventCancel?: boolean;
|
|
2077
2289
|
}
|
|
2290
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2078
2291
|
export declare class CompressionStream extends TransformStream<
|
|
2079
2292
|
ArrayBuffer | ArrayBufferView,
|
|
2080
2293
|
Uint8Array
|
|
2081
2294
|
> {
|
|
2082
2295
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2083
2296
|
}
|
|
2297
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2084
2298
|
export declare class DecompressionStream extends TransformStream<
|
|
2085
2299
|
ArrayBuffer | ArrayBufferView,
|
|
2086
2300
|
Uint8Array
|
|
2087
2301
|
> {
|
|
2088
2302
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2089
2303
|
}
|
|
2304
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2090
2305
|
export declare class TextEncoderStream extends TransformStream<
|
|
2091
2306
|
string,
|
|
2092
2307
|
Uint8Array
|
|
@@ -2094,6 +2309,7 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2094
2309
|
constructor();
|
|
2095
2310
|
get encoding(): string;
|
|
2096
2311
|
}
|
|
2312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2097
2313
|
export declare class TextDecoderStream extends TransformStream<
|
|
2098
2314
|
ArrayBuffer | ArrayBufferView,
|
|
2099
2315
|
string
|
|
@@ -2107,20 +2323,30 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2107
2323
|
fatal?: boolean;
|
|
2108
2324
|
ignoreBOM?: boolean;
|
|
2109
2325
|
}
|
|
2326
|
+
/**
|
|
2327
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2328
|
+
*
|
|
2329
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2330
|
+
*/
|
|
2110
2331
|
export declare class ByteLengthQueuingStrategy
|
|
2111
2332
|
implements QueuingStrategy<ArrayBufferView>
|
|
2112
2333
|
{
|
|
2113
2334
|
constructor(init: QueuingStrategyInit);
|
|
2114
|
-
|
|
2335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2115
2336
|
get highWaterMark(): number;
|
|
2116
|
-
|
|
2337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2117
2338
|
get size(): (chunk?: any) => number;
|
|
2118
2339
|
}
|
|
2340
|
+
/**
|
|
2341
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2342
|
+
*
|
|
2343
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2344
|
+
*/
|
|
2119
2345
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2120
2346
|
constructor(init: QueuingStrategyInit);
|
|
2121
|
-
|
|
2347
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2122
2348
|
get highWaterMark(): number;
|
|
2123
|
-
|
|
2349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2124
2350
|
get size(): (chunk?: any) => number;
|
|
2125
2351
|
}
|
|
2126
2352
|
export interface QueuingStrategyInit {
|
|
@@ -2245,56 +2471,63 @@ export interface TraceMetrics {
|
|
|
2245
2471
|
export interface UnsafeTraceMetrics {
|
|
2246
2472
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2247
2473
|
}
|
|
2474
|
+
/**
|
|
2475
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2476
|
+
*
|
|
2477
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2478
|
+
*/
|
|
2248
2479
|
export declare class URL {
|
|
2249
2480
|
constructor(url: string | URL, base?: string | URL);
|
|
2250
|
-
|
|
2481
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2251
2482
|
get href(): string;
|
|
2252
|
-
|
|
2483
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2253
2484
|
set href(value: string);
|
|
2254
|
-
|
|
2485
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2255
2486
|
get origin(): string;
|
|
2256
|
-
|
|
2487
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2257
2488
|
get protocol(): string;
|
|
2258
|
-
|
|
2489
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2259
2490
|
set protocol(value: string);
|
|
2260
|
-
|
|
2491
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2261
2492
|
get username(): string;
|
|
2262
|
-
|
|
2493
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2263
2494
|
set username(value: string);
|
|
2264
|
-
|
|
2495
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2265
2496
|
get password(): string;
|
|
2266
|
-
|
|
2497
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2267
2498
|
set password(value: string);
|
|
2268
|
-
|
|
2499
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2269
2500
|
get host(): string;
|
|
2270
|
-
|
|
2501
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2271
2502
|
set host(value: string);
|
|
2272
|
-
|
|
2503
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2273
2504
|
get hostname(): string;
|
|
2274
|
-
|
|
2505
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2275
2506
|
set hostname(value: string);
|
|
2276
|
-
|
|
2507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2277
2508
|
get port(): string;
|
|
2278
|
-
|
|
2509
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2279
2510
|
set port(value: string);
|
|
2280
|
-
|
|
2511
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2281
2512
|
get pathname(): string;
|
|
2282
|
-
|
|
2513
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2283
2514
|
set pathname(value: string);
|
|
2284
|
-
|
|
2515
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2285
2516
|
get search(): string;
|
|
2286
|
-
|
|
2517
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2287
2518
|
set search(value: string);
|
|
2288
|
-
|
|
2519
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2289
2520
|
get searchParams(): URLSearchParams;
|
|
2290
|
-
|
|
2521
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2291
2522
|
get hash(): string;
|
|
2292
|
-
|
|
2523
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2293
2524
|
set hash(value: string);
|
|
2525
|
+
/*function toString() { [native code] }*/
|
|
2294
2526
|
toString(): string;
|
|
2295
|
-
|
|
2527
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2296
2528
|
toJSON(): string;
|
|
2297
2529
|
}
|
|
2530
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2298
2531
|
export declare class URLSearchParams {
|
|
2299
2532
|
constructor(
|
|
2300
2533
|
init?:
|
|
@@ -2303,19 +2536,51 @@ export declare class URLSearchParams {
|
|
|
2303
2536
|
| Record<string, string>
|
|
2304
2537
|
| [key: string, value: string][],
|
|
2305
2538
|
);
|
|
2539
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2306
2540
|
get size(): number;
|
|
2541
|
+
/**
|
|
2542
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2543
|
+
*
|
|
2544
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2545
|
+
*/
|
|
2307
2546
|
append(name: string, value: string): void;
|
|
2547
|
+
/**
|
|
2548
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2549
|
+
*
|
|
2550
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2551
|
+
*/
|
|
2308
2552
|
delete(name: string): void;
|
|
2553
|
+
/**
|
|
2554
|
+
* Returns the first value associated to the given search parameter.
|
|
2555
|
+
*
|
|
2556
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2557
|
+
*/
|
|
2309
2558
|
get(name: string): string | null;
|
|
2559
|
+
/**
|
|
2560
|
+
* Returns all the values association with a given search parameter.
|
|
2561
|
+
*
|
|
2562
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2563
|
+
*/
|
|
2310
2564
|
getAll(name: string): string[];
|
|
2565
|
+
/**
|
|
2566
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2567
|
+
*
|
|
2568
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2569
|
+
*/
|
|
2311
2570
|
has(name: string): boolean;
|
|
2571
|
+
/**
|
|
2572
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2573
|
+
*
|
|
2574
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2575
|
+
*/
|
|
2312
2576
|
set(name: string, value: string): void;
|
|
2577
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2313
2578
|
sort(): void;
|
|
2314
|
-
|
|
2579
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2315
2580
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2316
|
-
|
|
2581
|
+
/* Returns a list of keys in the search params. */
|
|
2317
2582
|
keys(): IterableIterator<string>;
|
|
2318
|
-
|
|
2583
|
+
/* Returns a list of values in the search params. */
|
|
2319
2584
|
values(): IterableIterator<string>;
|
|
2320
2585
|
forEach<This = unknown>(
|
|
2321
2586
|
callback: (
|
|
@@ -2326,6 +2591,7 @@ export declare class URLSearchParams {
|
|
|
2326
2591
|
) => void,
|
|
2327
2592
|
thisArg?: This,
|
|
2328
2593
|
): void;
|
|
2594
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2329
2595
|
toString(): string;
|
|
2330
2596
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2331
2597
|
}
|
|
@@ -2378,6 +2644,11 @@ export interface URLPatternURLPatternResult {
|
|
|
2378
2644
|
export interface URLPatternURLPatternOptions {
|
|
2379
2645
|
ignoreCase?: boolean;
|
|
2380
2646
|
}
|
|
2647
|
+
/**
|
|
2648
|
+
* 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.
|
|
2649
|
+
*
|
|
2650
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2651
|
+
*/
|
|
2381
2652
|
export declare class CloseEvent extends Event {
|
|
2382
2653
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2383
2654
|
/**
|
|
@@ -2404,36 +2675,34 @@ export interface CloseEventInit {
|
|
|
2404
2675
|
reason?: string;
|
|
2405
2676
|
wasClean?: boolean;
|
|
2406
2677
|
}
|
|
2678
|
+
/**
|
|
2679
|
+
* A message received by a target object.
|
|
2680
|
+
*
|
|
2681
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2682
|
+
*/
|
|
2407
2683
|
export declare class MessageEvent extends Event {
|
|
2408
2684
|
constructor(type: string, initializer: MessageEventInit);
|
|
2685
|
+
/**
|
|
2686
|
+
* Returns the data of the message.
|
|
2687
|
+
*
|
|
2688
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2689
|
+
*/
|
|
2409
2690
|
readonly data: ArrayBuffer | string;
|
|
2410
2691
|
}
|
|
2411
2692
|
export interface MessageEventInit {
|
|
2412
2693
|
data: ArrayBuffer | string;
|
|
2413
2694
|
}
|
|
2414
|
-
/**
|
|
2415
|
-
* Events providing information related to errors in scripts or in files.
|
|
2416
|
-
*
|
|
2417
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
2418
|
-
*/
|
|
2419
|
-
export interface ErrorEvent extends Event {
|
|
2420
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
2421
|
-
readonly filename: string;
|
|
2422
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
2423
|
-
readonly message: string;
|
|
2424
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
2425
|
-
readonly lineno: number;
|
|
2426
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
2427
|
-
readonly colno: number;
|
|
2428
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
2429
|
-
readonly error: any;
|
|
2430
|
-
}
|
|
2431
2695
|
export type WebSocketEventMap = {
|
|
2432
2696
|
close: CloseEvent;
|
|
2433
2697
|
message: MessageEvent;
|
|
2434
2698
|
open: Event;
|
|
2435
2699
|
error: ErrorEvent;
|
|
2436
2700
|
};
|
|
2701
|
+
/**
|
|
2702
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2703
|
+
*
|
|
2704
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2705
|
+
*/
|
|
2437
2706
|
export declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2438
2707
|
constructor(url: string, protocols?: string[] | string);
|
|
2439
2708
|
accept(): void;
|
|
@@ -2501,6 +2770,7 @@ export interface Socket {
|
|
|
2501
2770
|
export interface SocketOptions {
|
|
2502
2771
|
secureTransport?: string;
|
|
2503
2772
|
allowHalfOpen: boolean;
|
|
2773
|
+
highWaterMark?: number | bigint;
|
|
2504
2774
|
}
|
|
2505
2775
|
export interface SocketAddress {
|
|
2506
2776
|
hostname: string;
|
|
@@ -2513,65 +2783,61 @@ export interface SocketInfo {
|
|
|
2513
2783
|
remoteAddress?: string;
|
|
2514
2784
|
localAddress?: string;
|
|
2515
2785
|
}
|
|
2516
|
-
export interface
|
|
2517
|
-
requestAdapter(
|
|
2518
|
-
param1?: gpuGPURequestAdapterOptions,
|
|
2519
|
-
): Promise<gpuGPUAdapter | null>;
|
|
2786
|
+
export interface GPU {
|
|
2787
|
+
requestAdapter(param1?: GPURequestAdapterOptions): Promise<GPUAdapter | null>;
|
|
2520
2788
|
}
|
|
2521
|
-
export declare abstract class
|
|
2522
|
-
requestDevice(param1?:
|
|
2523
|
-
requestAdapterInfo(unmaskHints?: string[]): Promise<
|
|
2524
|
-
get features():
|
|
2525
|
-
get limits():
|
|
2789
|
+
export declare abstract class GPUAdapter {
|
|
2790
|
+
requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
|
|
2791
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
|
|
2792
|
+
get features(): GPUSupportedFeatures;
|
|
2793
|
+
get limits(): GPUSupportedLimits;
|
|
2526
2794
|
}
|
|
2527
|
-
export interface
|
|
2528
|
-
createBuffer(param1:
|
|
2795
|
+
export interface GPUDevice extends EventTarget {
|
|
2796
|
+
createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
|
|
2529
2797
|
createBindGroupLayout(
|
|
2530
|
-
descriptor:
|
|
2531
|
-
):
|
|
2532
|
-
createBindGroup(descriptor:
|
|
2533
|
-
createSampler(descriptor:
|
|
2534
|
-
createShaderModule(
|
|
2535
|
-
descriptor: gpuGPUShaderModuleDescriptor,
|
|
2536
|
-
): gpuGPUShaderModule;
|
|
2798
|
+
descriptor: GPUBindGroupLayoutDescriptor,
|
|
2799
|
+
): GPUBindGroupLayout;
|
|
2800
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
2801
|
+
createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
|
|
2802
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
2537
2803
|
createPipelineLayout(
|
|
2538
|
-
descriptor:
|
|
2539
|
-
):
|
|
2804
|
+
descriptor: GPUPipelineLayoutDescriptor,
|
|
2805
|
+
): GPUPipelineLayout;
|
|
2540
2806
|
createComputePipeline(
|
|
2541
|
-
descriptor:
|
|
2542
|
-
):
|
|
2807
|
+
descriptor: GPUComputePipelineDescriptor,
|
|
2808
|
+
): GPUComputePipeline;
|
|
2543
2809
|
createRenderPipeline(
|
|
2544
|
-
descriptor:
|
|
2545
|
-
):
|
|
2810
|
+
descriptor: GPURenderPipelineDescriptor,
|
|
2811
|
+
): GPURenderPipeline;
|
|
2546
2812
|
createCommandEncoder(
|
|
2547
|
-
descriptor?:
|
|
2548
|
-
):
|
|
2549
|
-
createTexture(param1:
|
|
2813
|
+
descriptor?: GPUCommandEncoderDescriptor,
|
|
2814
|
+
): GPUCommandEncoder;
|
|
2815
|
+
createTexture(param1: GPUTextureDescriptor): GPUTexture;
|
|
2550
2816
|
destroy(): void;
|
|
2551
|
-
createQuerySet(descriptor:
|
|
2817
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
2552
2818
|
pushErrorScope(filter: string): void;
|
|
2553
|
-
popErrorScope(): Promise<
|
|
2554
|
-
get queue():
|
|
2555
|
-
get lost(): Promise<
|
|
2556
|
-
get features():
|
|
2557
|
-
get limits():
|
|
2819
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
2820
|
+
get queue(): GPUQueue;
|
|
2821
|
+
get lost(): Promise<GPUDeviceLostInfo>;
|
|
2822
|
+
get features(): GPUSupportedFeatures;
|
|
2823
|
+
get limits(): GPUSupportedLimits;
|
|
2558
2824
|
}
|
|
2559
|
-
export interface
|
|
2825
|
+
export interface GPUDeviceDescriptor {
|
|
2560
2826
|
label?: string;
|
|
2561
2827
|
requiredFeatures?: string[];
|
|
2562
2828
|
requiredLimits?: Record<string, number | bigint>;
|
|
2563
|
-
defaultQueue?:
|
|
2829
|
+
defaultQueue?: GPUQueueDescriptor;
|
|
2564
2830
|
}
|
|
2565
|
-
export interface
|
|
2831
|
+
export interface GPUBufferDescriptor {
|
|
2566
2832
|
label: string;
|
|
2567
2833
|
size: number | bigint;
|
|
2568
2834
|
usage: number;
|
|
2569
2835
|
mappedAtCreation: boolean;
|
|
2570
2836
|
}
|
|
2571
|
-
export interface
|
|
2837
|
+
export interface GPUQueueDescriptor {
|
|
2572
2838
|
label?: string;
|
|
2573
2839
|
}
|
|
2574
|
-
export declare abstract class
|
|
2840
|
+
export declare abstract class GPUBufferUsage {
|
|
2575
2841
|
static readonly MAP_READ: number;
|
|
2576
2842
|
static readonly MAP_WRITE: number;
|
|
2577
2843
|
static readonly COPY_SRC: number;
|
|
@@ -2583,7 +2849,7 @@ export declare abstract class gpuGPUBufferUsage {
|
|
|
2583
2849
|
static readonly INDIRECT: number;
|
|
2584
2850
|
static readonly QUERY_RESOLVE: number;
|
|
2585
2851
|
}
|
|
2586
|
-
export interface
|
|
2852
|
+
export interface GPUBuffer {
|
|
2587
2853
|
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2588
2854
|
unmap(): void;
|
|
2589
2855
|
destroy(): void;
|
|
@@ -2596,59 +2862,59 @@ export interface gpuGPUBuffer {
|
|
|
2596
2862
|
get usage(): number;
|
|
2597
2863
|
get mapState(): string;
|
|
2598
2864
|
}
|
|
2599
|
-
export declare abstract class
|
|
2865
|
+
export declare abstract class GPUShaderStage {
|
|
2600
2866
|
static readonly VERTEX: number;
|
|
2601
2867
|
static readonly FRAGMENT: number;
|
|
2602
2868
|
static readonly COMPUTE: number;
|
|
2603
2869
|
}
|
|
2604
|
-
export interface
|
|
2870
|
+
export interface GPUBindGroupLayoutDescriptor {
|
|
2605
2871
|
label?: string;
|
|
2606
|
-
entries:
|
|
2872
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
2607
2873
|
}
|
|
2608
|
-
export interface
|
|
2874
|
+
export interface GPUBindGroupLayoutEntry {
|
|
2609
2875
|
binding: number;
|
|
2610
2876
|
visibility: number;
|
|
2611
|
-
buffer?:
|
|
2612
|
-
sampler?:
|
|
2613
|
-
texture?:
|
|
2614
|
-
storageTexture?:
|
|
2877
|
+
buffer?: GPUBufferBindingLayout;
|
|
2878
|
+
sampler?: GPUSamplerBindingLayout;
|
|
2879
|
+
texture?: GPUTextureBindingLayout;
|
|
2880
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
2615
2881
|
}
|
|
2616
|
-
export interface
|
|
2882
|
+
export interface GPUStorageTextureBindingLayout {
|
|
2617
2883
|
access?: string;
|
|
2618
2884
|
format: string;
|
|
2619
2885
|
viewDimension?: string;
|
|
2620
2886
|
}
|
|
2621
|
-
export interface
|
|
2887
|
+
export interface GPUTextureBindingLayout {
|
|
2622
2888
|
sampleType?: string;
|
|
2623
2889
|
viewDimension?: string;
|
|
2624
2890
|
multisampled?: boolean;
|
|
2625
2891
|
}
|
|
2626
|
-
export interface
|
|
2892
|
+
export interface GPUSamplerBindingLayout {
|
|
2627
2893
|
type?: string;
|
|
2628
2894
|
}
|
|
2629
|
-
export interface
|
|
2895
|
+
export interface GPUBufferBindingLayout {
|
|
2630
2896
|
type?: string;
|
|
2631
2897
|
hasDynamicOffset?: boolean;
|
|
2632
2898
|
minBindingSize?: number | bigint;
|
|
2633
2899
|
}
|
|
2634
|
-
export interface
|
|
2635
|
-
export interface
|
|
2636
|
-
export interface
|
|
2900
|
+
export interface GPUBindGroupLayout {}
|
|
2901
|
+
export interface GPUBindGroup {}
|
|
2902
|
+
export interface GPUBindGroupDescriptor {
|
|
2637
2903
|
label?: string;
|
|
2638
|
-
layout:
|
|
2639
|
-
entries:
|
|
2904
|
+
layout: GPUBindGroupLayout;
|
|
2905
|
+
entries: GPUBindGroupEntry[];
|
|
2640
2906
|
}
|
|
2641
|
-
export interface
|
|
2907
|
+
export interface GPUBindGroupEntry {
|
|
2642
2908
|
binding: number;
|
|
2643
|
-
resource:
|
|
2909
|
+
resource: GPUBufferBinding | GPUSampler;
|
|
2644
2910
|
}
|
|
2645
|
-
export interface
|
|
2646
|
-
buffer:
|
|
2911
|
+
export interface GPUBufferBinding {
|
|
2912
|
+
buffer: GPUBuffer;
|
|
2647
2913
|
offset?: number | bigint;
|
|
2648
2914
|
size?: number | bigint;
|
|
2649
2915
|
}
|
|
2650
|
-
export interface
|
|
2651
|
-
export interface
|
|
2916
|
+
export interface GPUSampler {}
|
|
2917
|
+
export interface GPUSamplerDescriptor {
|
|
2652
2918
|
label?: string;
|
|
2653
2919
|
addressModeU?: string;
|
|
2654
2920
|
addressModeV?: string;
|
|
@@ -2661,76 +2927,74 @@ export interface gpuGPUSamplerDescriptor {
|
|
|
2661
2927
|
compare: string;
|
|
2662
2928
|
maxAnisotropy?: number;
|
|
2663
2929
|
}
|
|
2664
|
-
export interface
|
|
2665
|
-
getCompilationInfo(): Promise<
|
|
2930
|
+
export interface GPUShaderModule {
|
|
2931
|
+
getCompilationInfo(): Promise<GPUCompilationInfo>;
|
|
2666
2932
|
}
|
|
2667
|
-
export interface
|
|
2933
|
+
export interface GPUShaderModuleDescriptor {
|
|
2668
2934
|
label?: string;
|
|
2669
2935
|
code: string;
|
|
2670
2936
|
}
|
|
2671
|
-
export interface
|
|
2672
|
-
export interface
|
|
2937
|
+
export interface GPUPipelineLayout {}
|
|
2938
|
+
export interface GPUPipelineLayoutDescriptor {
|
|
2673
2939
|
label?: string;
|
|
2674
|
-
bindGroupLayouts:
|
|
2940
|
+
bindGroupLayouts: GPUBindGroupLayout[];
|
|
2675
2941
|
}
|
|
2676
|
-
export interface
|
|
2677
|
-
getBindGroupLayout(index: number):
|
|
2942
|
+
export interface GPUComputePipeline {
|
|
2943
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
2678
2944
|
}
|
|
2679
|
-
export interface
|
|
2945
|
+
export interface GPUComputePipelineDescriptor {
|
|
2680
2946
|
label?: string;
|
|
2681
|
-
compute:
|
|
2682
|
-
layout: string |
|
|
2947
|
+
compute: GPUProgrammableStage;
|
|
2948
|
+
layout: string | GPUPipelineLayout;
|
|
2683
2949
|
}
|
|
2684
|
-
export interface
|
|
2685
|
-
module:
|
|
2950
|
+
export interface GPUProgrammableStage {
|
|
2951
|
+
module: GPUShaderModule;
|
|
2686
2952
|
entryPoint: string;
|
|
2687
2953
|
constants?: Record<string, number>;
|
|
2688
2954
|
}
|
|
2689
|
-
export interface
|
|
2955
|
+
export interface GPUCommandEncoder {
|
|
2690
2956
|
get label(): string;
|
|
2691
2957
|
beginComputePass(
|
|
2692
|
-
descriptor?:
|
|
2693
|
-
):
|
|
2694
|
-
beginRenderPass(
|
|
2695
|
-
descriptor: gpuGPURenderPassDescriptor,
|
|
2696
|
-
): gpuGPURenderPassEncoder;
|
|
2958
|
+
descriptor?: GPUComputePassDescriptor,
|
|
2959
|
+
): GPUComputePassEncoder;
|
|
2960
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
2697
2961
|
copyBufferToBuffer(
|
|
2698
|
-
source:
|
|
2962
|
+
source: GPUBuffer,
|
|
2699
2963
|
sourceOffset: number | bigint,
|
|
2700
|
-
destination:
|
|
2964
|
+
destination: GPUBuffer,
|
|
2701
2965
|
destinationOffset: number | bigint,
|
|
2702
2966
|
size: number | bigint,
|
|
2703
2967
|
): void;
|
|
2704
|
-
finish(param0?:
|
|
2968
|
+
finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
2705
2969
|
copyTextureToBuffer(
|
|
2706
|
-
source:
|
|
2707
|
-
destination:
|
|
2708
|
-
copySize: Iterable<number> |
|
|
2970
|
+
source: GPUImageCopyTexture,
|
|
2971
|
+
destination: GPUImageCopyBuffer,
|
|
2972
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2709
2973
|
): void;
|
|
2710
2974
|
copyBufferToTexture(
|
|
2711
|
-
source:
|
|
2712
|
-
destination:
|
|
2713
|
-
copySize: Iterable<number> |
|
|
2975
|
+
source: GPUImageCopyBuffer,
|
|
2976
|
+
destination: GPUImageCopyTexture,
|
|
2977
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2714
2978
|
): void;
|
|
2715
2979
|
copyTextureToTexture(
|
|
2716
|
-
source:
|
|
2717
|
-
destination:
|
|
2718
|
-
copySize: Iterable<number> |
|
|
2980
|
+
source: GPUImageCopyTexture,
|
|
2981
|
+
destination: GPUImageCopyTexture,
|
|
2982
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2719
2983
|
): void;
|
|
2720
2984
|
clearBuffer(
|
|
2721
|
-
buffer:
|
|
2985
|
+
buffer: GPUBuffer,
|
|
2722
2986
|
offset?: number | bigint,
|
|
2723
2987
|
size?: number | bigint,
|
|
2724
2988
|
): void;
|
|
2725
2989
|
}
|
|
2726
|
-
export interface
|
|
2990
|
+
export interface GPUCommandEncoderDescriptor {
|
|
2727
2991
|
label?: string;
|
|
2728
2992
|
}
|
|
2729
|
-
export interface
|
|
2730
|
-
setPipeline(pipeline:
|
|
2993
|
+
export interface GPUComputePassEncoder {
|
|
2994
|
+
setPipeline(pipeline: GPUComputePipeline): void;
|
|
2731
2995
|
setBindGroup(
|
|
2732
2996
|
index: number,
|
|
2733
|
-
bindGroup:
|
|
2997
|
+
bindGroup: GPUBindGroup | null,
|
|
2734
2998
|
dynamicOffsets?: Iterable<number>,
|
|
2735
2999
|
): void;
|
|
2736
3000
|
dispatchWorkgroups(
|
|
@@ -2740,52 +3004,52 @@ export interface gpuGPUComputePassEncoder {
|
|
|
2740
3004
|
): void;
|
|
2741
3005
|
end(): void;
|
|
2742
3006
|
}
|
|
2743
|
-
export interface
|
|
3007
|
+
export interface GPUComputePassDescriptor {
|
|
2744
3008
|
label?: string;
|
|
2745
|
-
timestampWrites?:
|
|
3009
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
2746
3010
|
}
|
|
2747
|
-
export interface
|
|
2748
|
-
export interface
|
|
3011
|
+
export interface GPUQuerySet {}
|
|
3012
|
+
export interface GPUQuerySetDescriptor {
|
|
2749
3013
|
label?: string;
|
|
2750
3014
|
}
|
|
2751
|
-
export interface
|
|
2752
|
-
querySet:
|
|
3015
|
+
export interface GPUComputePassTimestampWrites {
|
|
3016
|
+
querySet: GPUQuerySet;
|
|
2753
3017
|
beginningOfPassWriteIndex?: number;
|
|
2754
3018
|
endOfPassWriteIndex?: number;
|
|
2755
3019
|
}
|
|
2756
|
-
export interface
|
|
3020
|
+
export interface GPUCommandBufferDescriptor {
|
|
2757
3021
|
label?: string;
|
|
2758
3022
|
}
|
|
2759
|
-
export interface
|
|
2760
|
-
export interface
|
|
2761
|
-
submit(commandBuffers:
|
|
3023
|
+
export interface GPUCommandBuffer {}
|
|
3024
|
+
export interface GPUQueue {
|
|
3025
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
2762
3026
|
writeBuffer(
|
|
2763
|
-
buffer:
|
|
3027
|
+
buffer: GPUBuffer,
|
|
2764
3028
|
bufferOffset: number | bigint,
|
|
2765
3029
|
data: ArrayBuffer | ArrayBufferView,
|
|
2766
3030
|
dataOffset?: number | bigint,
|
|
2767
3031
|
size?: number | bigint,
|
|
2768
3032
|
): void;
|
|
2769
3033
|
}
|
|
2770
|
-
export declare abstract class
|
|
3034
|
+
export declare abstract class GPUMapMode {
|
|
2771
3035
|
static readonly READ: number;
|
|
2772
3036
|
static readonly WRITE: number;
|
|
2773
3037
|
}
|
|
2774
|
-
export interface
|
|
3038
|
+
export interface GPURequestAdapterOptions {
|
|
2775
3039
|
powerPreference: string;
|
|
2776
3040
|
forceFallbackAdapter?: boolean;
|
|
2777
3041
|
}
|
|
2778
|
-
export interface
|
|
3042
|
+
export interface GPUAdapterInfo {
|
|
2779
3043
|
get vendor(): string;
|
|
2780
3044
|
get architecture(): string;
|
|
2781
3045
|
get device(): string;
|
|
2782
3046
|
get description(): string;
|
|
2783
3047
|
}
|
|
2784
|
-
export interface
|
|
3048
|
+
export interface GPUSupportedFeatures {
|
|
2785
3049
|
has(name: string): boolean;
|
|
2786
3050
|
keys(): string[];
|
|
2787
3051
|
}
|
|
2788
|
-
export interface
|
|
3052
|
+
export interface GPUSupportedLimits {
|
|
2789
3053
|
get maxTextureDimension1D(): number;
|
|
2790
3054
|
get maxTextureDimension2D(): number;
|
|
2791
3055
|
get maxTextureDimension3D(): number;
|
|
@@ -2818,17 +3082,17 @@ export interface gpuGPUSupportedLimits {
|
|
|
2818
3082
|
get maxComputeWorkgroupSizeZ(): number;
|
|
2819
3083
|
get maxComputeWorkgroupsPerDimension(): number;
|
|
2820
3084
|
}
|
|
2821
|
-
export declare abstract class
|
|
3085
|
+
export declare abstract class GPUError {
|
|
2822
3086
|
get message(): string;
|
|
2823
3087
|
}
|
|
2824
|
-
export declare abstract class
|
|
2825
|
-
export declare abstract class
|
|
2826
|
-
export declare abstract class
|
|
2827
|
-
export declare abstract class
|
|
3088
|
+
export declare abstract class GPUOutOfMemoryError extends GPUError {}
|
|
3089
|
+
export declare abstract class GPUInternalError extends GPUError {}
|
|
3090
|
+
export declare abstract class GPUValidationError extends GPUError {}
|
|
3091
|
+
export declare abstract class GPUDeviceLostInfo {
|
|
2828
3092
|
get message(): string;
|
|
2829
3093
|
get reason(): string;
|
|
2830
3094
|
}
|
|
2831
|
-
export interface
|
|
3095
|
+
export interface GPUCompilationMessage {
|
|
2832
3096
|
get message(): string;
|
|
2833
3097
|
get type(): string;
|
|
2834
3098
|
get lineNum(): number;
|
|
@@ -2836,19 +3100,19 @@ export interface gpuGPUCompilationMessage {
|
|
|
2836
3100
|
get offset(): number;
|
|
2837
3101
|
get length(): number;
|
|
2838
3102
|
}
|
|
2839
|
-
export interface
|
|
2840
|
-
get messages():
|
|
3103
|
+
export interface GPUCompilationInfo {
|
|
3104
|
+
get messages(): GPUCompilationMessage[];
|
|
2841
3105
|
}
|
|
2842
|
-
export declare abstract class
|
|
3106
|
+
export declare abstract class GPUTextureUsage {
|
|
2843
3107
|
static readonly COPY_SRC: number;
|
|
2844
3108
|
static readonly COPY_DST: number;
|
|
2845
3109
|
static readonly TEXTURE_BINDING: number;
|
|
2846
3110
|
static readonly STORAGE_BINDING: number;
|
|
2847
3111
|
static readonly RENDER_ATTACHMENT: number;
|
|
2848
3112
|
}
|
|
2849
|
-
export interface
|
|
3113
|
+
export interface GPUTextureDescriptor {
|
|
2850
3114
|
label: string;
|
|
2851
|
-
size: number[] |
|
|
3115
|
+
size: number[] | GPUExtent3DDict;
|
|
2852
3116
|
mipLevelCount?: number;
|
|
2853
3117
|
sampleCount?: number;
|
|
2854
3118
|
dimension?: string;
|
|
@@ -2856,13 +3120,13 @@ export interface gpuGPUTextureDescriptor {
|
|
|
2856
3120
|
usage: number;
|
|
2857
3121
|
viewFormats?: string[];
|
|
2858
3122
|
}
|
|
2859
|
-
export interface
|
|
3123
|
+
export interface GPUExtent3DDict {
|
|
2860
3124
|
width: number;
|
|
2861
3125
|
height?: number;
|
|
2862
3126
|
depthOrArrayLayers?: number;
|
|
2863
3127
|
}
|
|
2864
|
-
export interface
|
|
2865
|
-
createView(descriptor?:
|
|
3128
|
+
export interface GPUTexture {
|
|
3129
|
+
createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
|
|
2866
3130
|
destroy(): void;
|
|
2867
3131
|
get width(): number;
|
|
2868
3132
|
get height(): number;
|
|
@@ -2872,8 +3136,8 @@ export interface gpuGPUTexture {
|
|
|
2872
3136
|
get format(): string;
|
|
2873
3137
|
get usage(): number;
|
|
2874
3138
|
}
|
|
2875
|
-
export interface
|
|
2876
|
-
export interface
|
|
3139
|
+
export interface GPUTextureView {}
|
|
3140
|
+
export interface GPUTextureViewDescriptor {
|
|
2877
3141
|
label: string;
|
|
2878
3142
|
format: string;
|
|
2879
3143
|
dimension: string;
|
|
@@ -2883,91 +3147,91 @@ export interface gpuGPUTextureViewDescriptor {
|
|
|
2883
3147
|
baseArrayLayer?: number;
|
|
2884
3148
|
arrayLayerCount: number;
|
|
2885
3149
|
}
|
|
2886
|
-
export declare abstract class
|
|
3150
|
+
export declare abstract class GPUColorWrite {
|
|
2887
3151
|
static readonly RED: number;
|
|
2888
3152
|
static readonly GREEN: number;
|
|
2889
3153
|
static readonly BLUE: number;
|
|
2890
3154
|
static readonly ALPHA: number;
|
|
2891
3155
|
static readonly ALL: number;
|
|
2892
3156
|
}
|
|
2893
|
-
export interface
|
|
2894
|
-
export interface
|
|
3157
|
+
export interface GPURenderPipeline {}
|
|
3158
|
+
export interface GPURenderPipelineDescriptor {
|
|
2895
3159
|
label?: string;
|
|
2896
|
-
layout: string |
|
|
2897
|
-
vertex:
|
|
2898
|
-
primitive?:
|
|
2899
|
-
depthStencil?:
|
|
2900
|
-
multisample?:
|
|
2901
|
-
fragment?:
|
|
2902
|
-
}
|
|
2903
|
-
export interface
|
|
2904
|
-
module:
|
|
3160
|
+
layout: string | GPUPipelineLayout;
|
|
3161
|
+
vertex: GPUVertexState;
|
|
3162
|
+
primitive?: GPUPrimitiveState;
|
|
3163
|
+
depthStencil?: GPUDepthStencilState;
|
|
3164
|
+
multisample?: GPUMultisampleState;
|
|
3165
|
+
fragment?: GPUFragmentState;
|
|
3166
|
+
}
|
|
3167
|
+
export interface GPUVertexState {
|
|
3168
|
+
module: GPUShaderModule;
|
|
2905
3169
|
entryPoint: string;
|
|
2906
3170
|
constants?: Record<string, number>;
|
|
2907
|
-
buffers?:
|
|
3171
|
+
buffers?: GPUVertexBufferLayout[];
|
|
2908
3172
|
}
|
|
2909
|
-
export interface
|
|
3173
|
+
export interface GPUVertexBufferLayout {
|
|
2910
3174
|
arrayStride: number | bigint;
|
|
2911
3175
|
stepMode?: string;
|
|
2912
|
-
attributes:
|
|
3176
|
+
attributes: GPUVertexAttribute[];
|
|
2913
3177
|
}
|
|
2914
|
-
export interface
|
|
3178
|
+
export interface GPUVertexAttribute {
|
|
2915
3179
|
format: string;
|
|
2916
3180
|
offset: number | bigint;
|
|
2917
3181
|
shaderLocation: number;
|
|
2918
3182
|
}
|
|
2919
|
-
export interface
|
|
3183
|
+
export interface GPUPrimitiveState {
|
|
2920
3184
|
topology?: string;
|
|
2921
3185
|
stripIndexFormat?: string;
|
|
2922
3186
|
frontFace?: string;
|
|
2923
3187
|
cullMode?: string;
|
|
2924
3188
|
unclippedDepth?: boolean;
|
|
2925
3189
|
}
|
|
2926
|
-
export interface
|
|
3190
|
+
export interface GPUStencilFaceState {
|
|
2927
3191
|
compare?: string;
|
|
2928
3192
|
failOp?: string;
|
|
2929
3193
|
depthFailOp?: string;
|
|
2930
3194
|
passOp?: string;
|
|
2931
3195
|
}
|
|
2932
|
-
export interface
|
|
3196
|
+
export interface GPUDepthStencilState {
|
|
2933
3197
|
format: string;
|
|
2934
3198
|
depthWriteEnabled: boolean;
|
|
2935
3199
|
depthCompare: string;
|
|
2936
|
-
stencilFront?:
|
|
2937
|
-
stencilBack?:
|
|
3200
|
+
stencilFront?: GPUStencilFaceState;
|
|
3201
|
+
stencilBack?: GPUStencilFaceState;
|
|
2938
3202
|
stencilReadMask?: number;
|
|
2939
3203
|
stencilWriteMask?: number;
|
|
2940
3204
|
depthBias?: number;
|
|
2941
3205
|
depthBiasSlopeScale?: number;
|
|
2942
3206
|
depthBiasClamp?: number;
|
|
2943
3207
|
}
|
|
2944
|
-
export interface
|
|
3208
|
+
export interface GPUMultisampleState {
|
|
2945
3209
|
count?: number;
|
|
2946
3210
|
mask?: number;
|
|
2947
3211
|
alphaToCoverageEnabled?: boolean;
|
|
2948
3212
|
}
|
|
2949
|
-
export interface
|
|
2950
|
-
module:
|
|
3213
|
+
export interface GPUFragmentState {
|
|
3214
|
+
module: GPUShaderModule;
|
|
2951
3215
|
entryPoint: string;
|
|
2952
3216
|
constants?: Record<string, number>;
|
|
2953
|
-
targets:
|
|
3217
|
+
targets: GPUColorTargetState[];
|
|
2954
3218
|
}
|
|
2955
|
-
export interface
|
|
3219
|
+
export interface GPUColorTargetState {
|
|
2956
3220
|
format: string;
|
|
2957
|
-
blend:
|
|
3221
|
+
blend: GPUBlendState;
|
|
2958
3222
|
writeMask?: number;
|
|
2959
3223
|
}
|
|
2960
|
-
export interface
|
|
2961
|
-
color:
|
|
2962
|
-
alpha:
|
|
3224
|
+
export interface GPUBlendState {
|
|
3225
|
+
color: GPUBlendComponent;
|
|
3226
|
+
alpha: GPUBlendComponent;
|
|
2963
3227
|
}
|
|
2964
|
-
export interface
|
|
3228
|
+
export interface GPUBlendComponent {
|
|
2965
3229
|
operation?: string;
|
|
2966
3230
|
srcFactor?: string;
|
|
2967
3231
|
dstFactor?: string;
|
|
2968
3232
|
}
|
|
2969
|
-
export interface
|
|
2970
|
-
setPipeline(pipeline:
|
|
3233
|
+
export interface GPURenderPassEncoder {
|
|
3234
|
+
setPipeline(pipeline: GPURenderPipeline): void;
|
|
2971
3235
|
draw(
|
|
2972
3236
|
vertexCount: number,
|
|
2973
3237
|
instanceCount?: number,
|
|
@@ -2976,30 +3240,30 @@ export interface gpuGPURenderPassEncoder {
|
|
|
2976
3240
|
): void;
|
|
2977
3241
|
end(): void;
|
|
2978
3242
|
}
|
|
2979
|
-
export interface
|
|
3243
|
+
export interface GPURenderPassDescriptor {
|
|
2980
3244
|
label?: string;
|
|
2981
|
-
colorAttachments:
|
|
2982
|
-
depthStencilAttachment?:
|
|
2983
|
-
occlusionQuerySet?:
|
|
2984
|
-
timestampWrites?:
|
|
3245
|
+
colorAttachments: GPURenderPassColorAttachment[];
|
|
3246
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
3247
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
3248
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
2985
3249
|
maxDrawCount?: number | bigint;
|
|
2986
3250
|
}
|
|
2987
|
-
export interface
|
|
2988
|
-
view:
|
|
3251
|
+
export interface GPURenderPassColorAttachment {
|
|
3252
|
+
view: GPUTextureView;
|
|
2989
3253
|
depthSlice?: number;
|
|
2990
|
-
resolveTarget?:
|
|
2991
|
-
clearValue?: number[] |
|
|
3254
|
+
resolveTarget?: GPUTextureView;
|
|
3255
|
+
clearValue?: number[] | GPUColorDict;
|
|
2992
3256
|
loadOp: string;
|
|
2993
3257
|
storeOp: string;
|
|
2994
3258
|
}
|
|
2995
|
-
export interface
|
|
3259
|
+
export interface GPUColorDict {
|
|
2996
3260
|
r: number;
|
|
2997
3261
|
g: number;
|
|
2998
3262
|
b: number;
|
|
2999
3263
|
a: number;
|
|
3000
3264
|
}
|
|
3001
|
-
export interface
|
|
3002
|
-
view:
|
|
3265
|
+
export interface GPURenderPassDepthStencilAttachment {
|
|
3266
|
+
view: GPUTextureView;
|
|
3003
3267
|
depthClearValue?: number;
|
|
3004
3268
|
depthLoadOp?: string;
|
|
3005
3269
|
depthStoreOp?: string;
|
|
@@ -3009,28 +3273,373 @@ export interface gpuGPURenderPassDepthStencilAttachment {
|
|
|
3009
3273
|
stencilStoreOp?: string;
|
|
3010
3274
|
stencilReadOnly?: boolean;
|
|
3011
3275
|
}
|
|
3012
|
-
export interface
|
|
3013
|
-
querySet:
|
|
3276
|
+
export interface GPURenderPassTimestampWrites {
|
|
3277
|
+
querySet: GPUQuerySet;
|
|
3014
3278
|
beginningOfPassWriteIndex?: number;
|
|
3015
3279
|
endOfPassWriteIndex?: number;
|
|
3016
3280
|
}
|
|
3017
|
-
export interface
|
|
3018
|
-
texture:
|
|
3281
|
+
export interface GPUImageCopyTexture {
|
|
3282
|
+
texture: GPUTexture;
|
|
3019
3283
|
mipLevel?: number;
|
|
3020
|
-
origin?: number[] |
|
|
3284
|
+
origin?: number[] | GPUOrigin3DDict;
|
|
3021
3285
|
aspect?: string;
|
|
3022
3286
|
}
|
|
3023
|
-
export interface
|
|
3024
|
-
buffer:
|
|
3287
|
+
export interface GPUImageCopyBuffer {
|
|
3288
|
+
buffer: GPUBuffer;
|
|
3025
3289
|
offset?: number | bigint;
|
|
3026
3290
|
bytesPerRow?: number;
|
|
3027
3291
|
rowsPerImage?: number;
|
|
3028
3292
|
}
|
|
3029
|
-
export interface
|
|
3293
|
+
export interface GPUOrigin3DDict {
|
|
3030
3294
|
x?: number;
|
|
3031
3295
|
y?: number;
|
|
3032
3296
|
z?: number;
|
|
3033
3297
|
}
|
|
3298
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3299
|
+
export declare class EventSource {
|
|
3300
|
+
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3301
|
+
/**
|
|
3302
|
+
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
3303
|
+
*
|
|
3304
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3305
|
+
*/
|
|
3306
|
+
close(): void;
|
|
3307
|
+
/**
|
|
3308
|
+
* Returns the URL providing the event stream.
|
|
3309
|
+
*
|
|
3310
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3311
|
+
*/
|
|
3312
|
+
get url(): string;
|
|
3313
|
+
/**
|
|
3314
|
+
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
3315
|
+
*
|
|
3316
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3317
|
+
*/
|
|
3318
|
+
get withCredentials(): boolean;
|
|
3319
|
+
/**
|
|
3320
|
+
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
3321
|
+
*
|
|
3322
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3323
|
+
*/
|
|
3324
|
+
get readyState(): number;
|
|
3325
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3326
|
+
get onopen(): any | null;
|
|
3327
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3328
|
+
set onopen(value: any | null);
|
|
3329
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3330
|
+
get onmessage(): any | null;
|
|
3331
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3332
|
+
set onmessage(value: any | null);
|
|
3333
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3334
|
+
get onerror(): any | null;
|
|
3335
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3336
|
+
set onerror(value: any | null);
|
|
3337
|
+
static readonly CONNECTING: number;
|
|
3338
|
+
static readonly OPEN: number;
|
|
3339
|
+
static readonly CLOSED: number;
|
|
3340
|
+
static from(stream: ReadableStream): EventSource;
|
|
3341
|
+
}
|
|
3342
|
+
export interface EventSourceEventSourceInit {
|
|
3343
|
+
withCredentials?: boolean;
|
|
3344
|
+
fetcher?: Fetcher;
|
|
3345
|
+
}
|
|
3346
|
+
export type AiImageClassificationInput = {
|
|
3347
|
+
image: number[];
|
|
3348
|
+
};
|
|
3349
|
+
export type AiImageClassificationOutput = {
|
|
3350
|
+
score?: number;
|
|
3351
|
+
label?: string;
|
|
3352
|
+
}[];
|
|
3353
|
+
export declare abstract class BaseAiImageClassification {
|
|
3354
|
+
inputs: AiImageClassificationInput;
|
|
3355
|
+
postProcessedOutputs: AiImageClassificationOutput;
|
|
3356
|
+
}
|
|
3357
|
+
export type AiImageToTextInput = {
|
|
3358
|
+
image: number[];
|
|
3359
|
+
prompt?: string;
|
|
3360
|
+
max_tokens?: number;
|
|
3361
|
+
temperature?: number;
|
|
3362
|
+
top_p?: number;
|
|
3363
|
+
top_k?: number;
|
|
3364
|
+
seed?: number;
|
|
3365
|
+
repetition_penalty?: number;
|
|
3366
|
+
frequency_penalty?: number;
|
|
3367
|
+
presence_penalty?: number;
|
|
3368
|
+
raw?: boolean;
|
|
3369
|
+
messages?: RoleScopedChatInput[];
|
|
3370
|
+
};
|
|
3371
|
+
export type AiImageToTextOutput = {
|
|
3372
|
+
description: string;
|
|
3373
|
+
};
|
|
3374
|
+
export declare abstract class BaseAiImageToText {
|
|
3375
|
+
inputs: AiImageToTextInput;
|
|
3376
|
+
postProcessedOutputs: AiImageToTextOutput;
|
|
3377
|
+
}
|
|
3378
|
+
export type AiObjectDetectionInput = {
|
|
3379
|
+
image: number[];
|
|
3380
|
+
};
|
|
3381
|
+
export type AiObjectDetectionOutput = {
|
|
3382
|
+
score?: number;
|
|
3383
|
+
label?: string;
|
|
3384
|
+
}[];
|
|
3385
|
+
export declare abstract class BaseAiObjectDetection {
|
|
3386
|
+
inputs: AiObjectDetectionInput;
|
|
3387
|
+
postProcessedOutputs: AiObjectDetectionOutput;
|
|
3388
|
+
}
|
|
3389
|
+
export type AiSentenceSimilarityInput = {
|
|
3390
|
+
source: string;
|
|
3391
|
+
sentences: string[];
|
|
3392
|
+
};
|
|
3393
|
+
export type AiSentenceSimilarityOutput = number[];
|
|
3394
|
+
export declare abstract class BaseAiSentenceSimilarity {
|
|
3395
|
+
inputs: AiSentenceSimilarityInput;
|
|
3396
|
+
postProcessedOutputs: AiSentenceSimilarityOutput;
|
|
3397
|
+
}
|
|
3398
|
+
export type AiSpeechRecognitionInput = {
|
|
3399
|
+
audio: number[];
|
|
3400
|
+
};
|
|
3401
|
+
export type AiSpeechRecognitionOutput = {
|
|
3402
|
+
text?: string;
|
|
3403
|
+
words?: {
|
|
3404
|
+
word: string;
|
|
3405
|
+
start: number;
|
|
3406
|
+
end: number;
|
|
3407
|
+
}[];
|
|
3408
|
+
vtt?: string;
|
|
3409
|
+
};
|
|
3410
|
+
export declare abstract class BaseAiSpeechRecognition {
|
|
3411
|
+
inputs: AiSpeechRecognitionInput;
|
|
3412
|
+
postProcessedOutputs: AiSpeechRecognitionOutput;
|
|
3413
|
+
}
|
|
3414
|
+
export type AiSummarizationInput = {
|
|
3415
|
+
input_text: string;
|
|
3416
|
+
max_length?: number;
|
|
3417
|
+
};
|
|
3418
|
+
export type AiSummarizationOutput = {
|
|
3419
|
+
summary: string;
|
|
3420
|
+
};
|
|
3421
|
+
export declare abstract class BaseAiSummarization {
|
|
3422
|
+
inputs: AiSummarizationInput;
|
|
3423
|
+
postProcessedOutputs: AiSummarizationOutput;
|
|
3424
|
+
}
|
|
3425
|
+
export type AiTextClassificationInput = {
|
|
3426
|
+
text: string;
|
|
3427
|
+
};
|
|
3428
|
+
export type AiTextClassificationOutput = {
|
|
3429
|
+
score?: number;
|
|
3430
|
+
label?: string;
|
|
3431
|
+
}[];
|
|
3432
|
+
export declare abstract class BaseAiTextClassification {
|
|
3433
|
+
inputs: AiTextClassificationInput;
|
|
3434
|
+
postProcessedOutputs: AiTextClassificationOutput;
|
|
3435
|
+
}
|
|
3436
|
+
export type AiTextEmbeddingsInput = {
|
|
3437
|
+
text: string | string[];
|
|
3438
|
+
};
|
|
3439
|
+
export type AiTextEmbeddingsOutput = {
|
|
3440
|
+
shape: number[];
|
|
3441
|
+
data: number[][];
|
|
3442
|
+
};
|
|
3443
|
+
export declare abstract class BaseAiTextEmbeddings {
|
|
3444
|
+
inputs: AiTextEmbeddingsInput;
|
|
3445
|
+
postProcessedOutputs: AiTextEmbeddingsOutput;
|
|
3446
|
+
}
|
|
3447
|
+
export type RoleScopedChatInput = {
|
|
3448
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
3449
|
+
content: string;
|
|
3450
|
+
};
|
|
3451
|
+
export type AiTextGenerationToolInput = {
|
|
3452
|
+
type: "function";
|
|
3453
|
+
function: {
|
|
3454
|
+
name: string;
|
|
3455
|
+
description: string;
|
|
3456
|
+
parameters?: {
|
|
3457
|
+
type: "object";
|
|
3458
|
+
properties: {
|
|
3459
|
+
[key: string]: {
|
|
3460
|
+
type: string;
|
|
3461
|
+
description?: string;
|
|
3462
|
+
};
|
|
3463
|
+
};
|
|
3464
|
+
required: string[];
|
|
3465
|
+
};
|
|
3466
|
+
};
|
|
3467
|
+
};
|
|
3468
|
+
export type AiTextGenerationInput = {
|
|
3469
|
+
prompt?: string;
|
|
3470
|
+
raw?: boolean;
|
|
3471
|
+
stream?: boolean;
|
|
3472
|
+
max_tokens?: number;
|
|
3473
|
+
temperature?: number;
|
|
3474
|
+
top_p?: number;
|
|
3475
|
+
top_k?: number;
|
|
3476
|
+
seed?: number;
|
|
3477
|
+
repetition_penalty?: number;
|
|
3478
|
+
frequency_penalty?: number;
|
|
3479
|
+
presence_penalty?: number;
|
|
3480
|
+
messages?: RoleScopedChatInput[];
|
|
3481
|
+
tools?: AiTextGenerationToolInput[];
|
|
3482
|
+
};
|
|
3483
|
+
export type AiTextGenerationOutput =
|
|
3484
|
+
| {
|
|
3485
|
+
response?: string;
|
|
3486
|
+
tool_calls?: {
|
|
3487
|
+
name: string;
|
|
3488
|
+
arguments: unknown;
|
|
3489
|
+
}[];
|
|
3490
|
+
}
|
|
3491
|
+
| ReadableStream;
|
|
3492
|
+
export declare abstract class BaseAiTextGeneration {
|
|
3493
|
+
inputs: AiTextGenerationInput;
|
|
3494
|
+
postProcessedOutputs: AiTextGenerationOutput;
|
|
3495
|
+
}
|
|
3496
|
+
export type AiTextToImageInput = {
|
|
3497
|
+
prompt: string;
|
|
3498
|
+
image?: number[];
|
|
3499
|
+
mask?: number[];
|
|
3500
|
+
num_steps?: number;
|
|
3501
|
+
strength?: number;
|
|
3502
|
+
guidance?: number;
|
|
3503
|
+
};
|
|
3504
|
+
export type AiTextToImageOutput = Uint8Array;
|
|
3505
|
+
export declare abstract class BaseAiTextToImage {
|
|
3506
|
+
inputs: AiTextToImageInput;
|
|
3507
|
+
postProcessedOutputs: AiTextToImageOutput;
|
|
3508
|
+
}
|
|
3509
|
+
export type AiTranslationInput = {
|
|
3510
|
+
text: string;
|
|
3511
|
+
target_lang: string;
|
|
3512
|
+
source_lang?: string;
|
|
3513
|
+
};
|
|
3514
|
+
export type AiTranslationOutput = {
|
|
3515
|
+
translated_text?: string;
|
|
3516
|
+
};
|
|
3517
|
+
export declare abstract class BaseAiTranslation {
|
|
3518
|
+
inputs: AiTranslationInput;
|
|
3519
|
+
postProcessedOutputs: AiTranslationOutput;
|
|
3520
|
+
}
|
|
3521
|
+
export type GatewayOptions = {
|
|
3522
|
+
id: string;
|
|
3523
|
+
cacheTtl?: number;
|
|
3524
|
+
skipCache?: boolean;
|
|
3525
|
+
metadata?: Record<string, number | string | boolean | null | bigint>;
|
|
3526
|
+
};
|
|
3527
|
+
export type AiOptions = {
|
|
3528
|
+
gateway?: GatewayOptions;
|
|
3529
|
+
prefix?: string;
|
|
3530
|
+
extraHeaders?: object;
|
|
3531
|
+
};
|
|
3532
|
+
export type BaseAiTextClassificationModels =
|
|
3533
|
+
"@cf/huggingface/distilbert-sst-2-int8";
|
|
3534
|
+
export type BaseAiTextToImageModels =
|
|
3535
|
+
| "@cf/stabilityai/stable-diffusion-xl-base-1.0"
|
|
3536
|
+
| "@cf/runwayml/stable-diffusion-v1-5-inpainting"
|
|
3537
|
+
| "@cf/runwayml/stable-diffusion-v1-5-img2img"
|
|
3538
|
+
| "@cf/lykon/dreamshaper-8-lcm"
|
|
3539
|
+
| "@cf/bytedance/stable-diffusion-xl-lightning";
|
|
3540
|
+
export type BaseAiTextEmbeddingsModels =
|
|
3541
|
+
| "@cf/baai/bge-small-en-v1.5"
|
|
3542
|
+
| "@cf/baai/bge-base-en-v1.5"
|
|
3543
|
+
| "@cf/baai/bge-large-en-v1.5";
|
|
3544
|
+
export type BaseAiSpeechRecognitionModels =
|
|
3545
|
+
| "@cf/openai/whisper"
|
|
3546
|
+
| "@cf/openai/whisper-tiny-en"
|
|
3547
|
+
| "@cf/openai/whisper-sherpa";
|
|
3548
|
+
export type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
|
|
3549
|
+
export type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
|
|
3550
|
+
export type BaseAiTextGenerationModels =
|
|
3551
|
+
| "@cf/meta/llama-3-8b-instruct"
|
|
3552
|
+
| "@cf/meta/llama-3-8b-instruct-awq"
|
|
3553
|
+
| "@cf/meta/llama-2-7b-chat-int8"
|
|
3554
|
+
| "@cf/mistral/mistral-7b-instruct-v0.1"
|
|
3555
|
+
| "@cf/mistral/mistral-7b-instruct-v0.2-lora"
|
|
3556
|
+
| "@cf/meta/llama-2-7b-chat-fp16"
|
|
3557
|
+
| "@hf/thebloke/llama-2-13b-chat-awq"
|
|
3558
|
+
| "@hf/thebloke/zephyr-7b-beta-awq"
|
|
3559
|
+
| "@hf/thebloke/mistral-7b-instruct-v0.1-awq"
|
|
3560
|
+
| "@hf/thebloke/codellama-7b-instruct-awq"
|
|
3561
|
+
| "@hf/thebloke/openhermes-2.5-mistral-7b-awq"
|
|
3562
|
+
| "@hf/thebloke/neural-chat-7b-v3-1-awq"
|
|
3563
|
+
| "@hf/thebloke/llamaguard-7b-awq"
|
|
3564
|
+
| "@hf/thebloke/deepseek-coder-6.7b-base-awq"
|
|
3565
|
+
| "@hf/thebloke/deepseek-coder-6.7b-instruct-awq"
|
|
3566
|
+
| "@hf/nousresearch/hermes-2-pro-mistral-7b"
|
|
3567
|
+
| "@hf/mistral/mistral-7b-instruct-v0.2"
|
|
3568
|
+
| "@hf/google/gemma-7b-it"
|
|
3569
|
+
| "@hf/nexusflow/starling-lm-7b-beta"
|
|
3570
|
+
| "@cf/deepseek-ai/deepseek-math-7b-instruct"
|
|
3571
|
+
| "@cf/defog/sqlcoder-7b-2"
|
|
3572
|
+
| "@cf/openchat/openchat-3.5-0106"
|
|
3573
|
+
| "@cf/tiiuae/falcon-7b-instruct"
|
|
3574
|
+
| "@cf/thebloke/discolm-german-7b-v1-awq"
|
|
3575
|
+
| "@cf/qwen/qwen1.5-0.5b-chat"
|
|
3576
|
+
| "@cf/qwen/qwen1.5-1.8b-chat"
|
|
3577
|
+
| "@cf/qwen/qwen1.5-7b-chat-awq"
|
|
3578
|
+
| "@cf/qwen/qwen1.5-14b-chat-awq"
|
|
3579
|
+
| "@cf/tinyllama/tinyllama-1.1b-chat-v1.0"
|
|
3580
|
+
| "@cf/microsoft/phi-2"
|
|
3581
|
+
| "@cf/google/gemma-2b-it-lora"
|
|
3582
|
+
| "@cf/google/gemma-7b-it-lora"
|
|
3583
|
+
| "@cf/meta-llama/llama-2-7b-chat-hf-lora"
|
|
3584
|
+
| "@cf/fblgit/una-cybertron-7b-v2-bf16"
|
|
3585
|
+
| "@cf/fblgit/una-cybertron-7b-v2-awq";
|
|
3586
|
+
export type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
|
|
3587
|
+
export type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
|
|
3588
|
+
export type BaseAiImageToTextModels =
|
|
3589
|
+
| "@cf/unum/uform-gen2-qwen-500m"
|
|
3590
|
+
| "@cf/llava-hf/llava-1.5-7b-hf";
|
|
3591
|
+
export declare abstract class Ai {
|
|
3592
|
+
run(
|
|
3593
|
+
model: BaseAiTextClassificationModels,
|
|
3594
|
+
inputs: BaseAiTextClassification["inputs"],
|
|
3595
|
+
options?: AiOptions,
|
|
3596
|
+
): Promise<BaseAiTextClassification["postProcessedOutputs"]>;
|
|
3597
|
+
run(
|
|
3598
|
+
model: BaseAiTextToImageModels,
|
|
3599
|
+
inputs: BaseAiTextToImage["inputs"],
|
|
3600
|
+
options?: AiOptions,
|
|
3601
|
+
): Promise<BaseAiTextToImage["postProcessedOutputs"]>;
|
|
3602
|
+
run(
|
|
3603
|
+
model: BaseAiTextEmbeddingsModels,
|
|
3604
|
+
inputs: BaseAiTextEmbeddings["inputs"],
|
|
3605
|
+
options?: AiOptions,
|
|
3606
|
+
): Promise<BaseAiTextEmbeddings["postProcessedOutputs"]>;
|
|
3607
|
+
run(
|
|
3608
|
+
model: BaseAiSpeechRecognitionModels,
|
|
3609
|
+
inputs: BaseAiSpeechRecognition["inputs"],
|
|
3610
|
+
options?: AiOptions,
|
|
3611
|
+
): Promise<BaseAiSpeechRecognition["postProcessedOutputs"]>;
|
|
3612
|
+
run(
|
|
3613
|
+
model: BaseAiImageClassificationModels,
|
|
3614
|
+
inputs: BaseAiImageClassification["inputs"],
|
|
3615
|
+
options?: AiOptions,
|
|
3616
|
+
): Promise<BaseAiImageClassification["postProcessedOutputs"]>;
|
|
3617
|
+
run(
|
|
3618
|
+
model: BaseAiObjectDetectionModels,
|
|
3619
|
+
inputs: BaseAiObjectDetection["inputs"],
|
|
3620
|
+
options?: AiOptions,
|
|
3621
|
+
): Promise<BaseAiObjectDetection["postProcessedOutputs"]>;
|
|
3622
|
+
run(
|
|
3623
|
+
model: BaseAiTextGenerationModels,
|
|
3624
|
+
inputs: BaseAiTextGeneration["inputs"],
|
|
3625
|
+
options?: AiOptions,
|
|
3626
|
+
): Promise<BaseAiTextGeneration["postProcessedOutputs"]>;
|
|
3627
|
+
run(
|
|
3628
|
+
model: BaseAiTranslationModels,
|
|
3629
|
+
inputs: BaseAiTranslation["inputs"],
|
|
3630
|
+
options?: AiOptions,
|
|
3631
|
+
): Promise<BaseAiTranslation["postProcessedOutputs"]>;
|
|
3632
|
+
run(
|
|
3633
|
+
model: BaseAiSummarizationModels,
|
|
3634
|
+
inputs: BaseAiSummarization["inputs"],
|
|
3635
|
+
options?: AiOptions,
|
|
3636
|
+
): Promise<BaseAiSummarization["postProcessedOutputs"]>;
|
|
3637
|
+
run(
|
|
3638
|
+
model: BaseAiImageToTextModels,
|
|
3639
|
+
inputs: BaseAiImageToText["inputs"],
|
|
3640
|
+
options?: AiOptions,
|
|
3641
|
+
): Promise<BaseAiImageToText["postProcessedOutputs"]>;
|
|
3642
|
+
}
|
|
3034
3643
|
export interface BasicImageTransformations {
|
|
3035
3644
|
/**
|
|
3036
3645
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3145,6 +3754,7 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
3145
3754
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
3146
3755
|
mirage?: boolean;
|
|
3147
3756
|
polish?: "lossy" | "lossless" | "off";
|
|
3757
|
+
r2?: RequestInitCfPropertiesR2;
|
|
3148
3758
|
/**
|
|
3149
3759
|
* Redirects the request to an alternate origin server. You can use this,
|
|
3150
3760
|
* for example, to implement load balancing across several origins.
|
|
@@ -3329,6 +3939,12 @@ export interface RequestInitCfPropertiesImageMinify {
|
|
|
3329
3939
|
css?: boolean;
|
|
3330
3940
|
html?: boolean;
|
|
3331
3941
|
}
|
|
3942
|
+
export interface RequestInitCfPropertiesR2 {
|
|
3943
|
+
/**
|
|
3944
|
+
* Colo id of bucket that an object is stored in
|
|
3945
|
+
*/
|
|
3946
|
+
bucketColoId?: number;
|
|
3947
|
+
}
|
|
3332
3948
|
/**
|
|
3333
3949
|
* Request metadata provided by Cloudflare's edge.
|
|
3334
3950
|
*/
|
|
@@ -3721,7 +4337,7 @@ export interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
|
|
|
3721
4337
|
certNotAfter: "";
|
|
3722
4338
|
}
|
|
3723
4339
|
/** Possible outcomes of TLS verification */
|
|
3724
|
-
export type CertVerificationStatus =
|
|
4340
|
+
export declare type CertVerificationStatus =
|
|
3725
4341
|
/** Authentication succeeded */
|
|
3726
4342
|
| "SUCCESS"
|
|
3727
4343
|
/** No certificate was presented */
|
|
@@ -3739,7 +4355,7 @@ export type CertVerificationStatus =
|
|
|
3739
4355
|
/**
|
|
3740
4356
|
* An upstream endpoint's response to a TCP `keepalive` message from Cloudflare.
|
|
3741
4357
|
*/
|
|
3742
|
-
export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
4358
|
+
export declare type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
3743
4359
|
| 0 /** Unknown */
|
|
3744
4360
|
| 1 /** no keepalives (not found) */
|
|
3745
4361
|
| 2 /** no connection re-use, opening keepalive connection failed */
|
|
@@ -3747,7 +4363,7 @@ export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
|
3747
4363
|
| 4 /** connection re-use, refused by the origin server (`TCP FIN`) */
|
|
3748
4364
|
| 5; /** connection re-use, accepted by the origin server */
|
|
3749
4365
|
/** ISO 3166-1 Alpha-2 codes */
|
|
3750
|
-
export type Iso3166Alpha2Code =
|
|
4366
|
+
export declare type Iso3166Alpha2Code =
|
|
3751
4367
|
| "AD"
|
|
3752
4368
|
| "AE"
|
|
3753
4369
|
| "AF"
|
|
@@ -3998,7 +4614,14 @@ export type Iso3166Alpha2Code =
|
|
|
3998
4614
|
| "ZM"
|
|
3999
4615
|
| "ZW";
|
|
4000
4616
|
/** The 2-letter continent codes Cloudflare uses */
|
|
4001
|
-
export type ContinentCode =
|
|
4617
|
+
export declare type ContinentCode =
|
|
4618
|
+
| "AF"
|
|
4619
|
+
| "AN"
|
|
4620
|
+
| "AS"
|
|
4621
|
+
| "EU"
|
|
4622
|
+
| "NA"
|
|
4623
|
+
| "OC"
|
|
4624
|
+
| "SA";
|
|
4002
4625
|
export type CfProperties<HostMetadata = unknown> =
|
|
4003
4626
|
| IncomingRequestCfProperties<HostMetadata>
|
|
4004
4627
|
| RequestInitCfProperties;
|
|
@@ -4099,7 +4722,7 @@ export interface SendEmail {
|
|
|
4099
4722
|
export declare abstract class EmailEvent extends ExtendableEvent {
|
|
4100
4723
|
readonly message: ForwardableEmailMessage;
|
|
4101
4724
|
}
|
|
4102
|
-
export type EmailExportedHandler<Env = unknown> = (
|
|
4725
|
+
export declare type EmailExportedHandler<Env = unknown> = (
|
|
4103
4726
|
message: ForwardableEmailMessage,
|
|
4104
4727
|
env: Env,
|
|
4105
4728
|
ctx: ExecutionContext,
|
|
@@ -4228,6 +4851,20 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
|
|
|
4228
4851
|
// Key Identifier of the JWK
|
|
4229
4852
|
readonly kid: string;
|
|
4230
4853
|
}
|
|
4854
|
+
export interface RateLimitOptions {
|
|
4855
|
+
key: string;
|
|
4856
|
+
}
|
|
4857
|
+
export interface RateLimitOutcome {
|
|
4858
|
+
success: boolean;
|
|
4859
|
+
}
|
|
4860
|
+
export interface RateLimit {
|
|
4861
|
+
/**
|
|
4862
|
+
* Rate limit a request based on the provided options.
|
|
4863
|
+
* @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
|
|
4864
|
+
* @returns A promise that resolves with the outcome of the rate limit.
|
|
4865
|
+
*/
|
|
4866
|
+
limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
|
|
4867
|
+
}
|
|
4231
4868
|
// Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
|
|
4232
4869
|
// to referenced by `Fetcher`. This is included in the "importable" version of the types which
|
|
4233
4870
|
// strips all `module` blocks.
|
|
@@ -4491,6 +5128,15 @@ export interface VectorizeVectorMutation {
|
|
|
4491
5128
|
/* Total count of the number of processed vectors. */
|
|
4492
5129
|
count: number;
|
|
4493
5130
|
}
|
|
5131
|
+
/**
|
|
5132
|
+
* Results of an operation that performed a mutation on a set of vectors
|
|
5133
|
+
* with the v2 version of Vectorize.
|
|
5134
|
+
* Here, `mutationId` is the identifier for the last mutation processed by Vectorize.
|
|
5135
|
+
*/
|
|
5136
|
+
export interface VectorizeVectorMutationV2 {
|
|
5137
|
+
/* The identifier for the last mutation processed by Vectorize. */
|
|
5138
|
+
mutationId: string;
|
|
5139
|
+
}
|
|
4494
5140
|
export declare abstract class VectorizeIndex {
|
|
4495
5141
|
/**
|
|
4496
5142
|
* Get information about the currently bound index.
|
|
@@ -4541,6 +5187,8 @@ export type WorkerVersionMetadata = {
|
|
|
4541
5187
|
id: string;
|
|
4542
5188
|
/** The tag of the Worker Version using this binding */
|
|
4543
5189
|
tag: string;
|
|
5190
|
+
/** The timestamp of when the Worker Version was uploaded */
|
|
5191
|
+
timestamp: string;
|
|
4544
5192
|
};
|
|
4545
5193
|
export interface DynamicDispatchLimits {
|
|
4546
5194
|
/**
|