@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/experimental/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,10 +254,13 @@ 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
|
ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
|
|
250
260
|
ReadableStreamDefaultController: typeof ReadableStreamDefaultController;
|
|
251
261
|
ReadableByteStreamController: typeof ReadableByteStreamController;
|
|
252
262
|
WritableStreamDefaultController: typeof WritableStreamDefaultController;
|
|
263
|
+
TransformStreamDefaultController: typeof TransformStreamDefaultController;
|
|
253
264
|
CompressionStream: typeof CompressionStream;
|
|
254
265
|
DecompressionStream: typeof DecompressionStream;
|
|
255
266
|
TextEncoderStream: typeof TextEncoderStream;
|
|
@@ -281,16 +292,16 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
281
292
|
FixedLengthStream: typeof FixedLengthStream;
|
|
282
293
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
283
294
|
HTMLRewriter: typeof HTMLRewriter;
|
|
284
|
-
GPUAdapter: typeof
|
|
285
|
-
GPUOutOfMemoryError: typeof
|
|
286
|
-
GPUValidationError: typeof
|
|
287
|
-
GPUInternalError: typeof
|
|
288
|
-
GPUDeviceLostInfo: typeof
|
|
289
|
-
GPUBufferUsage: typeof
|
|
290
|
-
GPUShaderStage: typeof
|
|
291
|
-
GPUMapMode: typeof
|
|
292
|
-
GPUTextureUsage: typeof
|
|
293
|
-
GPUColorWrite: typeof
|
|
295
|
+
GPUAdapter: typeof GPUAdapter;
|
|
296
|
+
GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
|
|
297
|
+
GPUValidationError: typeof GPUValidationError;
|
|
298
|
+
GPUInternalError: typeof GPUInternalError;
|
|
299
|
+
GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
|
|
300
|
+
GPUBufferUsage: typeof GPUBufferUsage;
|
|
301
|
+
GPUShaderStage: typeof GPUShaderStage;
|
|
302
|
+
GPUMapMode: typeof GPUMapMode;
|
|
303
|
+
GPUTextureUsage: typeof GPUTextureUsage;
|
|
304
|
+
GPUColorWrite: typeof GPUColorWrite;
|
|
294
305
|
}
|
|
295
306
|
export declare function addEventListener<
|
|
296
307
|
Type extends keyof WorkerGlobalScopeEventMap,
|
|
@@ -314,52 +325,73 @@ export declare function removeEventListener<
|
|
|
314
325
|
export declare function dispatchEvent(
|
|
315
326
|
event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
|
|
316
327
|
): boolean;
|
|
317
|
-
|
|
328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
|
|
318
329
|
export declare function btoa(data: string): string;
|
|
319
|
-
|
|
330
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
|
|
320
331
|
export declare function atob(data: string): string;
|
|
321
|
-
|
|
332
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
322
333
|
export declare function setTimeout(
|
|
323
334
|
callback: (...args: any[]) => void,
|
|
324
335
|
msDelay?: number,
|
|
325
336
|
): number;
|
|
326
|
-
|
|
337
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
|
|
327
338
|
export declare function setTimeout<Args extends any[]>(
|
|
328
339
|
callback: (...args: Args) => void,
|
|
329
340
|
msDelay?: number,
|
|
330
341
|
...args: Args
|
|
331
342
|
): number;
|
|
332
|
-
|
|
343
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
|
|
333
344
|
export declare function clearTimeout(timeoutId: number | null): void;
|
|
334
|
-
|
|
345
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
335
346
|
export declare function setInterval(
|
|
336
347
|
callback: (...args: any[]) => void,
|
|
337
348
|
msDelay?: number,
|
|
338
349
|
): number;
|
|
339
|
-
|
|
350
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
|
|
340
351
|
export declare function setInterval<Args extends any[]>(
|
|
341
352
|
callback: (...args: Args) => void,
|
|
342
353
|
msDelay?: number,
|
|
343
354
|
...args: Args
|
|
344
355
|
): number;
|
|
345
|
-
|
|
356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
|
|
346
357
|
export declare function clearInterval(timeoutId: number | null): void;
|
|
347
|
-
|
|
358
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
|
|
348
359
|
export declare function queueMicrotask(task: Function): void;
|
|
349
|
-
|
|
360
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
|
|
350
361
|
export declare function structuredClone<T>(
|
|
351
362
|
value: T,
|
|
352
363
|
options?: StructuredSerializeOptions,
|
|
353
364
|
): T;
|
|
354
|
-
|
|
365
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
|
|
366
|
+
export declare function reportError(error: any): void;
|
|
367
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
|
|
355
368
|
export declare function fetch(
|
|
356
369
|
input: RequestInfo,
|
|
357
370
|
init?: RequestInit<RequestInitCfProperties>,
|
|
358
371
|
): Promise<Response>;
|
|
359
372
|
export declare const self: ServiceWorkerGlobalScope;
|
|
373
|
+
/**
|
|
374
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
375
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
376
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
377
|
+
* compared to those implemented in most browsers.
|
|
378
|
+
*
|
|
379
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
380
|
+
*/
|
|
360
381
|
export declare const crypto: Crypto;
|
|
382
|
+
/**
|
|
383
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
384
|
+
*
|
|
385
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
386
|
+
*/
|
|
361
387
|
export declare const caches: CacheStorage;
|
|
362
388
|
export declare const scheduler: Scheduler;
|
|
389
|
+
/**
|
|
390
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
391
|
+
* as well as timing of subrequests and other operations.
|
|
392
|
+
*
|
|
393
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
394
|
+
*/
|
|
363
395
|
export declare const performance: Performance;
|
|
364
396
|
export declare const origin: string;
|
|
365
397
|
export declare const navigator: Navigator;
|
|
@@ -418,10 +450,11 @@ export interface ExportedHandler<
|
|
|
418
450
|
export interface StructuredSerializeOptions {
|
|
419
451
|
transfer?: any[];
|
|
420
452
|
}
|
|
453
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
|
|
421
454
|
export declare abstract class PromiseRejectionEvent extends Event {
|
|
422
|
-
|
|
455
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
|
|
423
456
|
readonly promise: Promise<any>;
|
|
424
|
-
|
|
457
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
|
|
425
458
|
readonly reason: any;
|
|
426
459
|
}
|
|
427
460
|
export declare abstract class Navigator {
|
|
@@ -436,17 +469,18 @@ export declare abstract class Navigator {
|
|
|
436
469
|
| FormData,
|
|
437
470
|
): boolean;
|
|
438
471
|
readonly userAgent: string;
|
|
439
|
-
readonly gpu:
|
|
472
|
+
readonly gpu: GPU;
|
|
440
473
|
}
|
|
441
474
|
/**
|
|
442
|
-
*
|
|
475
|
+
* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
|
|
476
|
+
* as well as timing of subrequests and other operations.
|
|
443
477
|
*
|
|
444
|
-
* [
|
|
478
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
|
|
445
479
|
*/
|
|
446
480
|
export interface Performance {
|
|
447
|
-
|
|
481
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
|
|
448
482
|
readonly timeOrigin: number;
|
|
449
|
-
|
|
483
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
450
484
|
now(): number;
|
|
451
485
|
}
|
|
452
486
|
export interface AlarmInvocationInfo {
|
|
@@ -644,6 +678,11 @@ export interface AnalyticsEngineDataPoint {
|
|
|
644
678
|
doubles?: number[];
|
|
645
679
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
646
680
|
}
|
|
681
|
+
/**
|
|
682
|
+
* An event which takes place in the DOM.
|
|
683
|
+
*
|
|
684
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
|
|
685
|
+
*/
|
|
647
686
|
export declare class Event {
|
|
648
687
|
constructor(type: string, init?: EventInit);
|
|
649
688
|
/**
|
|
@@ -767,6 +806,11 @@ export interface EventListenerObject<EventType extends Event = Event> {
|
|
|
767
806
|
export type EventListenerOrEventListenerObject<
|
|
768
807
|
EventType extends Event = Event,
|
|
769
808
|
> = EventListener<EventType> | EventListenerObject<EventType>;
|
|
809
|
+
/**
|
|
810
|
+
* EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
|
|
811
|
+
*
|
|
812
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
|
|
813
|
+
*/
|
|
770
814
|
export declare class EventTarget<
|
|
771
815
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
772
816
|
> {
|
|
@@ -822,6 +866,11 @@ export interface EventTargetAddEventListenerOptions {
|
|
|
822
866
|
export interface EventTargetHandlerObject {
|
|
823
867
|
handleEvent: (event: Event) => any | undefined;
|
|
824
868
|
}
|
|
869
|
+
/**
|
|
870
|
+
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
871
|
+
*
|
|
872
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
|
|
873
|
+
*/
|
|
825
874
|
export declare class AbortController {
|
|
826
875
|
constructor();
|
|
827
876
|
/**
|
|
@@ -837,11 +886,17 @@ export declare class AbortController {
|
|
|
837
886
|
*/
|
|
838
887
|
abort(reason?: any): void;
|
|
839
888
|
}
|
|
889
|
+
/**
|
|
890
|
+
* 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.
|
|
891
|
+
*
|
|
892
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
|
|
893
|
+
*/
|
|
840
894
|
export declare abstract class AbortSignal extends EventTarget {
|
|
841
|
-
|
|
895
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
|
|
842
896
|
static abort(reason?: any): AbortSignal;
|
|
843
|
-
|
|
897
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
|
|
844
898
|
static timeout(delay: number): AbortSignal;
|
|
899
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
|
|
845
900
|
static any(signals: AbortSignal[]): AbortSignal;
|
|
846
901
|
/**
|
|
847
902
|
* Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
|
|
@@ -849,13 +904,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
849
904
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
850
905
|
*/
|
|
851
906
|
get aborted(): boolean;
|
|
852
|
-
|
|
907
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
|
|
853
908
|
get reason(): any;
|
|
854
|
-
|
|
909
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
855
910
|
get onabort(): any | null;
|
|
856
|
-
|
|
911
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
857
912
|
set onabort(value: any | null);
|
|
858
|
-
|
|
913
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
859
914
|
throwIfAborted(): void;
|
|
860
915
|
}
|
|
861
916
|
export interface Scheduler {
|
|
@@ -864,10 +919,16 @@ export interface Scheduler {
|
|
|
864
919
|
export interface SchedulerWaitOptions {
|
|
865
920
|
signal?: AbortSignal;
|
|
866
921
|
}
|
|
922
|
+
/**
|
|
923
|
+
* 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.
|
|
924
|
+
*
|
|
925
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
|
|
926
|
+
*/
|
|
867
927
|
export declare abstract class ExtendableEvent extends Event {
|
|
868
|
-
|
|
928
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
|
|
869
929
|
waitUntil(promise: Promise<any>): void;
|
|
870
930
|
}
|
|
931
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
|
|
871
932
|
export declare class CustomEvent<T = any> extends Event {
|
|
872
933
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
873
934
|
/**
|
|
@@ -883,58 +944,90 @@ export interface CustomEventCustomEventInit {
|
|
|
883
944
|
composed?: boolean;
|
|
884
945
|
detail?: any;
|
|
885
946
|
}
|
|
947
|
+
/**
|
|
948
|
+
* 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.
|
|
949
|
+
*
|
|
950
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
|
|
951
|
+
*/
|
|
886
952
|
export declare class Blob {
|
|
887
953
|
constructor(
|
|
888
|
-
|
|
954
|
+
type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
|
|
889
955
|
options?: BlobOptions,
|
|
890
956
|
);
|
|
891
|
-
|
|
957
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
|
|
892
958
|
get size(): number;
|
|
893
|
-
|
|
959
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
|
|
894
960
|
get type(): string;
|
|
895
|
-
|
|
961
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
|
|
896
962
|
slice(start?: number, end?: number, type?: string): Blob;
|
|
897
|
-
|
|
963
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
|
|
898
964
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
899
|
-
|
|
965
|
+
bytes(): Promise<Uint8Array>;
|
|
966
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
|
|
900
967
|
text(): Promise<string>;
|
|
901
|
-
|
|
968
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
902
969
|
stream(): ReadableStream;
|
|
903
970
|
}
|
|
904
971
|
export interface BlobOptions {
|
|
905
972
|
type?: string;
|
|
906
973
|
}
|
|
974
|
+
/**
|
|
975
|
+
* Provides information about files and allows JavaScript in a web page to access their content.
|
|
976
|
+
*
|
|
977
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
|
|
978
|
+
*/
|
|
907
979
|
export declare class File extends Blob {
|
|
908
980
|
constructor(
|
|
909
981
|
bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
|
|
910
982
|
name: string,
|
|
911
983
|
options?: FileOptions,
|
|
912
984
|
);
|
|
913
|
-
|
|
985
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
|
|
914
986
|
get name(): string;
|
|
915
|
-
|
|
987
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
916
988
|
get lastModified(): number;
|
|
917
989
|
}
|
|
918
990
|
export interface FileOptions {
|
|
919
991
|
type?: string;
|
|
920
992
|
lastModified?: number;
|
|
921
993
|
}
|
|
994
|
+
/**
|
|
995
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
996
|
+
*
|
|
997
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
998
|
+
*/
|
|
922
999
|
export declare abstract class CacheStorage {
|
|
923
|
-
|
|
1000
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
|
|
924
1001
|
open(cacheName: string): Promise<Cache>;
|
|
925
1002
|
readonly default: Cache;
|
|
926
1003
|
}
|
|
1004
|
+
/**
|
|
1005
|
+
* The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
|
|
1006
|
+
*
|
|
1007
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
|
|
1008
|
+
*/
|
|
927
1009
|
export declare abstract class Cache {
|
|
1010
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
|
|
928
1011
|
delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
|
|
1012
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
|
|
929
1013
|
match(
|
|
930
1014
|
request: RequestInfo,
|
|
931
1015
|
options?: CacheQueryOptions,
|
|
932
1016
|
): Promise<Response | undefined>;
|
|
1017
|
+
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
|
|
933
1018
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
934
1019
|
}
|
|
935
1020
|
export interface CacheQueryOptions {
|
|
936
1021
|
ignoreMethod?: boolean;
|
|
937
1022
|
}
|
|
1023
|
+
/**
|
|
1024
|
+
* The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
|
|
1025
|
+
* The Workers runtime implements the full surface of this API, but with some differences in
|
|
1026
|
+
* the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
|
|
1027
|
+
* compared to those implemented in most browsers.
|
|
1028
|
+
*
|
|
1029
|
+
* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
1030
|
+
*/
|
|
938
1031
|
export declare abstract class Crypto {
|
|
939
1032
|
/**
|
|
940
1033
|
* Available only in secure contexts.
|
|
@@ -942,7 +1035,7 @@ export declare abstract class Crypto {
|
|
|
942
1035
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
943
1036
|
*/
|
|
944
1037
|
get subtle(): SubtleCrypto;
|
|
945
|
-
|
|
1038
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
|
|
946
1039
|
getRandomValues<
|
|
947
1040
|
T extends
|
|
948
1041
|
| Int8Array
|
|
@@ -962,39 +1055,50 @@ export declare abstract class Crypto {
|
|
|
962
1055
|
randomUUID(): string;
|
|
963
1056
|
DigestStream: typeof DigestStream;
|
|
964
1057
|
}
|
|
1058
|
+
/**
|
|
1059
|
+
* 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).
|
|
1060
|
+
* Available only in secure contexts.
|
|
1061
|
+
*
|
|
1062
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
|
|
1063
|
+
*/
|
|
965
1064
|
export declare abstract class SubtleCrypto {
|
|
1065
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
|
|
966
1066
|
encrypt(
|
|
967
1067
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
968
1068
|
key: CryptoKey,
|
|
969
1069
|
plainText: ArrayBuffer | ArrayBufferView,
|
|
970
1070
|
): Promise<ArrayBuffer>;
|
|
1071
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
|
|
971
1072
|
decrypt(
|
|
972
1073
|
algorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
973
1074
|
key: CryptoKey,
|
|
974
1075
|
cipherText: ArrayBuffer | ArrayBufferView,
|
|
975
1076
|
): Promise<ArrayBuffer>;
|
|
1077
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
|
|
976
1078
|
sign(
|
|
977
1079
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
978
1080
|
key: CryptoKey,
|
|
979
1081
|
data: ArrayBuffer | ArrayBufferView,
|
|
980
1082
|
): Promise<ArrayBuffer>;
|
|
1083
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
|
|
981
1084
|
verify(
|
|
982
1085
|
algorithm: string | SubtleCryptoSignAlgorithm,
|
|
983
1086
|
key: CryptoKey,
|
|
984
1087
|
signature: ArrayBuffer | ArrayBufferView,
|
|
985
1088
|
data: ArrayBuffer | ArrayBufferView,
|
|
986
1089
|
): Promise<boolean>;
|
|
1090
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
|
|
987
1091
|
digest(
|
|
988
1092
|
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
989
1093
|
data: ArrayBuffer | ArrayBufferView,
|
|
990
1094
|
): Promise<ArrayBuffer>;
|
|
991
|
-
|
|
1095
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
|
|
992
1096
|
generateKey(
|
|
993
1097
|
algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
|
|
994
1098
|
extractable: boolean,
|
|
995
1099
|
keyUsages: string[],
|
|
996
1100
|
): Promise<CryptoKey | CryptoKeyPair>;
|
|
997
|
-
|
|
1101
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
|
|
998
1102
|
deriveKey(
|
|
999
1103
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1000
1104
|
baseKey: CryptoKey,
|
|
@@ -1002,12 +1106,13 @@ export declare abstract class SubtleCrypto {
|
|
|
1002
1106
|
extractable: boolean,
|
|
1003
1107
|
keyUsages: string[],
|
|
1004
1108
|
): Promise<CryptoKey>;
|
|
1109
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
|
|
1005
1110
|
deriveBits(
|
|
1006
1111
|
algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
|
|
1007
1112
|
baseKey: CryptoKey,
|
|
1008
|
-
length
|
|
1113
|
+
length?: number | null,
|
|
1009
1114
|
): Promise<ArrayBuffer>;
|
|
1010
|
-
|
|
1115
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
|
|
1011
1116
|
importKey(
|
|
1012
1117
|
format: string,
|
|
1013
1118
|
keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
|
|
@@ -1015,14 +1120,16 @@ export declare abstract class SubtleCrypto {
|
|
|
1015
1120
|
extractable: boolean,
|
|
1016
1121
|
keyUsages: string[],
|
|
1017
1122
|
): Promise<CryptoKey>;
|
|
1123
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
|
|
1018
1124
|
exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
1125
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
|
|
1019
1126
|
wrapKey(
|
|
1020
1127
|
format: string,
|
|
1021
1128
|
key: CryptoKey,
|
|
1022
1129
|
wrappingKey: CryptoKey,
|
|
1023
1130
|
wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
|
|
1024
1131
|
): Promise<ArrayBuffer>;
|
|
1025
|
-
|
|
1132
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
|
|
1026
1133
|
unwrapKey(
|
|
1027
1134
|
format: string,
|
|
1028
1135
|
wrappedKey: ArrayBuffer | ArrayBufferView,
|
|
@@ -1037,12 +1144,18 @@ export declare abstract class SubtleCrypto {
|
|
|
1037
1144
|
b: ArrayBuffer | ArrayBufferView,
|
|
1038
1145
|
): boolean;
|
|
1039
1146
|
}
|
|
1147
|
+
/**
|
|
1148
|
+
* The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
|
|
1149
|
+
* Available only in secure contexts.
|
|
1150
|
+
*
|
|
1151
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
|
|
1152
|
+
*/
|
|
1040
1153
|
export declare abstract class CryptoKey {
|
|
1041
|
-
|
|
1154
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
|
|
1042
1155
|
readonly type: string;
|
|
1043
|
-
|
|
1156
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
|
|
1044
1157
|
readonly extractable: boolean;
|
|
1045
|
-
|
|
1158
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
|
|
1046
1159
|
readonly algorithm:
|
|
1047
1160
|
| CryptoKeyKeyAlgorithm
|
|
1048
1161
|
| CryptoKeyAesKeyAlgorithm
|
|
@@ -1050,7 +1163,7 @@ export declare abstract class CryptoKey {
|
|
|
1050
1163
|
| CryptoKeyRsaKeyAlgorithm
|
|
1051
1164
|
| CryptoKeyEllipticKeyAlgorithm
|
|
1052
1165
|
| CryptoKeyArbitraryKeyAlgorithm;
|
|
1053
|
-
|
|
1166
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1054
1167
|
readonly usages: string[];
|
|
1055
1168
|
}
|
|
1056
1169
|
export interface CryptoKeyPair {
|
|
@@ -1156,7 +1269,13 @@ export declare class DigestStream extends WritableStream<
|
|
|
1156
1269
|
> {
|
|
1157
1270
|
constructor(algorithm: string | SubtleCryptoHashAlgorithm);
|
|
1158
1271
|
get digest(): Promise<ArrayBuffer>;
|
|
1272
|
+
get bytesWritten(): number | bigint;
|
|
1159
1273
|
}
|
|
1274
|
+
/**
|
|
1275
|
+
* 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.
|
|
1276
|
+
*
|
|
1277
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
|
|
1278
|
+
*/
|
|
1160
1279
|
export declare class TextDecoder {
|
|
1161
1280
|
constructor(decoder?: string, options?: TextDecoderConstructorOptions);
|
|
1162
1281
|
/**
|
|
@@ -1182,6 +1301,11 @@ export declare class TextDecoder {
|
|
|
1182
1301
|
get fatal(): boolean;
|
|
1183
1302
|
get ignoreBOM(): boolean;
|
|
1184
1303
|
}
|
|
1304
|
+
/**
|
|
1305
|
+
* 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.
|
|
1306
|
+
*
|
|
1307
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
|
|
1308
|
+
*/
|
|
1185
1309
|
export declare class TextEncoder {
|
|
1186
1310
|
constructor();
|
|
1187
1311
|
/**
|
|
@@ -1212,21 +1336,59 @@ export interface TextEncoderEncodeIntoResult {
|
|
|
1212
1336
|
read: number;
|
|
1213
1337
|
written: number;
|
|
1214
1338
|
}
|
|
1339
|
+
/**
|
|
1340
|
+
* Events providing information related to errors in scripts or in files.
|
|
1341
|
+
*
|
|
1342
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
1343
|
+
*/
|
|
1344
|
+
export declare class ErrorEvent extends Event {
|
|
1345
|
+
constructor(type: string, init?: ErrorEventErrorEventInit);
|
|
1346
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
1347
|
+
get filename(): string;
|
|
1348
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
1349
|
+
get message(): string;
|
|
1350
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
1351
|
+
get lineno(): number;
|
|
1352
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
1353
|
+
get colno(): number;
|
|
1354
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1355
|
+
get error(): any;
|
|
1356
|
+
}
|
|
1357
|
+
export interface ErrorEventErrorEventInit {
|
|
1358
|
+
message?: string;
|
|
1359
|
+
filename?: string;
|
|
1360
|
+
lineno?: number;
|
|
1361
|
+
colno?: number;
|
|
1362
|
+
error?: any;
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* 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".
|
|
1366
|
+
*
|
|
1367
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
|
|
1368
|
+
*/
|
|
1215
1369
|
export declare class FormData {
|
|
1216
1370
|
constructor();
|
|
1371
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1217
1372
|
append(name: string, value: string): void;
|
|
1373
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
|
|
1218
1374
|
append(name: string, value: Blob, filename?: string): void;
|
|
1375
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
|
|
1219
1376
|
delete(name: string): void;
|
|
1377
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
|
|
1220
1378
|
get(name: string): (File | string) | null;
|
|
1379
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
|
|
1221
1380
|
getAll(name: string): (File | string)[];
|
|
1381
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
|
|
1222
1382
|
has(name: string): boolean;
|
|
1383
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1223
1384
|
set(name: string, value: string): void;
|
|
1385
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
|
|
1224
1386
|
set(name: string, value: Blob, filename?: string): void;
|
|
1225
|
-
|
|
1387
|
+
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1226
1388
|
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1227
|
-
|
|
1389
|
+
/* Returns a list of keys in the list. */
|
|
1228
1390
|
keys(): IterableIterator<string>;
|
|
1229
|
-
|
|
1391
|
+
/* Returns a list of values in the list. */
|
|
1230
1392
|
values(): IterableIterator<File | string>;
|
|
1231
1393
|
forEach<This = unknown>(
|
|
1232
1394
|
callback: (
|
|
@@ -1312,10 +1474,15 @@ export interface Text {
|
|
|
1312
1474
|
export interface DocumentEnd {
|
|
1313
1475
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1314
1476
|
}
|
|
1477
|
+
/**
|
|
1478
|
+
* 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.
|
|
1479
|
+
*
|
|
1480
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
|
|
1481
|
+
*/
|
|
1315
1482
|
export declare abstract class FetchEvent extends ExtendableEvent {
|
|
1316
|
-
|
|
1483
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
|
|
1317
1484
|
readonly request: Request;
|
|
1318
|
-
|
|
1485
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
|
|
1319
1486
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1320
1487
|
passThroughOnException(): void;
|
|
1321
1488
|
}
|
|
@@ -1323,24 +1490,35 @@ export type HeadersInit =
|
|
|
1323
1490
|
| Headers
|
|
1324
1491
|
| Iterable<Iterable<string>>
|
|
1325
1492
|
| Record<string, string>;
|
|
1493
|
+
/**
|
|
1494
|
+
* 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.
|
|
1495
|
+
*
|
|
1496
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
|
|
1497
|
+
*/
|
|
1326
1498
|
export declare class Headers {
|
|
1327
1499
|
constructor(init?: HeadersInit);
|
|
1500
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
|
|
1328
1501
|
get(name: string): string | null;
|
|
1329
1502
|
getAll(name: string): string[];
|
|
1503
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */
|
|
1330
1504
|
getSetCookie(): string[];
|
|
1505
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
|
|
1331
1506
|
has(name: string): boolean;
|
|
1507
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
|
|
1332
1508
|
set(name: string, value: string): void;
|
|
1509
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
|
|
1333
1510
|
append(name: string, value: string): void;
|
|
1511
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
|
|
1334
1512
|
delete(name: string): void;
|
|
1335
1513
|
forEach<This = unknown>(
|
|
1336
1514
|
callback: (this: This, value: string, key: string, parent: Headers) => void,
|
|
1337
1515
|
thisArg?: This,
|
|
1338
1516
|
): void;
|
|
1339
|
-
|
|
1517
|
+
/* Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
1340
1518
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1341
|
-
|
|
1519
|
+
/* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
1342
1520
|
keys(): IterableIterator<string>;
|
|
1343
|
-
|
|
1521
|
+
/* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
1344
1522
|
values(): IterableIterator<string>;
|
|
1345
1523
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1346
1524
|
}
|
|
@@ -1353,33 +1531,46 @@ export type BodyInit =
|
|
|
1353
1531
|
| URLSearchParams
|
|
1354
1532
|
| FormData;
|
|
1355
1533
|
export declare abstract class Body {
|
|
1534
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1356
1535
|
get body(): ReadableStream | null;
|
|
1536
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1357
1537
|
get bodyUsed(): boolean;
|
|
1538
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1358
1539
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1540
|
+
bytes(): Promise<Uint8Array>;
|
|
1541
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
|
|
1359
1542
|
text(): Promise<string>;
|
|
1543
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
|
|
1360
1544
|
json<T>(): Promise<T>;
|
|
1545
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
|
|
1361
1546
|
formData(): Promise<FormData>;
|
|
1547
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
|
|
1362
1548
|
blob(): Promise<Blob>;
|
|
1363
1549
|
}
|
|
1550
|
+
/**
|
|
1551
|
+
* This Fetch API interface represents the response to a request.
|
|
1552
|
+
*
|
|
1553
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
|
|
1554
|
+
*/
|
|
1364
1555
|
export declare class Response extends Body {
|
|
1365
1556
|
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
1366
|
-
|
|
1557
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
|
|
1367
1558
|
static redirect(url: string, status?: number): Response;
|
|
1368
|
-
|
|
1559
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
|
|
1369
1560
|
static json(any: any, maybeInit?: ResponseInit | Response): Response;
|
|
1370
|
-
|
|
1561
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
|
|
1371
1562
|
clone(): Response;
|
|
1372
|
-
|
|
1563
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
|
|
1373
1564
|
get status(): number;
|
|
1374
|
-
|
|
1565
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
|
|
1375
1566
|
get statusText(): string;
|
|
1376
|
-
|
|
1567
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
|
|
1377
1568
|
get headers(): Headers;
|
|
1378
|
-
|
|
1569
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
|
|
1379
1570
|
get ok(): boolean;
|
|
1380
|
-
|
|
1571
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
|
|
1381
1572
|
get redirected(): boolean;
|
|
1382
|
-
|
|
1573
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
|
|
1383
1574
|
get url(): string;
|
|
1384
1575
|
get webSocket(): WebSocket | null;
|
|
1385
1576
|
get cf(): any | undefined;
|
|
@@ -1396,12 +1587,17 @@ export type RequestInfo<
|
|
|
1396
1587
|
CfHostMetadata = unknown,
|
|
1397
1588
|
Cf = CfProperties<CfHostMetadata>,
|
|
1398
1589
|
> = Request<CfHostMetadata, Cf> | string | URL;
|
|
1590
|
+
/**
|
|
1591
|
+
* This Fetch API interface represents a resource request.
|
|
1592
|
+
*
|
|
1593
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
|
|
1594
|
+
*/
|
|
1399
1595
|
export declare class Request<
|
|
1400
1596
|
CfHostMetadata = unknown,
|
|
1401
1597
|
Cf = CfProperties<CfHostMetadata>,
|
|
1402
1598
|
> extends Body {
|
|
1403
1599
|
constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
|
|
1404
|
-
|
|
1600
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
|
|
1405
1601
|
clone(): Request<CfHostMetadata, Cf>;
|
|
1406
1602
|
/**
|
|
1407
1603
|
* Returns request's HTTP method, which is "GET" by default.
|
|
@@ -1449,19 +1645,19 @@ export declare class Request<
|
|
|
1449
1645
|
get keepalive(): boolean;
|
|
1450
1646
|
}
|
|
1451
1647
|
export interface RequestInit<Cf = CfProperties> {
|
|
1452
|
-
|
|
1648
|
+
/* A string to set request's method. */
|
|
1453
1649
|
method?: string;
|
|
1454
|
-
|
|
1650
|
+
/* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
1455
1651
|
headers?: HeadersInit;
|
|
1456
|
-
|
|
1652
|
+
/* A BodyInit object or null to set request's body. */
|
|
1457
1653
|
body?: BodyInit | null;
|
|
1458
|
-
|
|
1654
|
+
/* 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. */
|
|
1459
1655
|
redirect?: string;
|
|
1460
1656
|
fetcher?: Fetcher | null;
|
|
1461
1657
|
cf?: Cf;
|
|
1462
|
-
|
|
1658
|
+
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
1463
1659
|
integrity?: string;
|
|
1464
|
-
|
|
1660
|
+
/* An AbortSignal to set request's signal. */
|
|
1465
1661
|
signal?: AbortSignal | null;
|
|
1466
1662
|
}
|
|
1467
1663
|
export type Service<
|
|
@@ -1936,31 +2132,36 @@ export type ReadableStreamReadResult<R = any> =
|
|
|
1936
2132
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1937
2133
|
*/
|
|
1938
2134
|
export interface ReadableStream<R = any> {
|
|
1939
|
-
|
|
2135
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1940
2136
|
get locked(): boolean;
|
|
1941
|
-
|
|
2137
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
1942
2138
|
cancel(reason?: any): Promise<void>;
|
|
1943
|
-
|
|
2139
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1944
2140
|
getReader(): ReadableStreamDefaultReader<R>;
|
|
1945
|
-
|
|
2141
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
|
|
1946
2142
|
getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
|
|
1947
|
-
|
|
2143
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
|
|
1948
2144
|
pipeThrough<T>(
|
|
1949
2145
|
transform: ReadableWritablePair<T, R>,
|
|
1950
2146
|
options?: StreamPipeOptions,
|
|
1951
2147
|
): ReadableStream<T>;
|
|
1952
|
-
|
|
2148
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
|
|
1953
2149
|
pipeTo(
|
|
1954
2150
|
destination: WritableStream<R>,
|
|
1955
2151
|
options?: StreamPipeOptions,
|
|
1956
2152
|
): Promise<void>;
|
|
1957
|
-
|
|
2153
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
|
|
1958
2154
|
tee(): [ReadableStream<R>, ReadableStream<R>];
|
|
1959
2155
|
values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
|
|
1960
2156
|
[Symbol.asyncIterator](
|
|
1961
2157
|
options?: ReadableStreamValuesOptions,
|
|
1962
2158
|
): AsyncIterableIterator<R>;
|
|
1963
2159
|
}
|
|
2160
|
+
/**
|
|
2161
|
+
* 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.
|
|
2162
|
+
*
|
|
2163
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
2164
|
+
*/
|
|
1964
2165
|
export declare const ReadableStream: {
|
|
1965
2166
|
prototype: ReadableStream;
|
|
1966
2167
|
new (
|
|
@@ -1972,24 +2173,26 @@ export declare const ReadableStream: {
|
|
|
1972
2173
|
strategy?: QueuingStrategy<R>,
|
|
1973
2174
|
): ReadableStream<R>;
|
|
1974
2175
|
};
|
|
2176
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
|
|
1975
2177
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
1976
2178
|
constructor(stream: ReadableStream);
|
|
1977
2179
|
get closed(): Promise<void>;
|
|
1978
2180
|
cancel(reason?: any): Promise<void>;
|
|
1979
|
-
|
|
2181
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
|
|
1980
2182
|
read(): Promise<ReadableStreamReadResult<R>>;
|
|
1981
|
-
|
|
2183
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
|
|
1982
2184
|
releaseLock(): void;
|
|
1983
2185
|
}
|
|
2186
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
|
|
1984
2187
|
export declare class ReadableStreamBYOBReader {
|
|
1985
2188
|
constructor(stream: ReadableStream);
|
|
1986
2189
|
get closed(): Promise<void>;
|
|
1987
2190
|
cancel(reason?: any): Promise<void>;
|
|
1988
|
-
|
|
2191
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
|
|
1989
2192
|
read<T extends ArrayBufferView>(
|
|
1990
2193
|
view: T,
|
|
1991
2194
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1992
|
-
|
|
2195
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
|
|
1993
2196
|
releaseLock(): void;
|
|
1994
2197
|
readAtLeast<T extends ArrayBufferView>(
|
|
1995
2198
|
minElements: number,
|
|
@@ -2007,52 +2210,60 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
2007
2210
|
*/
|
|
2008
2211
|
mode: "byob";
|
|
2009
2212
|
}
|
|
2213
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
2010
2214
|
export declare abstract class ReadableStreamBYOBRequest {
|
|
2011
|
-
|
|
2215
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
2012
2216
|
get view(): Uint8Array | null;
|
|
2013
|
-
|
|
2217
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
2014
2218
|
respond(bytesWritten: number): void;
|
|
2015
|
-
|
|
2219
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
|
|
2016
2220
|
respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
|
|
2017
2221
|
get atLeast(): number | null;
|
|
2018
2222
|
}
|
|
2223
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
2019
2224
|
export declare abstract class ReadableStreamDefaultController<R = any> {
|
|
2020
|
-
|
|
2225
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
2021
2226
|
get desiredSize(): number | null;
|
|
2022
|
-
|
|
2227
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
2023
2228
|
close(): void;
|
|
2024
|
-
|
|
2229
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
|
|
2025
2230
|
enqueue(chunk?: R): void;
|
|
2026
|
-
|
|
2231
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
|
|
2027
2232
|
error(reason: any): void;
|
|
2028
2233
|
}
|
|
2234
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
2029
2235
|
export declare abstract class ReadableByteStreamController {
|
|
2030
|
-
|
|
2236
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
2031
2237
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
2032
|
-
|
|
2238
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
2033
2239
|
get desiredSize(): number | null;
|
|
2034
|
-
|
|
2240
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
|
|
2035
2241
|
close(): void;
|
|
2036
|
-
|
|
2242
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
|
|
2037
2243
|
enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
|
|
2038
|
-
|
|
2244
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
|
|
2039
2245
|
error(reason: any): void;
|
|
2040
2246
|
}
|
|
2247
|
+
/**
|
|
2248
|
+
* This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
|
|
2249
|
+
*
|
|
2250
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2251
|
+
*/
|
|
2041
2252
|
export declare abstract class WritableStreamDefaultController {
|
|
2042
|
-
|
|
2253
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
2043
2254
|
get signal(): AbortSignal;
|
|
2044
|
-
|
|
2255
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2045
2256
|
error(reason?: any): void;
|
|
2046
2257
|
}
|
|
2047
|
-
|
|
2048
|
-
export
|
|
2049
|
-
|
|
2258
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2259
|
+
export declare abstract class TransformStreamDefaultController<O = any> {
|
|
2260
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2050
2261
|
get desiredSize(): number | null;
|
|
2051
|
-
|
|
2262
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
2052
2263
|
enqueue(chunk?: O): void;
|
|
2053
|
-
|
|
2264
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
|
|
2054
2265
|
error(reason: any): void;
|
|
2055
|
-
|
|
2266
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2056
2267
|
terminate(): void;
|
|
2057
2268
|
}
|
|
2058
2269
|
export interface ReadableWritablePair<R = any, W = any> {
|
|
@@ -2064,46 +2275,57 @@ export interface ReadableWritablePair<R = any, W = any> {
|
|
|
2064
2275
|
writable: WritableStream<W>;
|
|
2065
2276
|
readable: ReadableStream<R>;
|
|
2066
2277
|
}
|
|
2278
|
+
/**
|
|
2279
|
+
* 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.
|
|
2280
|
+
*
|
|
2281
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
|
|
2282
|
+
*/
|
|
2067
2283
|
export declare class WritableStream<W = any> {
|
|
2068
2284
|
constructor(
|
|
2069
2285
|
underlyingSink?: UnderlyingSink,
|
|
2070
2286
|
queuingStrategy?: QueuingStrategy,
|
|
2071
2287
|
);
|
|
2072
|
-
|
|
2288
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
|
|
2073
2289
|
get locked(): boolean;
|
|
2074
|
-
|
|
2290
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
|
|
2075
2291
|
abort(reason?: any): Promise<void>;
|
|
2076
|
-
|
|
2292
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
|
|
2077
2293
|
close(): Promise<void>;
|
|
2078
|
-
|
|
2294
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
|
|
2079
2295
|
getWriter(): WritableStreamDefaultWriter<W>;
|
|
2080
2296
|
}
|
|
2297
|
+
/**
|
|
2298
|
+
* 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.
|
|
2299
|
+
*
|
|
2300
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
|
|
2301
|
+
*/
|
|
2081
2302
|
export declare class WritableStreamDefaultWriter<W = any> {
|
|
2082
2303
|
constructor(stream: WritableStream);
|
|
2083
|
-
|
|
2304
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
|
|
2084
2305
|
get closed(): Promise<void>;
|
|
2085
|
-
|
|
2306
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
|
|
2086
2307
|
get ready(): Promise<void>;
|
|
2087
|
-
|
|
2308
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
|
|
2088
2309
|
get desiredSize(): number | null;
|
|
2089
|
-
|
|
2310
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
|
|
2090
2311
|
abort(reason?: any): Promise<void>;
|
|
2091
|
-
|
|
2312
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
|
|
2092
2313
|
close(): Promise<void>;
|
|
2093
|
-
|
|
2314
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
|
|
2094
2315
|
write(chunk?: W): Promise<void>;
|
|
2095
|
-
|
|
2316
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
|
|
2096
2317
|
releaseLock(): void;
|
|
2097
2318
|
}
|
|
2319
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
|
|
2098
2320
|
export declare class TransformStream<I = any, O = any> {
|
|
2099
2321
|
constructor(
|
|
2100
2322
|
transformer?: Transformer<I, O>,
|
|
2101
2323
|
writableStrategy?: QueuingStrategy<I>,
|
|
2102
2324
|
readableStrategy?: QueuingStrategy<O>,
|
|
2103
2325
|
);
|
|
2104
|
-
|
|
2326
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
|
|
2105
2327
|
get readable(): ReadableStream<O>;
|
|
2106
|
-
|
|
2328
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
|
|
2107
2329
|
get writable(): WritableStream<I>;
|
|
2108
2330
|
}
|
|
2109
2331
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
@@ -2124,18 +2346,21 @@ export interface IdentityTransformStreamQueuingStrategy {
|
|
|
2124
2346
|
export interface ReadableStreamValuesOptions {
|
|
2125
2347
|
preventCancel?: boolean;
|
|
2126
2348
|
}
|
|
2349
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
|
|
2127
2350
|
export declare class CompressionStream extends TransformStream<
|
|
2128
2351
|
ArrayBuffer | ArrayBufferView,
|
|
2129
2352
|
Uint8Array
|
|
2130
2353
|
> {
|
|
2131
2354
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2132
2355
|
}
|
|
2356
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
|
|
2133
2357
|
export declare class DecompressionStream extends TransformStream<
|
|
2134
2358
|
ArrayBuffer | ArrayBufferView,
|
|
2135
2359
|
Uint8Array
|
|
2136
2360
|
> {
|
|
2137
2361
|
constructor(format: "gzip" | "deflate" | "deflate-raw");
|
|
2138
2362
|
}
|
|
2363
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
|
|
2139
2364
|
export declare class TextEncoderStream extends TransformStream<
|
|
2140
2365
|
string,
|
|
2141
2366
|
Uint8Array
|
|
@@ -2143,6 +2368,7 @@ export declare class TextEncoderStream extends TransformStream<
|
|
|
2143
2368
|
constructor();
|
|
2144
2369
|
get encoding(): string;
|
|
2145
2370
|
}
|
|
2371
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
|
|
2146
2372
|
export declare class TextDecoderStream extends TransformStream<
|
|
2147
2373
|
ArrayBuffer | ArrayBufferView,
|
|
2148
2374
|
string
|
|
@@ -2156,20 +2382,30 @@ export interface TextDecoderStreamTextDecoderStreamInit {
|
|
|
2156
2382
|
fatal?: boolean;
|
|
2157
2383
|
ignoreBOM?: boolean;
|
|
2158
2384
|
}
|
|
2385
|
+
/**
|
|
2386
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2387
|
+
*
|
|
2388
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
|
|
2389
|
+
*/
|
|
2159
2390
|
export declare class ByteLengthQueuingStrategy
|
|
2160
2391
|
implements QueuingStrategy<ArrayBufferView>
|
|
2161
2392
|
{
|
|
2162
2393
|
constructor(init: QueuingStrategyInit);
|
|
2163
|
-
|
|
2394
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
|
|
2164
2395
|
get highWaterMark(): number;
|
|
2165
|
-
|
|
2396
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
|
|
2166
2397
|
get size(): (chunk?: any) => number;
|
|
2167
2398
|
}
|
|
2399
|
+
/**
|
|
2400
|
+
* This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
|
|
2401
|
+
*
|
|
2402
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
|
|
2403
|
+
*/
|
|
2168
2404
|
export declare class CountQueuingStrategy implements QueuingStrategy {
|
|
2169
2405
|
constructor(init: QueuingStrategyInit);
|
|
2170
|
-
|
|
2406
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
|
|
2171
2407
|
get highWaterMark(): number;
|
|
2172
|
-
|
|
2408
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2173
2409
|
get size(): (chunk?: any) => number;
|
|
2174
2410
|
}
|
|
2175
2411
|
export interface QueuingStrategyInit {
|
|
@@ -2294,76 +2530,115 @@ export interface TraceMetrics {
|
|
|
2294
2530
|
export interface UnsafeTraceMetrics {
|
|
2295
2531
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2296
2532
|
}
|
|
2533
|
+
/**
|
|
2534
|
+
* The URL interface represents an object providing static methods used for creating object URLs.
|
|
2535
|
+
*
|
|
2536
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
|
|
2537
|
+
*/
|
|
2297
2538
|
export declare class URL {
|
|
2298
2539
|
constructor(url: string | URL, base?: string | URL);
|
|
2299
|
-
|
|
2540
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
|
|
2300
2541
|
get origin(): string;
|
|
2301
|
-
|
|
2542
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2302
2543
|
get href(): string;
|
|
2303
|
-
|
|
2544
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
|
|
2304
2545
|
set href(value: string);
|
|
2305
|
-
|
|
2546
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2306
2547
|
get protocol(): string;
|
|
2307
|
-
|
|
2548
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
|
|
2308
2549
|
set protocol(value: string);
|
|
2309
|
-
|
|
2550
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2310
2551
|
get username(): string;
|
|
2311
|
-
|
|
2552
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
|
|
2312
2553
|
set username(value: string);
|
|
2313
|
-
|
|
2554
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2314
2555
|
get password(): string;
|
|
2315
|
-
|
|
2556
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
|
|
2316
2557
|
set password(value: string);
|
|
2317
|
-
|
|
2558
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2318
2559
|
get host(): string;
|
|
2319
|
-
|
|
2560
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
|
|
2320
2561
|
set host(value: string);
|
|
2321
|
-
|
|
2562
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2322
2563
|
get hostname(): string;
|
|
2323
|
-
|
|
2564
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
|
|
2324
2565
|
set hostname(value: string);
|
|
2325
|
-
|
|
2566
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2326
2567
|
get port(): string;
|
|
2327
|
-
|
|
2568
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
|
|
2328
2569
|
set port(value: string);
|
|
2329
|
-
|
|
2570
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2330
2571
|
get pathname(): string;
|
|
2331
|
-
|
|
2572
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
|
|
2332
2573
|
set pathname(value: string);
|
|
2333
|
-
|
|
2574
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2334
2575
|
get search(): string;
|
|
2335
|
-
|
|
2576
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
|
|
2336
2577
|
set search(value: string);
|
|
2337
|
-
|
|
2578
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2338
2579
|
get hash(): string;
|
|
2339
|
-
|
|
2580
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
|
|
2340
2581
|
set hash(value: string);
|
|
2341
|
-
|
|
2582
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
|
|
2342
2583
|
get searchParams(): URLSearchParams;
|
|
2343
|
-
|
|
2584
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
|
|
2344
2585
|
toJSON(): string;
|
|
2586
|
+
/*function toString() { [native code] }*/
|
|
2345
2587
|
toString(): string;
|
|
2346
|
-
|
|
2588
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
|
|
2347
2589
|
static canParse(url: string, base?: string): boolean;
|
|
2348
2590
|
static parse(url: string, base?: string): URL | null;
|
|
2349
2591
|
}
|
|
2592
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
|
|
2350
2593
|
export declare class URLSearchParams {
|
|
2351
2594
|
constructor(
|
|
2352
2595
|
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
2353
2596
|
);
|
|
2597
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
|
|
2354
2598
|
get size(): number;
|
|
2599
|
+
/**
|
|
2600
|
+
* Appends a specified key/value pair as a new search parameter.
|
|
2601
|
+
*
|
|
2602
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
|
|
2603
|
+
*/
|
|
2355
2604
|
append(name: string, value: string): void;
|
|
2605
|
+
/**
|
|
2606
|
+
* Deletes the given search parameter, and its associated value, from the list of all search parameters.
|
|
2607
|
+
*
|
|
2608
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
2609
|
+
*/
|
|
2356
2610
|
delete(name: string, value?: string): void;
|
|
2611
|
+
/**
|
|
2612
|
+
* Returns the first value associated to the given search parameter.
|
|
2613
|
+
*
|
|
2614
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
|
|
2615
|
+
*/
|
|
2357
2616
|
get(name: string): string | null;
|
|
2617
|
+
/**
|
|
2618
|
+
* Returns all the values association with a given search parameter.
|
|
2619
|
+
*
|
|
2620
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
|
|
2621
|
+
*/
|
|
2358
2622
|
getAll(name: string): string[];
|
|
2623
|
+
/**
|
|
2624
|
+
* Returns a Boolean indicating if such a search parameter exists.
|
|
2625
|
+
*
|
|
2626
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
2627
|
+
*/
|
|
2359
2628
|
has(name: string, value?: string): boolean;
|
|
2629
|
+
/**
|
|
2630
|
+
* Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
|
|
2631
|
+
*
|
|
2632
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
|
|
2633
|
+
*/
|
|
2360
2634
|
set(name: string, value: string): void;
|
|
2635
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
|
|
2361
2636
|
sort(): void;
|
|
2362
|
-
|
|
2637
|
+
/* Returns an array of key, value pairs for every entry in the search params. */
|
|
2363
2638
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
2364
|
-
|
|
2639
|
+
/* Returns a list of keys in the search params. */
|
|
2365
2640
|
keys(): IterableIterator<string>;
|
|
2366
|
-
|
|
2641
|
+
/* Returns a list of values in the search params. */
|
|
2367
2642
|
values(): IterableIterator<string>;
|
|
2368
2643
|
forEach<This = unknown>(
|
|
2369
2644
|
callback: (
|
|
@@ -2374,6 +2649,7 @@ export declare class URLSearchParams {
|
|
|
2374
2649
|
) => void,
|
|
2375
2650
|
thisArg?: This,
|
|
2376
2651
|
): void;
|
|
2652
|
+
/*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
|
|
2377
2653
|
toString(): string;
|
|
2378
2654
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
2379
2655
|
}
|
|
@@ -2426,6 +2702,11 @@ export interface URLPatternURLPatternResult {
|
|
|
2426
2702
|
export interface URLPatternURLPatternOptions {
|
|
2427
2703
|
ignoreCase?: boolean;
|
|
2428
2704
|
}
|
|
2705
|
+
/**
|
|
2706
|
+
* 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.
|
|
2707
|
+
*
|
|
2708
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
|
|
2709
|
+
*/
|
|
2429
2710
|
export declare class CloseEvent extends Event {
|
|
2430
2711
|
constructor(type: string, initializer?: CloseEventInit);
|
|
2431
2712
|
/**
|
|
@@ -2452,36 +2733,34 @@ export interface CloseEventInit {
|
|
|
2452
2733
|
reason?: string;
|
|
2453
2734
|
wasClean?: boolean;
|
|
2454
2735
|
}
|
|
2736
|
+
/**
|
|
2737
|
+
* A message received by a target object.
|
|
2738
|
+
*
|
|
2739
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
2740
|
+
*/
|
|
2455
2741
|
export declare class MessageEvent extends Event {
|
|
2456
2742
|
constructor(type: string, initializer: MessageEventInit);
|
|
2743
|
+
/**
|
|
2744
|
+
* Returns the data of the message.
|
|
2745
|
+
*
|
|
2746
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
|
|
2747
|
+
*/
|
|
2457
2748
|
readonly data: ArrayBuffer | string;
|
|
2458
2749
|
}
|
|
2459
2750
|
export interface MessageEventInit {
|
|
2460
2751
|
data: ArrayBuffer | string;
|
|
2461
2752
|
}
|
|
2462
|
-
/**
|
|
2463
|
-
* Events providing information related to errors in scripts or in files.
|
|
2464
|
-
*
|
|
2465
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
|
|
2466
|
-
*/
|
|
2467
|
-
export interface ErrorEvent extends Event {
|
|
2468
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
|
|
2469
|
-
readonly filename: string;
|
|
2470
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
|
|
2471
|
-
readonly message: string;
|
|
2472
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
|
|
2473
|
-
readonly lineno: number;
|
|
2474
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
|
|
2475
|
-
readonly colno: number;
|
|
2476
|
-
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
2477
|
-
readonly error: any;
|
|
2478
|
-
}
|
|
2479
2753
|
export type WebSocketEventMap = {
|
|
2480
2754
|
close: CloseEvent;
|
|
2481
2755
|
message: MessageEvent;
|
|
2482
2756
|
open: Event;
|
|
2483
2757
|
error: ErrorEvent;
|
|
2484
2758
|
};
|
|
2759
|
+
/**
|
|
2760
|
+
* Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
|
|
2761
|
+
*
|
|
2762
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
|
|
2763
|
+
*/
|
|
2485
2764
|
export declare class WebSocket extends EventTarget<WebSocketEventMap> {
|
|
2486
2765
|
constructor(url: string, protocols?: string[] | string);
|
|
2487
2766
|
accept(): void;
|
|
@@ -2541,7 +2820,7 @@ export declare const WebSocketPair: {
|
|
|
2541
2820
|
export interface SqlStorage {
|
|
2542
2821
|
exec(query: string, ...bindings: any[]): SqlStorageCursor;
|
|
2543
2822
|
prepare(query: string): SqlStorageStatement;
|
|
2544
|
-
ingest(query: string):
|
|
2823
|
+
ingest(query: string): SqlStorageIngestResult;
|
|
2545
2824
|
get databaseSize(): number;
|
|
2546
2825
|
Cursor: typeof SqlStorageCursor;
|
|
2547
2826
|
Statement: typeof SqlStorageStatement;
|
|
@@ -2556,6 +2835,12 @@ export declare abstract class SqlStorageCursor {
|
|
|
2556
2835
|
Record<string, (ArrayBuffer | string | number) | null>
|
|
2557
2836
|
>;
|
|
2558
2837
|
}
|
|
2838
|
+
export interface SqlStorageIngestResult {
|
|
2839
|
+
remainder: string;
|
|
2840
|
+
rowsRead: number;
|
|
2841
|
+
rowsWritten: number;
|
|
2842
|
+
statementCount: number;
|
|
2843
|
+
}
|
|
2559
2844
|
export interface Socket {
|
|
2560
2845
|
get readable(): ReadableStream;
|
|
2561
2846
|
get writable(): WritableStream;
|
|
@@ -2567,6 +2852,7 @@ export interface Socket {
|
|
|
2567
2852
|
export interface SocketOptions {
|
|
2568
2853
|
secureTransport?: string;
|
|
2569
2854
|
allowHalfOpen: boolean;
|
|
2855
|
+
highWaterMark?: number | bigint;
|
|
2570
2856
|
}
|
|
2571
2857
|
export interface SocketAddress {
|
|
2572
2858
|
hostname: string;
|
|
@@ -2579,65 +2865,61 @@ export interface SocketInfo {
|
|
|
2579
2865
|
remoteAddress?: string;
|
|
2580
2866
|
localAddress?: string;
|
|
2581
2867
|
}
|
|
2582
|
-
export interface
|
|
2583
|
-
requestAdapter(
|
|
2584
|
-
param1?: gpuGPURequestAdapterOptions,
|
|
2585
|
-
): Promise<gpuGPUAdapter | null>;
|
|
2868
|
+
export interface GPU {
|
|
2869
|
+
requestAdapter(param1?: GPURequestAdapterOptions): Promise<GPUAdapter | null>;
|
|
2586
2870
|
}
|
|
2587
|
-
export declare abstract class
|
|
2588
|
-
requestDevice(param1?:
|
|
2589
|
-
requestAdapterInfo(unmaskHints?: string[]): Promise<
|
|
2590
|
-
get features():
|
|
2591
|
-
get limits():
|
|
2871
|
+
export declare abstract class GPUAdapter {
|
|
2872
|
+
requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
|
|
2873
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
|
|
2874
|
+
get features(): GPUSupportedFeatures;
|
|
2875
|
+
get limits(): GPUSupportedLimits;
|
|
2592
2876
|
}
|
|
2593
|
-
export interface
|
|
2594
|
-
createBuffer(param1:
|
|
2877
|
+
export interface GPUDevice extends EventTarget {
|
|
2878
|
+
createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
|
|
2595
2879
|
createBindGroupLayout(
|
|
2596
|
-
descriptor:
|
|
2597
|
-
):
|
|
2598
|
-
createBindGroup(descriptor:
|
|
2599
|
-
createSampler(descriptor:
|
|
2600
|
-
createShaderModule(
|
|
2601
|
-
descriptor: gpuGPUShaderModuleDescriptor,
|
|
2602
|
-
): gpuGPUShaderModule;
|
|
2880
|
+
descriptor: GPUBindGroupLayoutDescriptor,
|
|
2881
|
+
): GPUBindGroupLayout;
|
|
2882
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
2883
|
+
createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
|
|
2884
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
2603
2885
|
createPipelineLayout(
|
|
2604
|
-
descriptor:
|
|
2605
|
-
):
|
|
2886
|
+
descriptor: GPUPipelineLayoutDescriptor,
|
|
2887
|
+
): GPUPipelineLayout;
|
|
2606
2888
|
createComputePipeline(
|
|
2607
|
-
descriptor:
|
|
2608
|
-
):
|
|
2889
|
+
descriptor: GPUComputePipelineDescriptor,
|
|
2890
|
+
): GPUComputePipeline;
|
|
2609
2891
|
createRenderPipeline(
|
|
2610
|
-
descriptor:
|
|
2611
|
-
):
|
|
2892
|
+
descriptor: GPURenderPipelineDescriptor,
|
|
2893
|
+
): GPURenderPipeline;
|
|
2612
2894
|
createCommandEncoder(
|
|
2613
|
-
descriptor?:
|
|
2614
|
-
):
|
|
2615
|
-
createTexture(param1:
|
|
2895
|
+
descriptor?: GPUCommandEncoderDescriptor,
|
|
2896
|
+
): GPUCommandEncoder;
|
|
2897
|
+
createTexture(param1: GPUTextureDescriptor): GPUTexture;
|
|
2616
2898
|
destroy(): void;
|
|
2617
|
-
createQuerySet(descriptor:
|
|
2899
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
2618
2900
|
pushErrorScope(filter: string): void;
|
|
2619
|
-
popErrorScope(): Promise<
|
|
2620
|
-
get queue():
|
|
2621
|
-
get lost(): Promise<
|
|
2622
|
-
get features():
|
|
2623
|
-
get limits():
|
|
2901
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
2902
|
+
get queue(): GPUQueue;
|
|
2903
|
+
get lost(): Promise<GPUDeviceLostInfo>;
|
|
2904
|
+
get features(): GPUSupportedFeatures;
|
|
2905
|
+
get limits(): GPUSupportedLimits;
|
|
2624
2906
|
}
|
|
2625
|
-
export interface
|
|
2907
|
+
export interface GPUDeviceDescriptor {
|
|
2626
2908
|
label?: string;
|
|
2627
2909
|
requiredFeatures?: string[];
|
|
2628
2910
|
requiredLimits?: Record<string, number | bigint>;
|
|
2629
|
-
defaultQueue?:
|
|
2911
|
+
defaultQueue?: GPUQueueDescriptor;
|
|
2630
2912
|
}
|
|
2631
|
-
export interface
|
|
2913
|
+
export interface GPUBufferDescriptor {
|
|
2632
2914
|
label: string;
|
|
2633
2915
|
size: number | bigint;
|
|
2634
2916
|
usage: number;
|
|
2635
2917
|
mappedAtCreation: boolean;
|
|
2636
2918
|
}
|
|
2637
|
-
export interface
|
|
2919
|
+
export interface GPUQueueDescriptor {
|
|
2638
2920
|
label?: string;
|
|
2639
2921
|
}
|
|
2640
|
-
export declare abstract class
|
|
2922
|
+
export declare abstract class GPUBufferUsage {
|
|
2641
2923
|
static readonly MAP_READ: number;
|
|
2642
2924
|
static readonly MAP_WRITE: number;
|
|
2643
2925
|
static readonly COPY_SRC: number;
|
|
@@ -2649,7 +2931,7 @@ export declare abstract class gpuGPUBufferUsage {
|
|
|
2649
2931
|
static readonly INDIRECT: number;
|
|
2650
2932
|
static readonly QUERY_RESOLVE: number;
|
|
2651
2933
|
}
|
|
2652
|
-
export interface
|
|
2934
|
+
export interface GPUBuffer {
|
|
2653
2935
|
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2654
2936
|
unmap(): void;
|
|
2655
2937
|
destroy(): void;
|
|
@@ -2662,59 +2944,59 @@ export interface gpuGPUBuffer {
|
|
|
2662
2944
|
get usage(): number;
|
|
2663
2945
|
get mapState(): string;
|
|
2664
2946
|
}
|
|
2665
|
-
export declare abstract class
|
|
2947
|
+
export declare abstract class GPUShaderStage {
|
|
2666
2948
|
static readonly VERTEX: number;
|
|
2667
2949
|
static readonly FRAGMENT: number;
|
|
2668
2950
|
static readonly COMPUTE: number;
|
|
2669
2951
|
}
|
|
2670
|
-
export interface
|
|
2952
|
+
export interface GPUBindGroupLayoutDescriptor {
|
|
2671
2953
|
label?: string;
|
|
2672
|
-
entries:
|
|
2954
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
2673
2955
|
}
|
|
2674
|
-
export interface
|
|
2956
|
+
export interface GPUBindGroupLayoutEntry {
|
|
2675
2957
|
binding: number;
|
|
2676
2958
|
visibility: number;
|
|
2677
|
-
buffer?:
|
|
2678
|
-
sampler?:
|
|
2679
|
-
texture?:
|
|
2680
|
-
storageTexture?:
|
|
2959
|
+
buffer?: GPUBufferBindingLayout;
|
|
2960
|
+
sampler?: GPUSamplerBindingLayout;
|
|
2961
|
+
texture?: GPUTextureBindingLayout;
|
|
2962
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
2681
2963
|
}
|
|
2682
|
-
export interface
|
|
2964
|
+
export interface GPUStorageTextureBindingLayout {
|
|
2683
2965
|
access?: string;
|
|
2684
2966
|
format: string;
|
|
2685
2967
|
viewDimension?: string;
|
|
2686
2968
|
}
|
|
2687
|
-
export interface
|
|
2969
|
+
export interface GPUTextureBindingLayout {
|
|
2688
2970
|
sampleType?: string;
|
|
2689
2971
|
viewDimension?: string;
|
|
2690
2972
|
multisampled?: boolean;
|
|
2691
2973
|
}
|
|
2692
|
-
export interface
|
|
2974
|
+
export interface GPUSamplerBindingLayout {
|
|
2693
2975
|
type?: string;
|
|
2694
2976
|
}
|
|
2695
|
-
export interface
|
|
2977
|
+
export interface GPUBufferBindingLayout {
|
|
2696
2978
|
type?: string;
|
|
2697
2979
|
hasDynamicOffset?: boolean;
|
|
2698
2980
|
minBindingSize?: number | bigint;
|
|
2699
2981
|
}
|
|
2700
|
-
export interface
|
|
2701
|
-
export interface
|
|
2702
|
-
export interface
|
|
2982
|
+
export interface GPUBindGroupLayout {}
|
|
2983
|
+
export interface GPUBindGroup {}
|
|
2984
|
+
export interface GPUBindGroupDescriptor {
|
|
2703
2985
|
label?: string;
|
|
2704
|
-
layout:
|
|
2705
|
-
entries:
|
|
2986
|
+
layout: GPUBindGroupLayout;
|
|
2987
|
+
entries: GPUBindGroupEntry[];
|
|
2706
2988
|
}
|
|
2707
|
-
export interface
|
|
2989
|
+
export interface GPUBindGroupEntry {
|
|
2708
2990
|
binding: number;
|
|
2709
|
-
resource:
|
|
2991
|
+
resource: GPUBufferBinding | GPUSampler;
|
|
2710
2992
|
}
|
|
2711
|
-
export interface
|
|
2712
|
-
buffer:
|
|
2993
|
+
export interface GPUBufferBinding {
|
|
2994
|
+
buffer: GPUBuffer;
|
|
2713
2995
|
offset?: number | bigint;
|
|
2714
2996
|
size?: number | bigint;
|
|
2715
2997
|
}
|
|
2716
|
-
export interface
|
|
2717
|
-
export interface
|
|
2998
|
+
export interface GPUSampler {}
|
|
2999
|
+
export interface GPUSamplerDescriptor {
|
|
2718
3000
|
label?: string;
|
|
2719
3001
|
addressModeU?: string;
|
|
2720
3002
|
addressModeV?: string;
|
|
@@ -2727,76 +3009,74 @@ export interface gpuGPUSamplerDescriptor {
|
|
|
2727
3009
|
compare: string;
|
|
2728
3010
|
maxAnisotropy?: number;
|
|
2729
3011
|
}
|
|
2730
|
-
export interface
|
|
2731
|
-
getCompilationInfo(): Promise<
|
|
3012
|
+
export interface GPUShaderModule {
|
|
3013
|
+
getCompilationInfo(): Promise<GPUCompilationInfo>;
|
|
2732
3014
|
}
|
|
2733
|
-
export interface
|
|
3015
|
+
export interface GPUShaderModuleDescriptor {
|
|
2734
3016
|
label?: string;
|
|
2735
3017
|
code: string;
|
|
2736
3018
|
}
|
|
2737
|
-
export interface
|
|
2738
|
-
export interface
|
|
3019
|
+
export interface GPUPipelineLayout {}
|
|
3020
|
+
export interface GPUPipelineLayoutDescriptor {
|
|
2739
3021
|
label?: string;
|
|
2740
|
-
bindGroupLayouts:
|
|
3022
|
+
bindGroupLayouts: GPUBindGroupLayout[];
|
|
2741
3023
|
}
|
|
2742
|
-
export interface
|
|
2743
|
-
getBindGroupLayout(index: number):
|
|
3024
|
+
export interface GPUComputePipeline {
|
|
3025
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
2744
3026
|
}
|
|
2745
|
-
export interface
|
|
3027
|
+
export interface GPUComputePipelineDescriptor {
|
|
2746
3028
|
label?: string;
|
|
2747
|
-
compute:
|
|
2748
|
-
layout: string |
|
|
3029
|
+
compute: GPUProgrammableStage;
|
|
3030
|
+
layout: string | GPUPipelineLayout;
|
|
2749
3031
|
}
|
|
2750
|
-
export interface
|
|
2751
|
-
module:
|
|
3032
|
+
export interface GPUProgrammableStage {
|
|
3033
|
+
module: GPUShaderModule;
|
|
2752
3034
|
entryPoint: string;
|
|
2753
3035
|
constants?: Record<string, number>;
|
|
2754
3036
|
}
|
|
2755
|
-
export interface
|
|
3037
|
+
export interface GPUCommandEncoder {
|
|
2756
3038
|
get label(): string;
|
|
2757
3039
|
beginComputePass(
|
|
2758
|
-
descriptor?:
|
|
2759
|
-
):
|
|
2760
|
-
beginRenderPass(
|
|
2761
|
-
descriptor: gpuGPURenderPassDescriptor,
|
|
2762
|
-
): gpuGPURenderPassEncoder;
|
|
3040
|
+
descriptor?: GPUComputePassDescriptor,
|
|
3041
|
+
): GPUComputePassEncoder;
|
|
3042
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
2763
3043
|
copyBufferToBuffer(
|
|
2764
|
-
source:
|
|
3044
|
+
source: GPUBuffer,
|
|
2765
3045
|
sourceOffset: number | bigint,
|
|
2766
|
-
destination:
|
|
3046
|
+
destination: GPUBuffer,
|
|
2767
3047
|
destinationOffset: number | bigint,
|
|
2768
3048
|
size: number | bigint,
|
|
2769
3049
|
): void;
|
|
2770
|
-
finish(param0?:
|
|
3050
|
+
finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
2771
3051
|
copyTextureToBuffer(
|
|
2772
|
-
source:
|
|
2773
|
-
destination:
|
|
2774
|
-
copySize: Iterable<number> |
|
|
3052
|
+
source: GPUImageCopyTexture,
|
|
3053
|
+
destination: GPUImageCopyBuffer,
|
|
3054
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2775
3055
|
): void;
|
|
2776
3056
|
copyBufferToTexture(
|
|
2777
|
-
source:
|
|
2778
|
-
destination:
|
|
2779
|
-
copySize: Iterable<number> |
|
|
3057
|
+
source: GPUImageCopyBuffer,
|
|
3058
|
+
destination: GPUImageCopyTexture,
|
|
3059
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2780
3060
|
): void;
|
|
2781
3061
|
copyTextureToTexture(
|
|
2782
|
-
source:
|
|
2783
|
-
destination:
|
|
2784
|
-
copySize: Iterable<number> |
|
|
3062
|
+
source: GPUImageCopyTexture,
|
|
3063
|
+
destination: GPUImageCopyTexture,
|
|
3064
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2785
3065
|
): void;
|
|
2786
3066
|
clearBuffer(
|
|
2787
|
-
buffer:
|
|
3067
|
+
buffer: GPUBuffer,
|
|
2788
3068
|
offset?: number | bigint,
|
|
2789
3069
|
size?: number | bigint,
|
|
2790
3070
|
): void;
|
|
2791
3071
|
}
|
|
2792
|
-
export interface
|
|
3072
|
+
export interface GPUCommandEncoderDescriptor {
|
|
2793
3073
|
label?: string;
|
|
2794
3074
|
}
|
|
2795
|
-
export interface
|
|
2796
|
-
setPipeline(pipeline:
|
|
3075
|
+
export interface GPUComputePassEncoder {
|
|
3076
|
+
setPipeline(pipeline: GPUComputePipeline): void;
|
|
2797
3077
|
setBindGroup(
|
|
2798
3078
|
index: number,
|
|
2799
|
-
bindGroup:
|
|
3079
|
+
bindGroup: GPUBindGroup | null,
|
|
2800
3080
|
dynamicOffsets?: Iterable<number>,
|
|
2801
3081
|
): void;
|
|
2802
3082
|
dispatchWorkgroups(
|
|
@@ -2806,52 +3086,52 @@ export interface gpuGPUComputePassEncoder {
|
|
|
2806
3086
|
): void;
|
|
2807
3087
|
end(): void;
|
|
2808
3088
|
}
|
|
2809
|
-
export interface
|
|
3089
|
+
export interface GPUComputePassDescriptor {
|
|
2810
3090
|
label?: string;
|
|
2811
|
-
timestampWrites?:
|
|
3091
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
2812
3092
|
}
|
|
2813
|
-
export interface
|
|
2814
|
-
export interface
|
|
3093
|
+
export interface GPUQuerySet {}
|
|
3094
|
+
export interface GPUQuerySetDescriptor {
|
|
2815
3095
|
label?: string;
|
|
2816
3096
|
}
|
|
2817
|
-
export interface
|
|
2818
|
-
querySet:
|
|
3097
|
+
export interface GPUComputePassTimestampWrites {
|
|
3098
|
+
querySet: GPUQuerySet;
|
|
2819
3099
|
beginningOfPassWriteIndex?: number;
|
|
2820
3100
|
endOfPassWriteIndex?: number;
|
|
2821
3101
|
}
|
|
2822
|
-
export interface
|
|
3102
|
+
export interface GPUCommandBufferDescriptor {
|
|
2823
3103
|
label?: string;
|
|
2824
3104
|
}
|
|
2825
|
-
export interface
|
|
2826
|
-
export interface
|
|
2827
|
-
submit(commandBuffers:
|
|
3105
|
+
export interface GPUCommandBuffer {}
|
|
3106
|
+
export interface GPUQueue {
|
|
3107
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
2828
3108
|
writeBuffer(
|
|
2829
|
-
buffer:
|
|
3109
|
+
buffer: GPUBuffer,
|
|
2830
3110
|
bufferOffset: number | bigint,
|
|
2831
3111
|
data: ArrayBuffer | ArrayBufferView,
|
|
2832
3112
|
dataOffset?: number | bigint,
|
|
2833
3113
|
size?: number | bigint,
|
|
2834
3114
|
): void;
|
|
2835
3115
|
}
|
|
2836
|
-
export declare abstract class
|
|
3116
|
+
export declare abstract class GPUMapMode {
|
|
2837
3117
|
static readonly READ: number;
|
|
2838
3118
|
static readonly WRITE: number;
|
|
2839
3119
|
}
|
|
2840
|
-
export interface
|
|
3120
|
+
export interface GPURequestAdapterOptions {
|
|
2841
3121
|
powerPreference: string;
|
|
2842
3122
|
forceFallbackAdapter?: boolean;
|
|
2843
3123
|
}
|
|
2844
|
-
export interface
|
|
3124
|
+
export interface GPUAdapterInfo {
|
|
2845
3125
|
get vendor(): string;
|
|
2846
3126
|
get architecture(): string;
|
|
2847
3127
|
get device(): string;
|
|
2848
3128
|
get description(): string;
|
|
2849
3129
|
}
|
|
2850
|
-
export interface
|
|
3130
|
+
export interface GPUSupportedFeatures {
|
|
2851
3131
|
has(name: string): boolean;
|
|
2852
3132
|
keys(): string[];
|
|
2853
3133
|
}
|
|
2854
|
-
export interface
|
|
3134
|
+
export interface GPUSupportedLimits {
|
|
2855
3135
|
get maxTextureDimension1D(): number;
|
|
2856
3136
|
get maxTextureDimension2D(): number;
|
|
2857
3137
|
get maxTextureDimension3D(): number;
|
|
@@ -2884,17 +3164,17 @@ export interface gpuGPUSupportedLimits {
|
|
|
2884
3164
|
get maxComputeWorkgroupSizeZ(): number;
|
|
2885
3165
|
get maxComputeWorkgroupsPerDimension(): number;
|
|
2886
3166
|
}
|
|
2887
|
-
export declare abstract class
|
|
3167
|
+
export declare abstract class GPUError {
|
|
2888
3168
|
get message(): string;
|
|
2889
3169
|
}
|
|
2890
|
-
export declare abstract class
|
|
2891
|
-
export declare abstract class
|
|
2892
|
-
export declare abstract class
|
|
2893
|
-
export declare abstract class
|
|
3170
|
+
export declare abstract class GPUOutOfMemoryError extends GPUError {}
|
|
3171
|
+
export declare abstract class GPUInternalError extends GPUError {}
|
|
3172
|
+
export declare abstract class GPUValidationError extends GPUError {}
|
|
3173
|
+
export declare abstract class GPUDeviceLostInfo {
|
|
2894
3174
|
get message(): string;
|
|
2895
3175
|
get reason(): string;
|
|
2896
3176
|
}
|
|
2897
|
-
export interface
|
|
3177
|
+
export interface GPUCompilationMessage {
|
|
2898
3178
|
get message(): string;
|
|
2899
3179
|
get type(): string;
|
|
2900
3180
|
get lineNum(): number;
|
|
@@ -2902,19 +3182,19 @@ export interface gpuGPUCompilationMessage {
|
|
|
2902
3182
|
get offset(): number;
|
|
2903
3183
|
get length(): number;
|
|
2904
3184
|
}
|
|
2905
|
-
export interface
|
|
2906
|
-
get messages():
|
|
3185
|
+
export interface GPUCompilationInfo {
|
|
3186
|
+
get messages(): GPUCompilationMessage[];
|
|
2907
3187
|
}
|
|
2908
|
-
export declare abstract class
|
|
3188
|
+
export declare abstract class GPUTextureUsage {
|
|
2909
3189
|
static readonly COPY_SRC: number;
|
|
2910
3190
|
static readonly COPY_DST: number;
|
|
2911
3191
|
static readonly TEXTURE_BINDING: number;
|
|
2912
3192
|
static readonly STORAGE_BINDING: number;
|
|
2913
3193
|
static readonly RENDER_ATTACHMENT: number;
|
|
2914
3194
|
}
|
|
2915
|
-
export interface
|
|
3195
|
+
export interface GPUTextureDescriptor {
|
|
2916
3196
|
label: string;
|
|
2917
|
-
size: number[] |
|
|
3197
|
+
size: number[] | GPUExtent3DDict;
|
|
2918
3198
|
mipLevelCount?: number;
|
|
2919
3199
|
sampleCount?: number;
|
|
2920
3200
|
dimension?: string;
|
|
@@ -2922,13 +3202,13 @@ export interface gpuGPUTextureDescriptor {
|
|
|
2922
3202
|
usage: number;
|
|
2923
3203
|
viewFormats?: string[];
|
|
2924
3204
|
}
|
|
2925
|
-
export interface
|
|
3205
|
+
export interface GPUExtent3DDict {
|
|
2926
3206
|
width: number;
|
|
2927
3207
|
height?: number;
|
|
2928
3208
|
depthOrArrayLayers?: number;
|
|
2929
3209
|
}
|
|
2930
|
-
export interface
|
|
2931
|
-
createView(descriptor?:
|
|
3210
|
+
export interface GPUTexture {
|
|
3211
|
+
createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
|
|
2932
3212
|
destroy(): void;
|
|
2933
3213
|
get width(): number;
|
|
2934
3214
|
get height(): number;
|
|
@@ -2938,8 +3218,8 @@ export interface gpuGPUTexture {
|
|
|
2938
3218
|
get format(): string;
|
|
2939
3219
|
get usage(): number;
|
|
2940
3220
|
}
|
|
2941
|
-
export interface
|
|
2942
|
-
export interface
|
|
3221
|
+
export interface GPUTextureView {}
|
|
3222
|
+
export interface GPUTextureViewDescriptor {
|
|
2943
3223
|
label: string;
|
|
2944
3224
|
format: string;
|
|
2945
3225
|
dimension: string;
|
|
@@ -2949,91 +3229,91 @@ export interface gpuGPUTextureViewDescriptor {
|
|
|
2949
3229
|
baseArrayLayer?: number;
|
|
2950
3230
|
arrayLayerCount: number;
|
|
2951
3231
|
}
|
|
2952
|
-
export declare abstract class
|
|
3232
|
+
export declare abstract class GPUColorWrite {
|
|
2953
3233
|
static readonly RED: number;
|
|
2954
3234
|
static readonly GREEN: number;
|
|
2955
3235
|
static readonly BLUE: number;
|
|
2956
3236
|
static readonly ALPHA: number;
|
|
2957
3237
|
static readonly ALL: number;
|
|
2958
3238
|
}
|
|
2959
|
-
export interface
|
|
2960
|
-
export interface
|
|
3239
|
+
export interface GPURenderPipeline {}
|
|
3240
|
+
export interface GPURenderPipelineDescriptor {
|
|
2961
3241
|
label?: string;
|
|
2962
|
-
layout: string |
|
|
2963
|
-
vertex:
|
|
2964
|
-
primitive?:
|
|
2965
|
-
depthStencil?:
|
|
2966
|
-
multisample?:
|
|
2967
|
-
fragment?:
|
|
2968
|
-
}
|
|
2969
|
-
export interface
|
|
2970
|
-
module:
|
|
3242
|
+
layout: string | GPUPipelineLayout;
|
|
3243
|
+
vertex: GPUVertexState;
|
|
3244
|
+
primitive?: GPUPrimitiveState;
|
|
3245
|
+
depthStencil?: GPUDepthStencilState;
|
|
3246
|
+
multisample?: GPUMultisampleState;
|
|
3247
|
+
fragment?: GPUFragmentState;
|
|
3248
|
+
}
|
|
3249
|
+
export interface GPUVertexState {
|
|
3250
|
+
module: GPUShaderModule;
|
|
2971
3251
|
entryPoint: string;
|
|
2972
3252
|
constants?: Record<string, number>;
|
|
2973
|
-
buffers?:
|
|
3253
|
+
buffers?: GPUVertexBufferLayout[];
|
|
2974
3254
|
}
|
|
2975
|
-
export interface
|
|
3255
|
+
export interface GPUVertexBufferLayout {
|
|
2976
3256
|
arrayStride: number | bigint;
|
|
2977
3257
|
stepMode?: string;
|
|
2978
|
-
attributes:
|
|
3258
|
+
attributes: GPUVertexAttribute[];
|
|
2979
3259
|
}
|
|
2980
|
-
export interface
|
|
3260
|
+
export interface GPUVertexAttribute {
|
|
2981
3261
|
format: string;
|
|
2982
3262
|
offset: number | bigint;
|
|
2983
3263
|
shaderLocation: number;
|
|
2984
3264
|
}
|
|
2985
|
-
export interface
|
|
3265
|
+
export interface GPUPrimitiveState {
|
|
2986
3266
|
topology?: string;
|
|
2987
3267
|
stripIndexFormat?: string;
|
|
2988
3268
|
frontFace?: string;
|
|
2989
3269
|
cullMode?: string;
|
|
2990
3270
|
unclippedDepth?: boolean;
|
|
2991
3271
|
}
|
|
2992
|
-
export interface
|
|
3272
|
+
export interface GPUStencilFaceState {
|
|
2993
3273
|
compare?: string;
|
|
2994
3274
|
failOp?: string;
|
|
2995
3275
|
depthFailOp?: string;
|
|
2996
3276
|
passOp?: string;
|
|
2997
3277
|
}
|
|
2998
|
-
export interface
|
|
3278
|
+
export interface GPUDepthStencilState {
|
|
2999
3279
|
format: string;
|
|
3000
3280
|
depthWriteEnabled: boolean;
|
|
3001
3281
|
depthCompare: string;
|
|
3002
|
-
stencilFront?:
|
|
3003
|
-
stencilBack?:
|
|
3282
|
+
stencilFront?: GPUStencilFaceState;
|
|
3283
|
+
stencilBack?: GPUStencilFaceState;
|
|
3004
3284
|
stencilReadMask?: number;
|
|
3005
3285
|
stencilWriteMask?: number;
|
|
3006
3286
|
depthBias?: number;
|
|
3007
3287
|
depthBiasSlopeScale?: number;
|
|
3008
3288
|
depthBiasClamp?: number;
|
|
3009
3289
|
}
|
|
3010
|
-
export interface
|
|
3290
|
+
export interface GPUMultisampleState {
|
|
3011
3291
|
count?: number;
|
|
3012
3292
|
mask?: number;
|
|
3013
3293
|
alphaToCoverageEnabled?: boolean;
|
|
3014
3294
|
}
|
|
3015
|
-
export interface
|
|
3016
|
-
module:
|
|
3295
|
+
export interface GPUFragmentState {
|
|
3296
|
+
module: GPUShaderModule;
|
|
3017
3297
|
entryPoint: string;
|
|
3018
3298
|
constants?: Record<string, number>;
|
|
3019
|
-
targets:
|
|
3299
|
+
targets: GPUColorTargetState[];
|
|
3020
3300
|
}
|
|
3021
|
-
export interface
|
|
3301
|
+
export interface GPUColorTargetState {
|
|
3022
3302
|
format: string;
|
|
3023
|
-
blend:
|
|
3303
|
+
blend: GPUBlendState;
|
|
3024
3304
|
writeMask?: number;
|
|
3025
3305
|
}
|
|
3026
|
-
export interface
|
|
3027
|
-
color:
|
|
3028
|
-
alpha:
|
|
3306
|
+
export interface GPUBlendState {
|
|
3307
|
+
color: GPUBlendComponent;
|
|
3308
|
+
alpha: GPUBlendComponent;
|
|
3029
3309
|
}
|
|
3030
|
-
export interface
|
|
3310
|
+
export interface GPUBlendComponent {
|
|
3031
3311
|
operation?: string;
|
|
3032
3312
|
srcFactor?: string;
|
|
3033
3313
|
dstFactor?: string;
|
|
3034
3314
|
}
|
|
3035
|
-
export interface
|
|
3036
|
-
setPipeline(pipeline:
|
|
3315
|
+
export interface GPURenderPassEncoder {
|
|
3316
|
+
setPipeline(pipeline: GPURenderPipeline): void;
|
|
3037
3317
|
draw(
|
|
3038
3318
|
vertexCount: number,
|
|
3039
3319
|
instanceCount?: number,
|
|
@@ -3042,30 +3322,30 @@ export interface gpuGPURenderPassEncoder {
|
|
|
3042
3322
|
): void;
|
|
3043
3323
|
end(): void;
|
|
3044
3324
|
}
|
|
3045
|
-
export interface
|
|
3325
|
+
export interface GPURenderPassDescriptor {
|
|
3046
3326
|
label?: string;
|
|
3047
|
-
colorAttachments:
|
|
3048
|
-
depthStencilAttachment?:
|
|
3049
|
-
occlusionQuerySet?:
|
|
3050
|
-
timestampWrites?:
|
|
3327
|
+
colorAttachments: GPURenderPassColorAttachment[];
|
|
3328
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
3329
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
3330
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
3051
3331
|
maxDrawCount?: number | bigint;
|
|
3052
3332
|
}
|
|
3053
|
-
export interface
|
|
3054
|
-
view:
|
|
3333
|
+
export interface GPURenderPassColorAttachment {
|
|
3334
|
+
view: GPUTextureView;
|
|
3055
3335
|
depthSlice?: number;
|
|
3056
|
-
resolveTarget?:
|
|
3057
|
-
clearValue?: number[] |
|
|
3336
|
+
resolveTarget?: GPUTextureView;
|
|
3337
|
+
clearValue?: number[] | GPUColorDict;
|
|
3058
3338
|
loadOp: string;
|
|
3059
3339
|
storeOp: string;
|
|
3060
3340
|
}
|
|
3061
|
-
export interface
|
|
3341
|
+
export interface GPUColorDict {
|
|
3062
3342
|
r: number;
|
|
3063
3343
|
g: number;
|
|
3064
3344
|
b: number;
|
|
3065
3345
|
a: number;
|
|
3066
3346
|
}
|
|
3067
|
-
export interface
|
|
3068
|
-
view:
|
|
3347
|
+
export interface GPURenderPassDepthStencilAttachment {
|
|
3348
|
+
view: GPUTextureView;
|
|
3069
3349
|
depthClearValue?: number;
|
|
3070
3350
|
depthLoadOp?: string;
|
|
3071
3351
|
depthStoreOp?: string;
|
|
@@ -3075,28 +3355,373 @@ export interface gpuGPURenderPassDepthStencilAttachment {
|
|
|
3075
3355
|
stencilStoreOp?: string;
|
|
3076
3356
|
stencilReadOnly?: boolean;
|
|
3077
3357
|
}
|
|
3078
|
-
export interface
|
|
3079
|
-
querySet:
|
|
3358
|
+
export interface GPURenderPassTimestampWrites {
|
|
3359
|
+
querySet: GPUQuerySet;
|
|
3080
3360
|
beginningOfPassWriteIndex?: number;
|
|
3081
3361
|
endOfPassWriteIndex?: number;
|
|
3082
3362
|
}
|
|
3083
|
-
export interface
|
|
3084
|
-
texture:
|
|
3363
|
+
export interface GPUImageCopyTexture {
|
|
3364
|
+
texture: GPUTexture;
|
|
3085
3365
|
mipLevel?: number;
|
|
3086
|
-
origin?: number[] |
|
|
3366
|
+
origin?: number[] | GPUOrigin3DDict;
|
|
3087
3367
|
aspect?: string;
|
|
3088
3368
|
}
|
|
3089
|
-
export interface
|
|
3090
|
-
buffer:
|
|
3369
|
+
export interface GPUImageCopyBuffer {
|
|
3370
|
+
buffer: GPUBuffer;
|
|
3091
3371
|
offset?: number | bigint;
|
|
3092
3372
|
bytesPerRow?: number;
|
|
3093
3373
|
rowsPerImage?: number;
|
|
3094
3374
|
}
|
|
3095
|
-
export interface
|
|
3375
|
+
export interface GPUOrigin3DDict {
|
|
3096
3376
|
x?: number;
|
|
3097
3377
|
y?: number;
|
|
3098
3378
|
z?: number;
|
|
3099
3379
|
}
|
|
3380
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
|
|
3381
|
+
export declare class EventSource {
|
|
3382
|
+
constructor(url: string, init?: EventSourceEventSourceInit);
|
|
3383
|
+
/**
|
|
3384
|
+
* Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
|
|
3385
|
+
*
|
|
3386
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
|
|
3387
|
+
*/
|
|
3388
|
+
close(): void;
|
|
3389
|
+
/**
|
|
3390
|
+
* Returns the URL providing the event stream.
|
|
3391
|
+
*
|
|
3392
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
|
|
3393
|
+
*/
|
|
3394
|
+
get url(): string;
|
|
3395
|
+
/**
|
|
3396
|
+
* Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
|
|
3397
|
+
*
|
|
3398
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
|
|
3399
|
+
*/
|
|
3400
|
+
get withCredentials(): boolean;
|
|
3401
|
+
/**
|
|
3402
|
+
* Returns the state of this EventSource object's connection. It can have the values described below.
|
|
3403
|
+
*
|
|
3404
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
|
|
3405
|
+
*/
|
|
3406
|
+
get readyState(): number;
|
|
3407
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3408
|
+
get onopen(): any | null;
|
|
3409
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
|
|
3410
|
+
set onopen(value: any | null);
|
|
3411
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3412
|
+
get onmessage(): any | null;
|
|
3413
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
|
|
3414
|
+
set onmessage(value: any | null);
|
|
3415
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3416
|
+
get onerror(): any | null;
|
|
3417
|
+
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
|
|
3418
|
+
set onerror(value: any | null);
|
|
3419
|
+
static readonly CONNECTING: number;
|
|
3420
|
+
static readonly OPEN: number;
|
|
3421
|
+
static readonly CLOSED: number;
|
|
3422
|
+
static from(stream: ReadableStream): EventSource;
|
|
3423
|
+
}
|
|
3424
|
+
export interface EventSourceEventSourceInit {
|
|
3425
|
+
withCredentials?: boolean;
|
|
3426
|
+
fetcher?: Fetcher;
|
|
3427
|
+
}
|
|
3428
|
+
export type AiImageClassificationInput = {
|
|
3429
|
+
image: number[];
|
|
3430
|
+
};
|
|
3431
|
+
export type AiImageClassificationOutput = {
|
|
3432
|
+
score?: number;
|
|
3433
|
+
label?: string;
|
|
3434
|
+
}[];
|
|
3435
|
+
export declare abstract class BaseAiImageClassification {
|
|
3436
|
+
inputs: AiImageClassificationInput;
|
|
3437
|
+
postProcessedOutputs: AiImageClassificationOutput;
|
|
3438
|
+
}
|
|
3439
|
+
export type AiImageToTextInput = {
|
|
3440
|
+
image: number[];
|
|
3441
|
+
prompt?: string;
|
|
3442
|
+
max_tokens?: number;
|
|
3443
|
+
temperature?: number;
|
|
3444
|
+
top_p?: number;
|
|
3445
|
+
top_k?: number;
|
|
3446
|
+
seed?: number;
|
|
3447
|
+
repetition_penalty?: number;
|
|
3448
|
+
frequency_penalty?: number;
|
|
3449
|
+
presence_penalty?: number;
|
|
3450
|
+
raw?: boolean;
|
|
3451
|
+
messages?: RoleScopedChatInput[];
|
|
3452
|
+
};
|
|
3453
|
+
export type AiImageToTextOutput = {
|
|
3454
|
+
description: string;
|
|
3455
|
+
};
|
|
3456
|
+
export declare abstract class BaseAiImageToText {
|
|
3457
|
+
inputs: AiImageToTextInput;
|
|
3458
|
+
postProcessedOutputs: AiImageToTextOutput;
|
|
3459
|
+
}
|
|
3460
|
+
export type AiObjectDetectionInput = {
|
|
3461
|
+
image: number[];
|
|
3462
|
+
};
|
|
3463
|
+
export type AiObjectDetectionOutput = {
|
|
3464
|
+
score?: number;
|
|
3465
|
+
label?: string;
|
|
3466
|
+
}[];
|
|
3467
|
+
export declare abstract class BaseAiObjectDetection {
|
|
3468
|
+
inputs: AiObjectDetectionInput;
|
|
3469
|
+
postProcessedOutputs: AiObjectDetectionOutput;
|
|
3470
|
+
}
|
|
3471
|
+
export type AiSentenceSimilarityInput = {
|
|
3472
|
+
source: string;
|
|
3473
|
+
sentences: string[];
|
|
3474
|
+
};
|
|
3475
|
+
export type AiSentenceSimilarityOutput = number[];
|
|
3476
|
+
export declare abstract class BaseAiSentenceSimilarity {
|
|
3477
|
+
inputs: AiSentenceSimilarityInput;
|
|
3478
|
+
postProcessedOutputs: AiSentenceSimilarityOutput;
|
|
3479
|
+
}
|
|
3480
|
+
export type AiSpeechRecognitionInput = {
|
|
3481
|
+
audio: number[];
|
|
3482
|
+
};
|
|
3483
|
+
export type AiSpeechRecognitionOutput = {
|
|
3484
|
+
text?: string;
|
|
3485
|
+
words?: {
|
|
3486
|
+
word: string;
|
|
3487
|
+
start: number;
|
|
3488
|
+
end: number;
|
|
3489
|
+
}[];
|
|
3490
|
+
vtt?: string;
|
|
3491
|
+
};
|
|
3492
|
+
export declare abstract class BaseAiSpeechRecognition {
|
|
3493
|
+
inputs: AiSpeechRecognitionInput;
|
|
3494
|
+
postProcessedOutputs: AiSpeechRecognitionOutput;
|
|
3495
|
+
}
|
|
3496
|
+
export type AiSummarizationInput = {
|
|
3497
|
+
input_text: string;
|
|
3498
|
+
max_length?: number;
|
|
3499
|
+
};
|
|
3500
|
+
export type AiSummarizationOutput = {
|
|
3501
|
+
summary: string;
|
|
3502
|
+
};
|
|
3503
|
+
export declare abstract class BaseAiSummarization {
|
|
3504
|
+
inputs: AiSummarizationInput;
|
|
3505
|
+
postProcessedOutputs: AiSummarizationOutput;
|
|
3506
|
+
}
|
|
3507
|
+
export type AiTextClassificationInput = {
|
|
3508
|
+
text: string;
|
|
3509
|
+
};
|
|
3510
|
+
export type AiTextClassificationOutput = {
|
|
3511
|
+
score?: number;
|
|
3512
|
+
label?: string;
|
|
3513
|
+
}[];
|
|
3514
|
+
export declare abstract class BaseAiTextClassification {
|
|
3515
|
+
inputs: AiTextClassificationInput;
|
|
3516
|
+
postProcessedOutputs: AiTextClassificationOutput;
|
|
3517
|
+
}
|
|
3518
|
+
export type AiTextEmbeddingsInput = {
|
|
3519
|
+
text: string | string[];
|
|
3520
|
+
};
|
|
3521
|
+
export type AiTextEmbeddingsOutput = {
|
|
3522
|
+
shape: number[];
|
|
3523
|
+
data: number[][];
|
|
3524
|
+
};
|
|
3525
|
+
export declare abstract class BaseAiTextEmbeddings {
|
|
3526
|
+
inputs: AiTextEmbeddingsInput;
|
|
3527
|
+
postProcessedOutputs: AiTextEmbeddingsOutput;
|
|
3528
|
+
}
|
|
3529
|
+
export type RoleScopedChatInput = {
|
|
3530
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
3531
|
+
content: string;
|
|
3532
|
+
};
|
|
3533
|
+
export type AiTextGenerationToolInput = {
|
|
3534
|
+
type: "function";
|
|
3535
|
+
function: {
|
|
3536
|
+
name: string;
|
|
3537
|
+
description: string;
|
|
3538
|
+
parameters?: {
|
|
3539
|
+
type: "object";
|
|
3540
|
+
properties: {
|
|
3541
|
+
[key: string]: {
|
|
3542
|
+
type: string;
|
|
3543
|
+
description?: string;
|
|
3544
|
+
};
|
|
3545
|
+
};
|
|
3546
|
+
required: string[];
|
|
3547
|
+
};
|
|
3548
|
+
};
|
|
3549
|
+
};
|
|
3550
|
+
export type AiTextGenerationInput = {
|
|
3551
|
+
prompt?: string;
|
|
3552
|
+
raw?: boolean;
|
|
3553
|
+
stream?: boolean;
|
|
3554
|
+
max_tokens?: number;
|
|
3555
|
+
temperature?: number;
|
|
3556
|
+
top_p?: number;
|
|
3557
|
+
top_k?: number;
|
|
3558
|
+
seed?: number;
|
|
3559
|
+
repetition_penalty?: number;
|
|
3560
|
+
frequency_penalty?: number;
|
|
3561
|
+
presence_penalty?: number;
|
|
3562
|
+
messages?: RoleScopedChatInput[];
|
|
3563
|
+
tools?: AiTextGenerationToolInput[];
|
|
3564
|
+
};
|
|
3565
|
+
export type AiTextGenerationOutput =
|
|
3566
|
+
| {
|
|
3567
|
+
response?: string;
|
|
3568
|
+
tool_calls?: {
|
|
3569
|
+
name: string;
|
|
3570
|
+
arguments: unknown;
|
|
3571
|
+
}[];
|
|
3572
|
+
}
|
|
3573
|
+
| ReadableStream;
|
|
3574
|
+
export declare abstract class BaseAiTextGeneration {
|
|
3575
|
+
inputs: AiTextGenerationInput;
|
|
3576
|
+
postProcessedOutputs: AiTextGenerationOutput;
|
|
3577
|
+
}
|
|
3578
|
+
export type AiTextToImageInput = {
|
|
3579
|
+
prompt: string;
|
|
3580
|
+
image?: number[];
|
|
3581
|
+
mask?: number[];
|
|
3582
|
+
num_steps?: number;
|
|
3583
|
+
strength?: number;
|
|
3584
|
+
guidance?: number;
|
|
3585
|
+
};
|
|
3586
|
+
export type AiTextToImageOutput = Uint8Array;
|
|
3587
|
+
export declare abstract class BaseAiTextToImage {
|
|
3588
|
+
inputs: AiTextToImageInput;
|
|
3589
|
+
postProcessedOutputs: AiTextToImageOutput;
|
|
3590
|
+
}
|
|
3591
|
+
export type AiTranslationInput = {
|
|
3592
|
+
text: string;
|
|
3593
|
+
target_lang: string;
|
|
3594
|
+
source_lang?: string;
|
|
3595
|
+
};
|
|
3596
|
+
export type AiTranslationOutput = {
|
|
3597
|
+
translated_text?: string;
|
|
3598
|
+
};
|
|
3599
|
+
export declare abstract class BaseAiTranslation {
|
|
3600
|
+
inputs: AiTranslationInput;
|
|
3601
|
+
postProcessedOutputs: AiTranslationOutput;
|
|
3602
|
+
}
|
|
3603
|
+
export type GatewayOptions = {
|
|
3604
|
+
id: string;
|
|
3605
|
+
cacheTtl?: number;
|
|
3606
|
+
skipCache?: boolean;
|
|
3607
|
+
metadata?: Record<string, number | string | boolean | null | bigint>;
|
|
3608
|
+
};
|
|
3609
|
+
export type AiOptions = {
|
|
3610
|
+
gateway?: GatewayOptions;
|
|
3611
|
+
prefix?: string;
|
|
3612
|
+
extraHeaders?: object;
|
|
3613
|
+
};
|
|
3614
|
+
export type BaseAiTextClassificationModels =
|
|
3615
|
+
"@cf/huggingface/distilbert-sst-2-int8";
|
|
3616
|
+
export type BaseAiTextToImageModels =
|
|
3617
|
+
| "@cf/stabilityai/stable-diffusion-xl-base-1.0"
|
|
3618
|
+
| "@cf/runwayml/stable-diffusion-v1-5-inpainting"
|
|
3619
|
+
| "@cf/runwayml/stable-diffusion-v1-5-img2img"
|
|
3620
|
+
| "@cf/lykon/dreamshaper-8-lcm"
|
|
3621
|
+
| "@cf/bytedance/stable-diffusion-xl-lightning";
|
|
3622
|
+
export type BaseAiTextEmbeddingsModels =
|
|
3623
|
+
| "@cf/baai/bge-small-en-v1.5"
|
|
3624
|
+
| "@cf/baai/bge-base-en-v1.5"
|
|
3625
|
+
| "@cf/baai/bge-large-en-v1.5";
|
|
3626
|
+
export type BaseAiSpeechRecognitionModels =
|
|
3627
|
+
| "@cf/openai/whisper"
|
|
3628
|
+
| "@cf/openai/whisper-tiny-en"
|
|
3629
|
+
| "@cf/openai/whisper-sherpa";
|
|
3630
|
+
export type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
|
|
3631
|
+
export type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
|
|
3632
|
+
export type BaseAiTextGenerationModels =
|
|
3633
|
+
| "@cf/meta/llama-3-8b-instruct"
|
|
3634
|
+
| "@cf/meta/llama-3-8b-instruct-awq"
|
|
3635
|
+
| "@cf/meta/llama-2-7b-chat-int8"
|
|
3636
|
+
| "@cf/mistral/mistral-7b-instruct-v0.1"
|
|
3637
|
+
| "@cf/mistral/mistral-7b-instruct-v0.2-lora"
|
|
3638
|
+
| "@cf/meta/llama-2-7b-chat-fp16"
|
|
3639
|
+
| "@hf/thebloke/llama-2-13b-chat-awq"
|
|
3640
|
+
| "@hf/thebloke/zephyr-7b-beta-awq"
|
|
3641
|
+
| "@hf/thebloke/mistral-7b-instruct-v0.1-awq"
|
|
3642
|
+
| "@hf/thebloke/codellama-7b-instruct-awq"
|
|
3643
|
+
| "@hf/thebloke/openhermes-2.5-mistral-7b-awq"
|
|
3644
|
+
| "@hf/thebloke/neural-chat-7b-v3-1-awq"
|
|
3645
|
+
| "@hf/thebloke/llamaguard-7b-awq"
|
|
3646
|
+
| "@hf/thebloke/deepseek-coder-6.7b-base-awq"
|
|
3647
|
+
| "@hf/thebloke/deepseek-coder-6.7b-instruct-awq"
|
|
3648
|
+
| "@hf/nousresearch/hermes-2-pro-mistral-7b"
|
|
3649
|
+
| "@hf/mistral/mistral-7b-instruct-v0.2"
|
|
3650
|
+
| "@hf/google/gemma-7b-it"
|
|
3651
|
+
| "@hf/nexusflow/starling-lm-7b-beta"
|
|
3652
|
+
| "@cf/deepseek-ai/deepseek-math-7b-instruct"
|
|
3653
|
+
| "@cf/defog/sqlcoder-7b-2"
|
|
3654
|
+
| "@cf/openchat/openchat-3.5-0106"
|
|
3655
|
+
| "@cf/tiiuae/falcon-7b-instruct"
|
|
3656
|
+
| "@cf/thebloke/discolm-german-7b-v1-awq"
|
|
3657
|
+
| "@cf/qwen/qwen1.5-0.5b-chat"
|
|
3658
|
+
| "@cf/qwen/qwen1.5-1.8b-chat"
|
|
3659
|
+
| "@cf/qwen/qwen1.5-7b-chat-awq"
|
|
3660
|
+
| "@cf/qwen/qwen1.5-14b-chat-awq"
|
|
3661
|
+
| "@cf/tinyllama/tinyllama-1.1b-chat-v1.0"
|
|
3662
|
+
| "@cf/microsoft/phi-2"
|
|
3663
|
+
| "@cf/google/gemma-2b-it-lora"
|
|
3664
|
+
| "@cf/google/gemma-7b-it-lora"
|
|
3665
|
+
| "@cf/meta-llama/llama-2-7b-chat-hf-lora"
|
|
3666
|
+
| "@cf/fblgit/una-cybertron-7b-v2-bf16"
|
|
3667
|
+
| "@cf/fblgit/una-cybertron-7b-v2-awq";
|
|
3668
|
+
export type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
|
|
3669
|
+
export type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
|
|
3670
|
+
export type BaseAiImageToTextModels =
|
|
3671
|
+
| "@cf/unum/uform-gen2-qwen-500m"
|
|
3672
|
+
| "@cf/llava-hf/llava-1.5-7b-hf";
|
|
3673
|
+
export declare abstract class Ai {
|
|
3674
|
+
run(
|
|
3675
|
+
model: BaseAiTextClassificationModels,
|
|
3676
|
+
inputs: BaseAiTextClassification["inputs"],
|
|
3677
|
+
options?: AiOptions,
|
|
3678
|
+
): Promise<BaseAiTextClassification["postProcessedOutputs"]>;
|
|
3679
|
+
run(
|
|
3680
|
+
model: BaseAiTextToImageModels,
|
|
3681
|
+
inputs: BaseAiTextToImage["inputs"],
|
|
3682
|
+
options?: AiOptions,
|
|
3683
|
+
): Promise<BaseAiTextToImage["postProcessedOutputs"]>;
|
|
3684
|
+
run(
|
|
3685
|
+
model: BaseAiTextEmbeddingsModels,
|
|
3686
|
+
inputs: BaseAiTextEmbeddings["inputs"],
|
|
3687
|
+
options?: AiOptions,
|
|
3688
|
+
): Promise<BaseAiTextEmbeddings["postProcessedOutputs"]>;
|
|
3689
|
+
run(
|
|
3690
|
+
model: BaseAiSpeechRecognitionModels,
|
|
3691
|
+
inputs: BaseAiSpeechRecognition["inputs"],
|
|
3692
|
+
options?: AiOptions,
|
|
3693
|
+
): Promise<BaseAiSpeechRecognition["postProcessedOutputs"]>;
|
|
3694
|
+
run(
|
|
3695
|
+
model: BaseAiImageClassificationModels,
|
|
3696
|
+
inputs: BaseAiImageClassification["inputs"],
|
|
3697
|
+
options?: AiOptions,
|
|
3698
|
+
): Promise<BaseAiImageClassification["postProcessedOutputs"]>;
|
|
3699
|
+
run(
|
|
3700
|
+
model: BaseAiObjectDetectionModels,
|
|
3701
|
+
inputs: BaseAiObjectDetection["inputs"],
|
|
3702
|
+
options?: AiOptions,
|
|
3703
|
+
): Promise<BaseAiObjectDetection["postProcessedOutputs"]>;
|
|
3704
|
+
run(
|
|
3705
|
+
model: BaseAiTextGenerationModels,
|
|
3706
|
+
inputs: BaseAiTextGeneration["inputs"],
|
|
3707
|
+
options?: AiOptions,
|
|
3708
|
+
): Promise<BaseAiTextGeneration["postProcessedOutputs"]>;
|
|
3709
|
+
run(
|
|
3710
|
+
model: BaseAiTranslationModels,
|
|
3711
|
+
inputs: BaseAiTranslation["inputs"],
|
|
3712
|
+
options?: AiOptions,
|
|
3713
|
+
): Promise<BaseAiTranslation["postProcessedOutputs"]>;
|
|
3714
|
+
run(
|
|
3715
|
+
model: BaseAiSummarizationModels,
|
|
3716
|
+
inputs: BaseAiSummarization["inputs"],
|
|
3717
|
+
options?: AiOptions,
|
|
3718
|
+
): Promise<BaseAiSummarization["postProcessedOutputs"]>;
|
|
3719
|
+
run(
|
|
3720
|
+
model: BaseAiImageToTextModels,
|
|
3721
|
+
inputs: BaseAiImageToText["inputs"],
|
|
3722
|
+
options?: AiOptions,
|
|
3723
|
+
): Promise<BaseAiImageToText["postProcessedOutputs"]>;
|
|
3724
|
+
}
|
|
3100
3725
|
export interface BasicImageTransformations {
|
|
3101
3726
|
/**
|
|
3102
3727
|
* Maximum width in image pixels. The value must be an integer.
|
|
@@ -3211,6 +3836,7 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
3211
3836
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
3212
3837
|
mirage?: boolean;
|
|
3213
3838
|
polish?: "lossy" | "lossless" | "off";
|
|
3839
|
+
r2?: RequestInitCfPropertiesR2;
|
|
3214
3840
|
/**
|
|
3215
3841
|
* Redirects the request to an alternate origin server. You can use this,
|
|
3216
3842
|
* for example, to implement load balancing across several origins.
|
|
@@ -3395,6 +4021,12 @@ export interface RequestInitCfPropertiesImageMinify {
|
|
|
3395
4021
|
css?: boolean;
|
|
3396
4022
|
html?: boolean;
|
|
3397
4023
|
}
|
|
4024
|
+
export interface RequestInitCfPropertiesR2 {
|
|
4025
|
+
/**
|
|
4026
|
+
* Colo id of bucket that an object is stored in
|
|
4027
|
+
*/
|
|
4028
|
+
bucketColoId?: number;
|
|
4029
|
+
}
|
|
3398
4030
|
/**
|
|
3399
4031
|
* Request metadata provided by Cloudflare's edge.
|
|
3400
4032
|
*/
|
|
@@ -3787,7 +4419,7 @@ export interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
|
|
|
3787
4419
|
certNotAfter: "";
|
|
3788
4420
|
}
|
|
3789
4421
|
/** Possible outcomes of TLS verification */
|
|
3790
|
-
export type CertVerificationStatus =
|
|
4422
|
+
export declare type CertVerificationStatus =
|
|
3791
4423
|
/** Authentication succeeded */
|
|
3792
4424
|
| "SUCCESS"
|
|
3793
4425
|
/** No certificate was presented */
|
|
@@ -3805,7 +4437,7 @@ export type CertVerificationStatus =
|
|
|
3805
4437
|
/**
|
|
3806
4438
|
* An upstream endpoint's response to a TCP `keepalive` message from Cloudflare.
|
|
3807
4439
|
*/
|
|
3808
|
-
export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
4440
|
+
export declare type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
3809
4441
|
| 0 /** Unknown */
|
|
3810
4442
|
| 1 /** no keepalives (not found) */
|
|
3811
4443
|
| 2 /** no connection re-use, opening keepalive connection failed */
|
|
@@ -3813,7 +4445,7 @@ export type IncomingRequestCfPropertiesEdgeRequestKeepAliveStatus =
|
|
|
3813
4445
|
| 4 /** connection re-use, refused by the origin server (`TCP FIN`) */
|
|
3814
4446
|
| 5; /** connection re-use, accepted by the origin server */
|
|
3815
4447
|
/** ISO 3166-1 Alpha-2 codes */
|
|
3816
|
-
export type Iso3166Alpha2Code =
|
|
4448
|
+
export declare type Iso3166Alpha2Code =
|
|
3817
4449
|
| "AD"
|
|
3818
4450
|
| "AE"
|
|
3819
4451
|
| "AF"
|
|
@@ -4064,7 +4696,14 @@ export type Iso3166Alpha2Code =
|
|
|
4064
4696
|
| "ZM"
|
|
4065
4697
|
| "ZW";
|
|
4066
4698
|
/** The 2-letter continent codes Cloudflare uses */
|
|
4067
|
-
export type ContinentCode =
|
|
4699
|
+
export declare type ContinentCode =
|
|
4700
|
+
| "AF"
|
|
4701
|
+
| "AN"
|
|
4702
|
+
| "AS"
|
|
4703
|
+
| "EU"
|
|
4704
|
+
| "NA"
|
|
4705
|
+
| "OC"
|
|
4706
|
+
| "SA";
|
|
4068
4707
|
export type CfProperties<HostMetadata = unknown> =
|
|
4069
4708
|
| IncomingRequestCfProperties<HostMetadata>
|
|
4070
4709
|
| RequestInitCfProperties;
|
|
@@ -4165,7 +4804,7 @@ export interface SendEmail {
|
|
|
4165
4804
|
export declare abstract class EmailEvent extends ExtendableEvent {
|
|
4166
4805
|
readonly message: ForwardableEmailMessage;
|
|
4167
4806
|
}
|
|
4168
|
-
export type EmailExportedHandler<Env = unknown> = (
|
|
4807
|
+
export declare type EmailExportedHandler<Env = unknown> = (
|
|
4169
4808
|
message: ForwardableEmailMessage,
|
|
4170
4809
|
env: Env,
|
|
4171
4810
|
ctx: ExecutionContext,
|
|
@@ -4294,6 +4933,20 @@ export interface JsonWebKeyWithKid extends JsonWebKey {
|
|
|
4294
4933
|
// Key Identifier of the JWK
|
|
4295
4934
|
readonly kid: string;
|
|
4296
4935
|
}
|
|
4936
|
+
export interface RateLimitOptions {
|
|
4937
|
+
key: string;
|
|
4938
|
+
}
|
|
4939
|
+
export interface RateLimitOutcome {
|
|
4940
|
+
success: boolean;
|
|
4941
|
+
}
|
|
4942
|
+
export interface RateLimit {
|
|
4943
|
+
/**
|
|
4944
|
+
* Rate limit a request based on the provided options.
|
|
4945
|
+
* @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
|
|
4946
|
+
* @returns A promise that resolves with the outcome of the rate limit.
|
|
4947
|
+
*/
|
|
4948
|
+
limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
|
|
4949
|
+
}
|
|
4297
4950
|
// Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
|
|
4298
4951
|
// to referenced by `Fetcher`. This is included in the "importable" version of the types which
|
|
4299
4952
|
// strips all `module` blocks.
|
|
@@ -4557,6 +5210,15 @@ export interface VectorizeVectorMutation {
|
|
|
4557
5210
|
/* Total count of the number of processed vectors. */
|
|
4558
5211
|
count: number;
|
|
4559
5212
|
}
|
|
5213
|
+
/**
|
|
5214
|
+
* Results of an operation that performed a mutation on a set of vectors
|
|
5215
|
+
* with the v2 version of Vectorize.
|
|
5216
|
+
* Here, `mutationId` is the identifier for the last mutation processed by Vectorize.
|
|
5217
|
+
*/
|
|
5218
|
+
export interface VectorizeVectorMutationV2 {
|
|
5219
|
+
/* The identifier for the last mutation processed by Vectorize. */
|
|
5220
|
+
mutationId: string;
|
|
5221
|
+
}
|
|
4560
5222
|
export declare abstract class VectorizeIndex {
|
|
4561
5223
|
/**
|
|
4562
5224
|
* Get information about the currently bound index.
|
|
@@ -4607,6 +5269,8 @@ export type WorkerVersionMetadata = {
|
|
|
4607
5269
|
id: string;
|
|
4608
5270
|
/** The tag of the Worker Version using this binding */
|
|
4609
5271
|
tag: string;
|
|
5272
|
+
/** The timestamp of when the Worker Version was uploaded */
|
|
5273
|
+
timestamp: string;
|
|
4610
5274
|
};
|
|
4611
5275
|
export interface DynamicDispatchLimits {
|
|
4612
5276
|
/**
|