@cloudflare/workers-types 4.20240701.0 → 4.20240718.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
  declare class DOMException extends Error {
18
23
  constructor(message?: string, name?: string);
19
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
24
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
20
25
  readonly message: string;
21
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
26
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
22
27
  readonly name: string;
23
28
  /**
24
29
  * @deprecated
@@ -54,7 +59,7 @@ declare class DOMException extends Error {
54
59
  get stack(): any;
55
60
  set stack(value: any);
56
61
  }
57
- declare type WorkerGlobalScopeEventMap = {
62
+ type WorkerGlobalScopeEventMap = {
58
63
  fetch: FetchEvent;
59
64
  scheduled: ScheduledEvent;
60
65
  queue: QueueEvent;
@@ -64,50 +69,50 @@ declare type WorkerGlobalScopeEventMap = {
64
69
  declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {
65
70
  EventTarget: typeof EventTarget;
66
71
  }
67
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
68
- declare interface Console {
72
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
73
+ interface Console {
69
74
  "assert"(condition?: boolean, ...data: any[]): void;
70
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
75
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
71
76
  clear(): void;
72
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
77
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
73
78
  count(label?: string): void;
74
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */
79
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */
75
80
  countReset(label?: string): void;
76
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
81
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
77
82
  debug(...data: any[]): void;
78
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
83
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
79
84
  dir(item?: any, options?: any): void;
80
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
85
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
81
86
  dirxml(...data: any[]): void;
82
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
87
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
83
88
  error(...data: any[]): void;
84
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
89
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
85
90
  group(...data: any[]): void;
86
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */
91
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */
87
92
  groupCollapsed(...data: any[]): void;
88
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */
93
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */
89
94
  groupEnd(): void;
90
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
95
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
91
96
  info(...data: any[]): void;
92
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
97
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
93
98
  log(...data: any[]): void;
94
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
99
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
95
100
  table(tabularData?: any, properties?: string[]): void;
96
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
101
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
97
102
  time(label?: string): void;
98
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */
103
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */
99
104
  timeEnd(label?: string): void;
100
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */
105
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */
101
106
  timeLog(label?: string, ...data: any[]): void;
102
107
  timeStamp(label?: string): void;
103
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
108
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
104
109
  trace(...data: any[]): void;
105
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
110
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
106
111
  warn(...data: any[]): void;
107
112
  }
108
113
  declare const console: Console;
109
- declare type BufferSource = ArrayBufferView | ArrayBuffer;
110
- declare type TypedArray =
114
+ type BufferSource = ArrayBufferView | ArrayBuffer;
115
+ type TypedArray =
111
116
  | Int8Array
112
117
  | Uint8Array
113
118
  | Uint8ClampedArray
@@ -195,10 +200,11 @@ declare namespace WebAssembly {
195
200
  }
196
201
  /**
197
202
  * This ServiceWorker API interface represents the global execution context of a service worker.
203
+ * Available only in secure contexts.
198
204
  *
199
205
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
200
206
  */
201
- declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
207
+ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
202
208
  DOMException: typeof DOMException;
203
209
  WorkerGlobalScope: typeof WorkerGlobalScope;
204
210
  btoa(data: string): string;
@@ -279,16 +285,16 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
279
285
  FixedLengthStream: typeof FixedLengthStream;
280
286
  IdentityTransformStream: typeof IdentityTransformStream;
281
287
  HTMLRewriter: typeof HTMLRewriter;
282
- GPUAdapter: typeof gpuGPUAdapter;
283
- GPUOutOfMemoryError: typeof gpuGPUOutOfMemoryError;
284
- GPUValidationError: typeof gpuGPUValidationError;
285
- GPUInternalError: typeof gpuGPUInternalError;
286
- GPUDeviceLostInfo: typeof gpuGPUDeviceLostInfo;
287
- GPUBufferUsage: typeof gpuGPUBufferUsage;
288
- GPUShaderStage: typeof gpuGPUShaderStage;
289
- GPUMapMode: typeof gpuGPUMapMode;
290
- GPUTextureUsage: typeof gpuGPUTextureUsage;
291
- GPUColorWrite: typeof gpuGPUColorWrite;
288
+ GPUAdapter: typeof GPUAdapter;
289
+ GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
290
+ GPUValidationError: typeof GPUValidationError;
291
+ GPUInternalError: typeof GPUInternalError;
292
+ GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
293
+ GPUBufferUsage: typeof GPUBufferUsage;
294
+ GPUShaderStage: typeof GPUShaderStage;
295
+ GPUMapMode: typeof GPUMapMode;
296
+ GPUTextureUsage: typeof GPUTextureUsage;
297
+ GPUColorWrite: typeof GPUColorWrite;
292
298
  }
293
299
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
294
300
  type: Type,
@@ -310,95 +316,111 @@ declare function removeEventListener<
310
316
  declare function dispatchEvent(
311
317
  event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
312
318
  ): boolean;
313
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
319
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
314
320
  declare function btoa(data: string): string;
315
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
321
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
316
322
  declare function atob(data: string): string;
317
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
323
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
318
324
  declare function setTimeout(
319
325
  callback: (...args: any[]) => void,
320
326
  msDelay?: number,
321
327
  ): number;
322
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
328
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
323
329
  declare function setTimeout<Args extends any[]>(
324
330
  callback: (...args: Args) => void,
325
331
  msDelay?: number,
326
332
  ...args: Args
327
333
  ): number;
328
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
334
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
329
335
  declare function clearTimeout(timeoutId: number | null): void;
330
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
336
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
331
337
  declare function setInterval(
332
338
  callback: (...args: any[]) => void,
333
339
  msDelay?: number,
334
340
  ): number;
335
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
341
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
336
342
  declare function setInterval<Args extends any[]>(
337
343
  callback: (...args: Args) => void,
338
344
  msDelay?: number,
339
345
  ...args: Args
340
346
  ): number;
341
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
347
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
342
348
  declare function clearInterval(timeoutId: number | null): void;
343
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
349
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
344
350
  declare function queueMicrotask(task: Function): void;
345
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
351
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
346
352
  declare function structuredClone<T>(
347
353
  value: T,
348
354
  options?: StructuredSerializeOptions,
349
355
  ): T;
350
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
356
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
351
357
  declare function reportError(error: any): void;
352
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
358
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
353
359
  declare function fetch(
354
360
  input: RequestInfo,
355
361
  init?: RequestInit<RequestInitCfProperties>,
356
362
  ): Promise<Response>;
357
363
  declare const self: ServiceWorkerGlobalScope;
364
+ /**
365
+ * The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
366
+ * The Workers runtime implements the full surface of this API, but with some differences in
367
+ * the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
368
+ * compared to those implemented in most browsers.
369
+ *
370
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
371
+ */
358
372
  declare const crypto: Crypto;
373
+ /**
374
+ * The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
375
+ *
376
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
377
+ */
359
378
  declare const caches: CacheStorage;
360
379
  declare const scheduler: Scheduler;
380
+ /**
381
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
382
+ * as well as timing of subrequests and other operations.
383
+ *
384
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
385
+ */
361
386
  declare const performance: Performance;
362
387
  declare const origin: string;
363
- declare interface TestController {}
364
- declare interface ExecutionContext {
388
+ interface TestController {}
389
+ interface ExecutionContext {
365
390
  waitUntil(promise: Promise<any>): void;
366
391
  passThroughOnException(): void;
367
392
  }
368
- declare type ExportedHandlerFetchHandler<
369
- Env = unknown,
370
- CfHostMetadata = unknown,
371
- > = (
393
+ type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (
372
394
  request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>,
373
395
  env: Env,
374
396
  ctx: ExecutionContext,
375
397
  ) => Response | Promise<Response>;
376
- declare type ExportedHandlerTailHandler<Env = unknown> = (
398
+ type ExportedHandlerTailHandler<Env = unknown> = (
377
399
  events: TraceItem[],
378
400
  env: Env,
379
401
  ctx: ExecutionContext,
380
402
  ) => void | Promise<void>;
381
- declare type ExportedHandlerTraceHandler<Env = unknown> = (
403
+ type ExportedHandlerTraceHandler<Env = unknown> = (
382
404
  traces: TraceItem[],
383
405
  env: Env,
384
406
  ctx: ExecutionContext,
385
407
  ) => void | Promise<void>;
386
- declare type ExportedHandlerScheduledHandler<Env = unknown> = (
408
+ type ExportedHandlerScheduledHandler<Env = unknown> = (
387
409
  controller: ScheduledController,
388
410
  env: Env,
389
411
  ctx: ExecutionContext,
390
412
  ) => void | Promise<void>;
391
- declare type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (
413
+ type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (
392
414
  batch: MessageBatch<Message>,
393
415
  env: Env,
394
416
  ctx: ExecutionContext,
395
417
  ) => void | Promise<void>;
396
- declare type ExportedHandlerTestHandler<Env = unknown> = (
418
+ type ExportedHandlerTestHandler<Env = unknown> = (
397
419
  controller: TestController,
398
420
  env: Env,
399
421
  ctx: ExecutionContext,
400
422
  ) => void | Promise<void>;
401
- declare interface ExportedHandler<
423
+ interface ExportedHandler<
402
424
  Env = unknown,
403
425
  QueueHandlerMessage = unknown,
404
426
  CfHostMetadata = unknown,
@@ -411,31 +433,33 @@ declare interface ExportedHandler<
411
433
  email?: EmailExportedHandler<Env>;
412
434
  queue?: ExportedHandlerQueueHandler<Env, QueueHandlerMessage>;
413
435
  }
414
- declare interface StructuredSerializeOptions {
436
+ interface StructuredSerializeOptions {
415
437
  transfer?: any[];
416
438
  }
439
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
417
440
  declare abstract class PromiseRejectionEvent extends Event {
418
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
441
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
419
442
  readonly promise: Promise<any>;
420
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
443
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
421
444
  readonly reason: any;
422
445
  }
423
446
  /**
424
- * Provides access to performance-related information for the current page. It's part of the High Resolution Time API, but is enhanced by the Performance Timeline API, the Navigation Timing API, the User Timing API, and the Resource Timing API.
447
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
448
+ * as well as timing of subrequests and other operations.
425
449
  *
426
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance)
450
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
427
451
  */
428
- declare interface Performance {
429
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin) */
452
+ interface Performance {
453
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
430
454
  readonly timeOrigin: number;
431
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/now) */
455
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
432
456
  now(): number;
433
457
  }
434
- declare interface AlarmInvocationInfo {
458
+ interface AlarmInvocationInfo {
435
459
  readonly isRetry: boolean;
436
460
  readonly retryCount: number;
437
461
  }
438
- declare interface DurableObject {
462
+ interface DurableObject {
439
463
  fetch(request: Request): Response | Promise<Response>;
440
464
  alarm?(): void | Promise<void>;
441
465
  webSocketMessage?(
@@ -450,7 +474,7 @@ declare interface DurableObject {
450
474
  ): void | Promise<void>;
451
475
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
452
476
  }
453
- declare type DurableObjectStub<
477
+ type DurableObjectStub<
454
478
  T extends Rpc.DurableObjectBranded | undefined = undefined,
455
479
  > = Fetcher<
456
480
  T,
@@ -459,12 +483,12 @@ declare type DurableObjectStub<
459
483
  readonly id: DurableObjectId;
460
484
  readonly name?: string;
461
485
  };
462
- declare interface DurableObjectId {
486
+ interface DurableObjectId {
463
487
  toString(): string;
464
488
  equals(other: DurableObjectId): boolean;
465
489
  readonly name?: string;
466
490
  }
467
- declare interface DurableObjectNamespace<
491
+ interface DurableObjectNamespace<
468
492
  T extends Rpc.DurableObjectBranded | undefined = undefined,
469
493
  > {
470
494
  newUniqueId(
@@ -480,11 +504,11 @@ declare interface DurableObjectNamespace<
480
504
  jurisdiction: DurableObjectJurisdiction,
481
505
  ): DurableObjectNamespace<T>;
482
506
  }
483
- declare type DurableObjectJurisdiction = "eu" | "fedramp";
484
- declare interface DurableObjectNamespaceNewUniqueIdOptions {
507
+ type DurableObjectJurisdiction = "eu" | "fedramp";
508
+ interface DurableObjectNamespaceNewUniqueIdOptions {
485
509
  jurisdiction?: DurableObjectJurisdiction;
486
510
  }
487
- declare type DurableObjectLocationHint =
511
+ type DurableObjectLocationHint =
488
512
  | "wnam"
489
513
  | "enam"
490
514
  | "sam"
@@ -494,10 +518,10 @@ declare type DurableObjectLocationHint =
494
518
  | "oc"
495
519
  | "afr"
496
520
  | "me";
497
- declare interface DurableObjectNamespaceGetDurableObjectOptions {
521
+ interface DurableObjectNamespaceGetDurableObjectOptions {
498
522
  locationHint?: DurableObjectLocationHint;
499
523
  }
500
- declare interface DurableObjectState {
524
+ interface DurableObjectState {
501
525
  waitUntil(promise: Promise<any>): void;
502
526
  readonly id: DurableObjectId;
503
527
  readonly storage: DurableObjectStorage;
@@ -511,7 +535,7 @@ declare interface DurableObjectState {
511
535
  getHibernatableWebSocketEventTimeout(): number | null;
512
536
  getTags(ws: WebSocket): string[];
513
537
  }
514
- declare interface DurableObjectTransaction {
538
+ interface DurableObjectTransaction {
515
539
  get<T = unknown>(
516
540
  key: string,
517
541
  options?: DurableObjectGetOptions,
@@ -542,7 +566,7 @@ declare interface DurableObjectTransaction {
542
566
  ): Promise<void>;
543
567
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
544
568
  }
545
- declare interface DurableObjectStorage {
569
+ interface DurableObjectStorage {
546
570
  get<T = unknown>(
547
571
  key: string,
548
572
  options?: DurableObjectGetOptions,
@@ -578,7 +602,7 @@ declare interface DurableObjectStorage {
578
602
  sync(): Promise<void>;
579
603
  transactionSync<T>(closure: () => T): T;
580
604
  }
581
- declare interface DurableObjectListOptions {
605
+ interface DurableObjectListOptions {
582
606
  start?: string;
583
607
  startAfter?: string;
584
608
  end?: string;
@@ -588,19 +612,19 @@ declare interface DurableObjectListOptions {
588
612
  allowConcurrency?: boolean;
589
613
  noCache?: boolean;
590
614
  }
591
- declare interface DurableObjectGetOptions {
615
+ interface DurableObjectGetOptions {
592
616
  allowConcurrency?: boolean;
593
617
  noCache?: boolean;
594
618
  }
595
- declare interface DurableObjectGetAlarmOptions {
619
+ interface DurableObjectGetAlarmOptions {
596
620
  allowConcurrency?: boolean;
597
621
  }
598
- declare interface DurableObjectPutOptions {
622
+ interface DurableObjectPutOptions {
599
623
  allowConcurrency?: boolean;
600
624
  allowUnconfirmed?: boolean;
601
625
  noCache?: boolean;
602
626
  }
603
- declare interface DurableObjectSetAlarmOptions {
627
+ interface DurableObjectSetAlarmOptions {
604
628
  allowConcurrency?: boolean;
605
629
  allowUnconfirmed?: boolean;
606
630
  }
@@ -609,14 +633,19 @@ declare class WebSocketRequestResponsePair {
609
633
  get request(): string;
610
634
  get response(): string;
611
635
  }
612
- declare interface AnalyticsEngineDataset {
636
+ interface AnalyticsEngineDataset {
613
637
  writeDataPoint(event?: AnalyticsEngineDataPoint): void;
614
638
  }
615
- declare interface AnalyticsEngineDataPoint {
639
+ interface AnalyticsEngineDataPoint {
616
640
  indexes?: ((ArrayBuffer | string) | null)[];
617
641
  doubles?: number[];
618
642
  blobs?: ((ArrayBuffer | string) | null)[];
619
643
  }
644
+ /**
645
+ * An event which takes place in the DOM.
646
+ *
647
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
648
+ */
620
649
  declare class Event {
621
650
  constructor(type: string, init?: EventInit);
622
651
  /**
@@ -720,20 +749,25 @@ declare class Event {
720
749
  static readonly AT_TARGET: number;
721
750
  static readonly BUBBLING_PHASE: number;
722
751
  }
723
- declare interface EventInit {
752
+ interface EventInit {
724
753
  bubbles?: boolean;
725
754
  cancelable?: boolean;
726
755
  composed?: boolean;
727
756
  }
728
- declare type EventListener<EventType extends Event = Event> = (
757
+ type EventListener<EventType extends Event = Event> = (
729
758
  event: EventType,
730
759
  ) => void;
731
- declare interface EventListenerObject<EventType extends Event = Event> {
760
+ interface EventListenerObject<EventType extends Event = Event> {
732
761
  handleEvent(event: EventType): void;
733
762
  }
734
- declare type EventListenerOrEventListenerObject<
735
- EventType extends Event = Event,
736
- > = EventListener<EventType> | EventListenerObject<EventType>;
763
+ type EventListenerOrEventListenerObject<EventType extends Event = Event> =
764
+ | EventListener<EventType>
765
+ | EventListenerObject<EventType>;
766
+ /**
767
+ * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
768
+ *
769
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
770
+ */
737
771
  declare class EventTarget<
738
772
  EventMap extends Record<string, Event> = Record<string, Event>,
739
773
  > {
@@ -777,18 +811,23 @@ declare class EventTarget<
777
811
  */
778
812
  dispatchEvent(event: EventMap[keyof EventMap]): boolean;
779
813
  }
780
- declare interface EventTargetEventListenerOptions {
814
+ interface EventTargetEventListenerOptions {
781
815
  capture?: boolean;
782
816
  }
783
- declare interface EventTargetAddEventListenerOptions {
817
+ interface EventTargetAddEventListenerOptions {
784
818
  capture?: boolean;
785
819
  passive?: boolean;
786
820
  once?: boolean;
787
821
  signal?: AbortSignal;
788
822
  }
789
- declare interface EventTargetHandlerObject {
823
+ interface EventTargetHandlerObject {
790
824
  handleEvent: (event: Event) => any | undefined;
791
825
  }
826
+ /**
827
+ * A controller object that allows you to abort one or more DOM requests as and when desired.
828
+ *
829
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
830
+ */
792
831
  declare class AbortController {
793
832
  constructor();
794
833
  /**
@@ -804,11 +843,17 @@ declare class AbortController {
804
843
  */
805
844
  abort(reason?: any): void;
806
845
  }
846
+ /**
847
+ * 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.
848
+ *
849
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
850
+ */
807
851
  declare abstract class AbortSignal extends EventTarget {
808
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
852
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
809
853
  static abort(reason?: any): AbortSignal;
810
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
854
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
811
855
  static timeout(delay: number): AbortSignal;
856
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
812
857
  static any(signals: AbortSignal[]): AbortSignal;
813
858
  /**
814
859
  * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
@@ -816,25 +861,31 @@ declare abstract class AbortSignal extends EventTarget {
816
861
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
817
862
  */
818
863
  readonly aborted: boolean;
819
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
864
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
820
865
  readonly reason: any;
821
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
866
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
822
867
  get onabort(): any | null;
823
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
868
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
824
869
  set onabort(value: any | null);
825
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
870
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
826
871
  throwIfAborted(): void;
827
872
  }
828
- declare interface Scheduler {
873
+ interface Scheduler {
829
874
  wait(delay: number, maybeOptions?: SchedulerWaitOptions): Promise<void>;
830
875
  }
831
- declare interface SchedulerWaitOptions {
876
+ interface SchedulerWaitOptions {
832
877
  signal?: AbortSignal;
833
878
  }
879
+ /**
880
+ * 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.
881
+ *
882
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
883
+ */
834
884
  declare abstract class ExtendableEvent extends Event {
835
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
885
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
836
886
  waitUntil(promise: Promise<any>): void;
837
887
  }
888
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
838
889
  declare class CustomEvent<T = any> extends Event {
839
890
  constructor(type: string, init?: CustomEventCustomEventInit);
840
891
  /**
@@ -844,65 +895,96 @@ declare class CustomEvent<T = any> extends Event {
844
895
  */
845
896
  get detail(): T;
846
897
  }
847
- declare interface CustomEventCustomEventInit {
898
+ interface CustomEventCustomEventInit {
848
899
  bubbles?: boolean;
849
900
  cancelable?: boolean;
850
901
  composed?: boolean;
851
902
  detail?: any;
852
903
  }
904
+ /**
905
+ * 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.
906
+ *
907
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
908
+ */
853
909
  declare class Blob {
854
910
  constructor(
855
911
  type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
856
912
  options?: BlobOptions,
857
913
  );
858
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
914
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
859
915
  readonly size: number;
860
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
916
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
861
917
  readonly type: string;
862
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
918
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
863
919
  slice(start?: number, end?: number, type?: string): Blob;
864
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
920
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
865
921
  arrayBuffer(): Promise<ArrayBuffer>;
866
922
  bytes(): Promise<Uint8Array>;
867
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
923
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
868
924
  text(): Promise<string>;
869
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
925
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
870
926
  stream(): ReadableStream;
871
927
  }
872
- declare interface BlobOptions {
928
+ interface BlobOptions {
873
929
  type?: string;
874
930
  }
931
+ /**
932
+ * Provides information about files and allows JavaScript in a web page to access their content.
933
+ *
934
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
935
+ */
875
936
  declare class File extends Blob {
876
937
  constructor(
877
938
  bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
878
939
  name: string,
879
940
  options?: FileOptions,
880
941
  );
881
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
942
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
882
943
  readonly name: string;
883
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
944
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
884
945
  readonly lastModified: number;
885
946
  }
886
- declare interface FileOptions {
947
+ interface FileOptions {
887
948
  type?: string;
888
949
  lastModified?: number;
889
950
  }
951
+ /**
952
+ * The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
953
+ *
954
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
955
+ */
890
956
  declare abstract class CacheStorage {
891
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
957
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
892
958
  open(cacheName: string): Promise<Cache>;
893
959
  readonly default: Cache;
894
960
  }
961
+ /**
962
+ * The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
963
+ *
964
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
965
+ */
895
966
  declare abstract class Cache {
967
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
896
968
  delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
969
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
897
970
  match(
898
971
  request: RequestInfo,
899
972
  options?: CacheQueryOptions,
900
973
  ): Promise<Response | undefined>;
974
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
901
975
  put(request: RequestInfo, response: Response): Promise<void>;
902
976
  }
903
- declare interface CacheQueryOptions {
977
+ interface CacheQueryOptions {
904
978
  ignoreMethod?: boolean;
905
979
  }
980
+ /**
981
+ * The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
982
+ * The Workers runtime implements the full surface of this API, but with some differences in
983
+ * the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
984
+ * compared to those implemented in most browsers.
985
+ *
986
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
987
+ */
906
988
  declare abstract class Crypto {
907
989
  /**
908
990
  * Available only in secure contexts.
@@ -910,7 +992,7 @@ declare abstract class Crypto {
910
992
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
911
993
  */
912
994
  readonly subtle: SubtleCrypto;
913
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
995
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
914
996
  getRandomValues<
915
997
  T extends
916
998
  | Int8Array
@@ -930,39 +1012,50 @@ declare abstract class Crypto {
930
1012
  randomUUID(): string;
931
1013
  DigestStream: typeof DigestStream;
932
1014
  }
1015
+ /**
1016
+ * 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).
1017
+ * Available only in secure contexts.
1018
+ *
1019
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
1020
+ */
933
1021
  declare abstract class SubtleCrypto {
1022
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
934
1023
  encrypt(
935
1024
  algorithm: string | SubtleCryptoEncryptAlgorithm,
936
1025
  key: CryptoKey,
937
1026
  plainText: ArrayBuffer | ArrayBufferView,
938
1027
  ): Promise<ArrayBuffer>;
1028
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
939
1029
  decrypt(
940
1030
  algorithm: string | SubtleCryptoEncryptAlgorithm,
941
1031
  key: CryptoKey,
942
1032
  cipherText: ArrayBuffer | ArrayBufferView,
943
1033
  ): Promise<ArrayBuffer>;
1034
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
944
1035
  sign(
945
1036
  algorithm: string | SubtleCryptoSignAlgorithm,
946
1037
  key: CryptoKey,
947
1038
  data: ArrayBuffer | ArrayBufferView,
948
1039
  ): Promise<ArrayBuffer>;
1040
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
949
1041
  verify(
950
1042
  algorithm: string | SubtleCryptoSignAlgorithm,
951
1043
  key: CryptoKey,
952
1044
  signature: ArrayBuffer | ArrayBufferView,
953
1045
  data: ArrayBuffer | ArrayBufferView,
954
1046
  ): Promise<boolean>;
1047
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
955
1048
  digest(
956
1049
  algorithm: string | SubtleCryptoHashAlgorithm,
957
1050
  data: ArrayBuffer | ArrayBufferView,
958
1051
  ): Promise<ArrayBuffer>;
959
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
1052
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
960
1053
  generateKey(
961
1054
  algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
962
1055
  extractable: boolean,
963
1056
  keyUsages: string[],
964
1057
  ): Promise<CryptoKey | CryptoKeyPair>;
965
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
1058
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
966
1059
  deriveKey(
967
1060
  algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
968
1061
  baseKey: CryptoKey,
@@ -970,12 +1063,13 @@ declare abstract class SubtleCrypto {
970
1063
  extractable: boolean,
971
1064
  keyUsages: string[],
972
1065
  ): Promise<CryptoKey>;
1066
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
973
1067
  deriveBits(
974
1068
  algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
975
1069
  baseKey: CryptoKey,
976
- length: number | null,
1070
+ length?: number | null,
977
1071
  ): Promise<ArrayBuffer>;
978
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
1072
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
979
1073
  importKey(
980
1074
  format: string,
981
1075
  keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
@@ -983,14 +1077,16 @@ declare abstract class SubtleCrypto {
983
1077
  extractable: boolean,
984
1078
  keyUsages: string[],
985
1079
  ): Promise<CryptoKey>;
1080
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
986
1081
  exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
1082
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
987
1083
  wrapKey(
988
1084
  format: string,
989
1085
  key: CryptoKey,
990
1086
  wrappingKey: CryptoKey,
991
1087
  wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
992
1088
  ): Promise<ArrayBuffer>;
993
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
1089
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
994
1090
  unwrapKey(
995
1091
  format: string,
996
1092
  wrappedKey: ArrayBuffer | ArrayBufferView,
@@ -1005,12 +1101,18 @@ declare abstract class SubtleCrypto {
1005
1101
  b: ArrayBuffer | ArrayBufferView,
1006
1102
  ): boolean;
1007
1103
  }
1104
+ /**
1105
+ * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
1106
+ * Available only in secure contexts.
1107
+ *
1108
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
1109
+ */
1008
1110
  declare abstract class CryptoKey {
1009
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
1111
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
1010
1112
  readonly type: string;
1011
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
1113
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
1012
1114
  readonly extractable: boolean;
1013
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
1115
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
1014
1116
  readonly algorithm:
1015
1117
  | CryptoKeyKeyAlgorithm
1016
1118
  | CryptoKeyAesKeyAlgorithm
@@ -1018,14 +1120,14 @@ declare abstract class CryptoKey {
1018
1120
  | CryptoKeyRsaKeyAlgorithm
1019
1121
  | CryptoKeyEllipticKeyAlgorithm
1020
1122
  | CryptoKeyArbitraryKeyAlgorithm;
1021
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
1123
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
1022
1124
  readonly usages: string[];
1023
1125
  }
1024
- declare interface CryptoKeyPair {
1126
+ interface CryptoKeyPair {
1025
1127
  publicKey: CryptoKey;
1026
1128
  privateKey: CryptoKey;
1027
1129
  }
1028
- declare interface JsonWebKey {
1130
+ interface JsonWebKey {
1029
1131
  kty: string;
1030
1132
  use?: string;
1031
1133
  key_ops?: string[];
@@ -1045,12 +1147,12 @@ declare interface JsonWebKey {
1045
1147
  oth?: RsaOtherPrimesInfo[];
1046
1148
  k?: string;
1047
1149
  }
1048
- declare interface RsaOtherPrimesInfo {
1150
+ interface RsaOtherPrimesInfo {
1049
1151
  r?: string;
1050
1152
  d?: string;
1051
1153
  t?: string;
1052
1154
  }
1053
- declare interface SubtleCryptoDeriveKeyAlgorithm {
1155
+ interface SubtleCryptoDeriveKeyAlgorithm {
1054
1156
  name: string;
1055
1157
  salt?: ArrayBuffer;
1056
1158
  iterations?: number;
@@ -1058,7 +1160,7 @@ declare interface SubtleCryptoDeriveKeyAlgorithm {
1058
1160
  $public?: CryptoKey;
1059
1161
  info?: ArrayBuffer;
1060
1162
  }
1061
- declare interface SubtleCryptoEncryptAlgorithm {
1163
+ interface SubtleCryptoEncryptAlgorithm {
1062
1164
  name: string;
1063
1165
  iv?: ArrayBuffer;
1064
1166
  additionalData?: ArrayBuffer;
@@ -1067,7 +1169,7 @@ declare interface SubtleCryptoEncryptAlgorithm {
1067
1169
  length?: number;
1068
1170
  label?: ArrayBuffer;
1069
1171
  }
1070
- declare interface SubtleCryptoGenerateKeyAlgorithm {
1172
+ interface SubtleCryptoGenerateKeyAlgorithm {
1071
1173
  name: string;
1072
1174
  hash?: string | SubtleCryptoHashAlgorithm;
1073
1175
  modulusLength?: number;
@@ -1075,45 +1177,45 @@ declare interface SubtleCryptoGenerateKeyAlgorithm {
1075
1177
  length?: number;
1076
1178
  namedCurve?: string;
1077
1179
  }
1078
- declare interface SubtleCryptoHashAlgorithm {
1180
+ interface SubtleCryptoHashAlgorithm {
1079
1181
  name: string;
1080
1182
  }
1081
- declare interface SubtleCryptoImportKeyAlgorithm {
1183
+ interface SubtleCryptoImportKeyAlgorithm {
1082
1184
  name: string;
1083
1185
  hash?: string | SubtleCryptoHashAlgorithm;
1084
1186
  length?: number;
1085
1187
  namedCurve?: string;
1086
1188
  compressed?: boolean;
1087
1189
  }
1088
- declare interface SubtleCryptoSignAlgorithm {
1190
+ interface SubtleCryptoSignAlgorithm {
1089
1191
  name: string;
1090
1192
  hash?: string | SubtleCryptoHashAlgorithm;
1091
1193
  dataLength?: number;
1092
1194
  saltLength?: number;
1093
1195
  }
1094
- declare interface CryptoKeyKeyAlgorithm {
1196
+ interface CryptoKeyKeyAlgorithm {
1095
1197
  name: string;
1096
1198
  }
1097
- declare interface CryptoKeyAesKeyAlgorithm {
1199
+ interface CryptoKeyAesKeyAlgorithm {
1098
1200
  name: string;
1099
1201
  length: number;
1100
1202
  }
1101
- declare interface CryptoKeyHmacKeyAlgorithm {
1203
+ interface CryptoKeyHmacKeyAlgorithm {
1102
1204
  name: string;
1103
1205
  hash: CryptoKeyKeyAlgorithm;
1104
1206
  length: number;
1105
1207
  }
1106
- declare interface CryptoKeyRsaKeyAlgorithm {
1208
+ interface CryptoKeyRsaKeyAlgorithm {
1107
1209
  name: string;
1108
1210
  modulusLength: number;
1109
1211
  publicExponent: ArrayBuffer | (ArrayBuffer | ArrayBufferView);
1110
1212
  hash?: CryptoKeyKeyAlgorithm;
1111
1213
  }
1112
- declare interface CryptoKeyEllipticKeyAlgorithm {
1214
+ interface CryptoKeyEllipticKeyAlgorithm {
1113
1215
  name: string;
1114
1216
  namedCurve: string;
1115
1217
  }
1116
- declare interface CryptoKeyArbitraryKeyAlgorithm {
1218
+ interface CryptoKeyArbitraryKeyAlgorithm {
1117
1219
  name: string;
1118
1220
  hash?: CryptoKeyKeyAlgorithm;
1119
1221
  namedCurve?: string;
@@ -1126,6 +1228,11 @@ declare class DigestStream extends WritableStream<
1126
1228
  readonly digest: Promise<ArrayBuffer>;
1127
1229
  get bytesWritten(): number | bigint;
1128
1230
  }
1231
+ /**
1232
+ * 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.
1233
+ *
1234
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1235
+ */
1129
1236
  declare class TextDecoder {
1130
1237
  constructor(decoder?: string, options?: TextDecoderConstructorOptions);
1131
1238
  /**
@@ -1151,6 +1258,11 @@ declare class TextDecoder {
1151
1258
  readonly fatal: boolean;
1152
1259
  readonly ignoreBOM: boolean;
1153
1260
  }
1261
+ /**
1262
+ * 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.
1263
+ *
1264
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
1265
+ */
1154
1266
  declare class TextEncoder {
1155
1267
  constructor();
1156
1268
  /**
@@ -1170,52 +1282,70 @@ declare class TextEncoder {
1170
1282
  ): TextEncoderEncodeIntoResult;
1171
1283
  readonly encoding: string;
1172
1284
  }
1173
- declare interface TextDecoderConstructorOptions {
1285
+ interface TextDecoderConstructorOptions {
1174
1286
  fatal: boolean;
1175
1287
  ignoreBOM: boolean;
1176
1288
  }
1177
- declare interface TextDecoderDecodeOptions {
1289
+ interface TextDecoderDecodeOptions {
1178
1290
  stream: boolean;
1179
1291
  }
1180
- declare interface TextEncoderEncodeIntoResult {
1292
+ interface TextEncoderEncodeIntoResult {
1181
1293
  read: number;
1182
1294
  written: number;
1183
1295
  }
1296
+ /**
1297
+ * Events providing information related to errors in scripts or in files.
1298
+ *
1299
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
1300
+ */
1184
1301
  declare class ErrorEvent extends Event {
1185
1302
  constructor(type: string, init?: ErrorEventErrorEventInit);
1186
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
1303
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
1187
1304
  get filename(): string;
1188
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
1305
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
1189
1306
  get message(): string;
1190
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
1307
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
1191
1308
  get lineno(): number;
1192
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
1309
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
1193
1310
  get colno(): number;
1194
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
1311
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
1195
1312
  get error(): any;
1196
1313
  }
1197
- declare interface ErrorEventErrorEventInit {
1314
+ interface ErrorEventErrorEventInit {
1198
1315
  message?: string;
1199
1316
  filename?: string;
1200
1317
  lineno?: number;
1201
1318
  colno?: number;
1202
1319
  error?: any;
1203
1320
  }
1321
+ /**
1322
+ * 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".
1323
+ *
1324
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
1325
+ */
1204
1326
  declare class FormData {
1205
1327
  constructor();
1328
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
1206
1329
  append(name: string, value: string): void;
1330
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
1207
1331
  append(name: string, value: Blob, filename?: string): void;
1332
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
1208
1333
  delete(name: string): void;
1334
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
1209
1335
  get(name: string): (File | string) | null;
1336
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
1210
1337
  getAll(name: string): (File | string)[];
1338
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
1211
1339
  has(name: string): boolean;
1340
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
1212
1341
  set(name: string, value: string): void;
1342
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
1213
1343
  set(name: string, value: Blob, filename?: string): void;
1214
- /** Returns an array of key, value pairs for every entry in the list. */
1344
+ /* Returns an array of key, value pairs for every entry in the list. */
1215
1345
  entries(): IterableIterator<[key: string, value: File | string]>;
1216
- /** Returns a list of keys in the list. */
1346
+ /* Returns a list of keys in the list. */
1217
1347
  keys(): IterableIterator<string>;
1218
- /** Returns a list of values in the list. */
1348
+ /* Returns a list of values in the list. */
1219
1349
  values(): IterableIterator<File | string>;
1220
1350
  forEach<This = unknown>(
1221
1351
  callback: (
@@ -1228,7 +1358,7 @@ declare class FormData {
1228
1358
  ): void;
1229
1359
  [Symbol.iterator](): IterableIterator<[key: string, value: File | string]>;
1230
1360
  }
1231
- declare interface ContentOptions {
1361
+ interface ContentOptions {
1232
1362
  html?: boolean;
1233
1363
  }
1234
1364
  declare class HTMLRewriter {
@@ -1240,23 +1370,23 @@ declare class HTMLRewriter {
1240
1370
  onDocument(handlers: HTMLRewriterDocumentContentHandlers): HTMLRewriter;
1241
1371
  transform(response: Response): Response;
1242
1372
  }
1243
- declare interface HTMLRewriterElementContentHandlers {
1373
+ interface HTMLRewriterElementContentHandlers {
1244
1374
  element?(element: Element): void | Promise<void>;
1245
1375
  comments?(comment: Comment): void | Promise<void>;
1246
1376
  text?(element: Text): void | Promise<void>;
1247
1377
  }
1248
- declare interface HTMLRewriterDocumentContentHandlers {
1378
+ interface HTMLRewriterDocumentContentHandlers {
1249
1379
  doctype?(doctype: Doctype): void | Promise<void>;
1250
1380
  comments?(comment: Comment): void | Promise<void>;
1251
1381
  text?(text: Text): void | Promise<void>;
1252
1382
  end?(end: DocumentEnd): void | Promise<void>;
1253
1383
  }
1254
- declare interface Doctype {
1384
+ interface Doctype {
1255
1385
  readonly name: string | null;
1256
1386
  readonly publicId: string | null;
1257
1387
  readonly systemId: string | null;
1258
1388
  }
1259
- declare interface Element {
1389
+ interface Element {
1260
1390
  tagName: string;
1261
1391
  readonly attributes: IterableIterator<string[]>;
1262
1392
  readonly removed: boolean;
@@ -1275,13 +1405,13 @@ declare interface Element {
1275
1405
  setInnerContent(content: string, options?: ContentOptions): Element;
1276
1406
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1277
1407
  }
1278
- declare interface EndTag {
1408
+ interface EndTag {
1279
1409
  name: string;
1280
1410
  before(content: string, options?: ContentOptions): EndTag;
1281
1411
  after(content: string, options?: ContentOptions): EndTag;
1282
1412
  remove(): EndTag;
1283
1413
  }
1284
- declare interface Comment {
1414
+ interface Comment {
1285
1415
  text: string;
1286
1416
  readonly removed: boolean;
1287
1417
  before(content: string, options?: ContentOptions): Comment;
@@ -1289,7 +1419,7 @@ declare interface Comment {
1289
1419
  replace(content: string, options?: ContentOptions): Comment;
1290
1420
  remove(): Comment;
1291
1421
  }
1292
- declare interface Text {
1422
+ interface Text {
1293
1423
  readonly text: string;
1294
1424
  readonly lastInTextNode: boolean;
1295
1425
  readonly removed: boolean;
@@ -1298,41 +1428,56 @@ declare interface Text {
1298
1428
  replace(content: string, options?: ContentOptions): Text;
1299
1429
  remove(): Text;
1300
1430
  }
1301
- declare interface DocumentEnd {
1431
+ interface DocumentEnd {
1302
1432
  append(content: string, options?: ContentOptions): DocumentEnd;
1303
1433
  }
1434
+ /**
1435
+ * 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.
1436
+ *
1437
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
1438
+ */
1304
1439
  declare abstract class FetchEvent extends ExtendableEvent {
1305
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
1440
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
1306
1441
  readonly request: Request;
1307
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
1442
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
1308
1443
  respondWith(promise: Response | Promise<Response>): void;
1309
1444
  passThroughOnException(): void;
1310
1445
  }
1311
- declare type HeadersInit =
1446
+ type HeadersInit =
1312
1447
  | Headers
1313
1448
  | Iterable<Iterable<string>>
1314
1449
  | Record<string, string>;
1450
+ /**
1451
+ * 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.
1452
+ *
1453
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
1454
+ */
1315
1455
  declare class Headers {
1316
1456
  constructor(init?: HeadersInit);
1457
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
1317
1458
  get(name: string): string | null;
1318
1459
  getAll(name: string): string[];
1460
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
1319
1461
  has(name: string): boolean;
1462
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
1320
1463
  set(name: string, value: string): void;
1464
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
1321
1465
  append(name: string, value: string): void;
1466
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
1322
1467
  delete(name: string): void;
1323
1468
  forEach<This = unknown>(
1324
1469
  callback: (this: This, value: string, key: string, parent: Headers) => void,
1325
1470
  thisArg?: This,
1326
1471
  ): void;
1327
- /** Returns an iterator allowing to go through all key/value pairs contained in this object. */
1472
+ /* Returns an iterator allowing to go through all key/value pairs contained in this object. */
1328
1473
  entries(): IterableIterator<[key: string, value: string]>;
1329
- /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
1474
+ /* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
1330
1475
  keys(): IterableIterator<string>;
1331
- /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
1476
+ /* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
1332
1477
  values(): IterableIterator<string>;
1333
1478
  [Symbol.iterator](): IterableIterator<[key: string, value: string]>;
1334
1479
  }
1335
- declare type BodyInit =
1480
+ type BodyInit =
1336
1481
  | ReadableStream<Uint8Array>
1337
1482
  | string
1338
1483
  | ArrayBuffer
@@ -1341,39 +1486,51 @@ declare type BodyInit =
1341
1486
  | URLSearchParams
1342
1487
  | FormData;
1343
1488
  declare abstract class Body {
1489
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
1344
1490
  readonly body: ReadableStream | null;
1491
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
1345
1492
  readonly bodyUsed: boolean;
1493
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
1346
1494
  arrayBuffer(): Promise<ArrayBuffer>;
1347
1495
  bytes(): Promise<Uint8Array>;
1496
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
1348
1497
  text(): Promise<string>;
1498
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
1349
1499
  json<T>(): Promise<T>;
1500
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
1350
1501
  formData(): Promise<FormData>;
1502
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
1351
1503
  blob(): Promise<Blob>;
1352
1504
  }
1505
+ /**
1506
+ * This Fetch API interface represents the response to a request.
1507
+ *
1508
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
1509
+ */
1353
1510
  declare class Response extends Body {
1354
1511
  constructor(body?: BodyInit | null, init?: ResponseInit);
1355
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
1512
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
1356
1513
  static redirect(url: string, status?: number): Response;
1357
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
1514
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
1358
1515
  static json(any: any, maybeInit?: ResponseInit | Response): Response;
1359
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
1516
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
1360
1517
  clone(): Response;
1361
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
1518
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
1362
1519
  readonly status: number;
1363
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
1520
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
1364
1521
  readonly statusText: string;
1365
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
1522
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
1366
1523
  readonly headers: Headers;
1367
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
1524
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
1368
1525
  readonly ok: boolean;
1369
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
1526
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
1370
1527
  readonly redirected: boolean;
1371
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
1528
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
1372
1529
  readonly url: string;
1373
1530
  readonly webSocket: WebSocket | null;
1374
1531
  readonly cf?: any;
1375
1532
  }
1376
- declare interface ResponseInit {
1533
+ interface ResponseInit {
1377
1534
  status?: number;
1378
1535
  statusText?: string;
1379
1536
  headers?: HeadersInit;
@@ -1381,16 +1538,21 @@ declare interface ResponseInit {
1381
1538
  webSocket?: WebSocket | null;
1382
1539
  encodeBody?: "automatic" | "manual";
1383
1540
  }
1384
- declare type RequestInfo<
1385
- CfHostMetadata = unknown,
1386
- Cf = CfProperties<CfHostMetadata>,
1387
- > = Request<CfHostMetadata, Cf> | string | URL;
1541
+ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
1542
+ | Request<CfHostMetadata, Cf>
1543
+ | string
1544
+ | URL;
1545
+ /**
1546
+ * This Fetch API interface represents a resource request.
1547
+ *
1548
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
1549
+ */
1388
1550
  declare class Request<
1389
1551
  CfHostMetadata = unknown,
1390
1552
  Cf = CfProperties<CfHostMetadata>,
1391
1553
  > extends Body {
1392
1554
  constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
1393
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
1555
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
1394
1556
  clone(): Request<CfHostMetadata, Cf>;
1395
1557
  /**
1396
1558
  * Returns request's HTTP method, which is "GET" by default.
@@ -1437,26 +1599,27 @@ declare class Request<
1437
1599
  */
1438
1600
  readonly keepalive: boolean;
1439
1601
  }
1440
- declare interface RequestInit<Cf = CfProperties> {
1441
- /** A string to set request's method. */
1602
+ interface RequestInit<Cf = CfProperties> {
1603
+ /* A string to set request's method. */
1442
1604
  method?: string;
1443
- /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
1605
+ /* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
1444
1606
  headers?: HeadersInit;
1445
- /** A BodyInit object or null to set request's body. */
1607
+ /* A BodyInit object or null to set request's body. */
1446
1608
  body?: BodyInit | null;
1447
- /** 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. */
1609
+ /* 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. */
1448
1610
  redirect?: string;
1449
1611
  fetcher?: Fetcher | null;
1450
1612
  cf?: Cf;
1451
- /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
1613
+ /* A string indicating how the request will interact with the browser's cache to set request's cache. */
1614
+ cache?: string;
1615
+ /* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
1452
1616
  integrity?: string;
1453
- /** An AbortSignal to set request's signal. */
1617
+ /* An AbortSignal to set request's signal. */
1454
1618
  signal?: AbortSignal | null;
1455
1619
  }
1456
- declare type Service<
1457
- T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
1458
- > = Fetcher<T>;
1459
- declare type Fetcher<
1620
+ type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
1621
+ Fetcher<T>;
1622
+ type Fetcher<
1460
1623
  T extends Rpc.EntrypointBranded | undefined = undefined,
1461
1624
  Reserved extends string = never,
1462
1625
  > = (T extends Rpc.EntrypointBranded
@@ -1465,16 +1628,16 @@ declare type Fetcher<
1465
1628
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
1466
1629
  connect(address: SocketAddress | string, options?: SocketOptions): Socket;
1467
1630
  };
1468
- declare interface FetcherPutOptions {
1631
+ interface FetcherPutOptions {
1469
1632
  expiration?: number;
1470
1633
  expirationTtl?: number;
1471
1634
  }
1472
- declare interface KVNamespaceListKey<Metadata, Key extends string = string> {
1635
+ interface KVNamespaceListKey<Metadata, Key extends string = string> {
1473
1636
  name: Key;
1474
1637
  expiration?: number;
1475
1638
  metadata?: Metadata;
1476
1639
  }
1477
- declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1640
+ type KVNamespaceListResult<Metadata, Key extends string = string> =
1478
1641
  | {
1479
1642
  list_complete: false;
1480
1643
  keys: KVNamespaceListKey<Metadata, Key>[];
@@ -1486,7 +1649,7 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1486
1649
  keys: KVNamespaceListKey<Metadata, Key>[];
1487
1650
  cacheStatus: string | null;
1488
1651
  };
1489
- declare interface KVNamespace<Key extends string = string> {
1652
+ interface KVNamespace<Key extends string = string> {
1490
1653
  get(
1491
1654
  key: Key,
1492
1655
  options?: Partial<KVNamespaceGetOptions<undefined>>,
@@ -1560,49 +1723,49 @@ declare interface KVNamespace<Key extends string = string> {
1560
1723
  ): Promise<KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>>;
1561
1724
  delete(key: Key): Promise<void>;
1562
1725
  }
1563
- declare interface KVNamespaceListOptions {
1726
+ interface KVNamespaceListOptions {
1564
1727
  limit?: number;
1565
1728
  prefix?: string | null;
1566
1729
  cursor?: string | null;
1567
1730
  }
1568
- declare interface KVNamespaceGetOptions<Type> {
1731
+ interface KVNamespaceGetOptions<Type> {
1569
1732
  type: Type;
1570
1733
  cacheTtl?: number;
1571
1734
  }
1572
- declare interface KVNamespacePutOptions {
1735
+ interface KVNamespacePutOptions {
1573
1736
  expiration?: number;
1574
1737
  expirationTtl?: number;
1575
1738
  metadata?: any | null;
1576
1739
  }
1577
- declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1740
+ interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1578
1741
  value: Value | null;
1579
1742
  metadata: Metadata | null;
1580
1743
  cacheStatus: string | null;
1581
1744
  }
1582
- declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1583
- declare interface Queue<Body = unknown> {
1745
+ type QueueContentType = "text" | "bytes" | "json" | "v8";
1746
+ interface Queue<Body = unknown> {
1584
1747
  send(message: Body, options?: QueueSendOptions): Promise<void>;
1585
1748
  sendBatch(
1586
1749
  messages: Iterable<MessageSendRequest<Body>>,
1587
1750
  options?: QueueSendBatchOptions,
1588
1751
  ): Promise<void>;
1589
1752
  }
1590
- declare interface QueueSendOptions {
1753
+ interface QueueSendOptions {
1591
1754
  contentType?: QueueContentType;
1592
1755
  delaySeconds?: number;
1593
1756
  }
1594
- declare interface QueueSendBatchOptions {
1757
+ interface QueueSendBatchOptions {
1595
1758
  delaySeconds?: number;
1596
1759
  }
1597
- declare interface MessageSendRequest<Body = unknown> {
1760
+ interface MessageSendRequest<Body = unknown> {
1598
1761
  body: Body;
1599
1762
  contentType?: QueueContentType;
1600
1763
  delaySeconds?: number;
1601
1764
  }
1602
- declare interface QueueRetryOptions {
1765
+ interface QueueRetryOptions {
1603
1766
  delaySeconds?: number;
1604
1767
  }
1605
- declare interface Message<Body = unknown> {
1768
+ interface Message<Body = unknown> {
1606
1769
  readonly id: string;
1607
1770
  readonly timestamp: Date;
1608
1771
  readonly body: Body;
@@ -1610,26 +1773,26 @@ declare interface Message<Body = unknown> {
1610
1773
  retry(options?: QueueRetryOptions): void;
1611
1774
  ack(): void;
1612
1775
  }
1613
- declare interface QueueEvent<Body = unknown> extends ExtendableEvent {
1776
+ interface QueueEvent<Body = unknown> extends ExtendableEvent {
1614
1777
  readonly messages: readonly Message<Body>[];
1615
1778
  readonly queue: string;
1616
1779
  retryAll(options?: QueueRetryOptions): void;
1617
1780
  ackAll(): void;
1618
1781
  }
1619
- declare interface MessageBatch<Body = unknown> {
1782
+ interface MessageBatch<Body = unknown> {
1620
1783
  readonly messages: readonly Message<Body>[];
1621
1784
  readonly queue: string;
1622
1785
  retryAll(options?: QueueRetryOptions): void;
1623
1786
  ackAll(): void;
1624
1787
  }
1625
- declare interface R2Error extends Error {
1788
+ interface R2Error extends Error {
1626
1789
  readonly name: string;
1627
1790
  readonly code: number;
1628
1791
  readonly message: string;
1629
1792
  readonly action: string;
1630
1793
  readonly stack: any;
1631
1794
  }
1632
- declare interface R2ListOptions {
1795
+ interface R2ListOptions {
1633
1796
  limit?: number;
1634
1797
  prefix?: string;
1635
1798
  cursor?: string;
@@ -1677,7 +1840,7 @@ declare abstract class R2Bucket {
1677
1840
  delete(keys: string | string[]): Promise<void>;
1678
1841
  list(options?: R2ListOptions): Promise<R2Objects>;
1679
1842
  }
1680
- declare interface R2MultipartUpload {
1843
+ interface R2MultipartUpload {
1681
1844
  readonly key: string;
1682
1845
  readonly uploadId: string;
1683
1846
  uploadPart(
@@ -1687,7 +1850,7 @@ declare interface R2MultipartUpload {
1687
1850
  abort(): Promise<void>;
1688
1851
  complete(uploadedParts: R2UploadedPart[]): Promise<R2Object>;
1689
1852
  }
1690
- declare interface R2UploadedPart {
1853
+ interface R2UploadedPart {
1691
1854
  partNumber: number;
1692
1855
  etag: string;
1693
1856
  }
@@ -1705,7 +1868,7 @@ declare abstract class R2Object {
1705
1868
  readonly storageClass: string;
1706
1869
  writeHttpMetadata(headers: Headers): void;
1707
1870
  }
1708
- declare interface R2ObjectBody extends R2Object {
1871
+ interface R2ObjectBody extends R2Object {
1709
1872
  get body(): ReadableStream;
1710
1873
  get bodyUsed(): boolean;
1711
1874
  arrayBuffer(): Promise<ArrayBuffer>;
@@ -1713,7 +1876,7 @@ declare interface R2ObjectBody extends R2Object {
1713
1876
  json<T>(): Promise<T>;
1714
1877
  blob(): Promise<Blob>;
1715
1878
  }
1716
- declare type R2Range =
1879
+ type R2Range =
1717
1880
  | {
1718
1881
  offset: number;
1719
1882
  length?: number;
@@ -1725,18 +1888,18 @@ declare type R2Range =
1725
1888
  | {
1726
1889
  suffix: number;
1727
1890
  };
1728
- declare interface R2Conditional {
1891
+ interface R2Conditional {
1729
1892
  etagMatches?: string;
1730
1893
  etagDoesNotMatch?: string;
1731
1894
  uploadedBefore?: Date;
1732
1895
  uploadedAfter?: Date;
1733
1896
  secondsGranularity?: boolean;
1734
1897
  }
1735
- declare interface R2GetOptions {
1898
+ interface R2GetOptions {
1736
1899
  onlyIf?: R2Conditional | Headers;
1737
1900
  range?: R2Range | Headers;
1738
1901
  }
1739
- declare interface R2PutOptions {
1902
+ interface R2PutOptions {
1740
1903
  onlyIf?: R2Conditional | Headers;
1741
1904
  httpMetadata?: R2HTTPMetadata | Headers;
1742
1905
  customMetadata?: Record<string, string>;
@@ -1747,12 +1910,12 @@ declare interface R2PutOptions {
1747
1910
  sha512?: ArrayBuffer | string;
1748
1911
  storageClass?: string;
1749
1912
  }
1750
- declare interface R2MultipartOptions {
1913
+ interface R2MultipartOptions {
1751
1914
  httpMetadata?: R2HTTPMetadata | Headers;
1752
1915
  customMetadata?: Record<string, string>;
1753
1916
  storageClass?: string;
1754
1917
  }
1755
- declare interface R2Checksums {
1918
+ interface R2Checksums {
1756
1919
  readonly md5?: ArrayBuffer;
1757
1920
  readonly sha1?: ArrayBuffer;
1758
1921
  readonly sha256?: ArrayBuffer;
@@ -1760,14 +1923,14 @@ declare interface R2Checksums {
1760
1923
  readonly sha512?: ArrayBuffer;
1761
1924
  toJSON(): R2StringChecksums;
1762
1925
  }
1763
- declare interface R2StringChecksums {
1926
+ interface R2StringChecksums {
1764
1927
  md5?: string;
1765
1928
  sha1?: string;
1766
1929
  sha256?: string;
1767
1930
  sha384?: string;
1768
1931
  sha512?: string;
1769
1932
  }
1770
- declare interface R2HTTPMetadata {
1933
+ interface R2HTTPMetadata {
1771
1934
  contentType?: string;
1772
1935
  contentLanguage?: string;
1773
1936
  contentDisposition?: string;
@@ -1775,7 +1938,7 @@ declare interface R2HTTPMetadata {
1775
1938
  cacheControl?: string;
1776
1939
  cacheExpiry?: Date;
1777
1940
  }
1778
- declare type R2Objects = {
1941
+ type R2Objects = {
1779
1942
  objects: R2Object[];
1780
1943
  delimitedPrefixes: string[];
1781
1944
  } & (
@@ -1792,16 +1955,16 @@ declare abstract class ScheduledEvent extends ExtendableEvent {
1792
1955
  readonly cron: string;
1793
1956
  noRetry(): void;
1794
1957
  }
1795
- declare interface ScheduledController {
1958
+ interface ScheduledController {
1796
1959
  readonly scheduledTime: number;
1797
1960
  readonly cron: string;
1798
1961
  noRetry(): void;
1799
1962
  }
1800
- declare interface QueuingStrategy<T = any> {
1963
+ interface QueuingStrategy<T = any> {
1801
1964
  highWaterMark?: number | bigint;
1802
1965
  size?: (chunk: T) => number | bigint;
1803
1966
  }
1804
- declare interface UnderlyingSink<W = any> {
1967
+ interface UnderlyingSink<W = any> {
1805
1968
  type?: string;
1806
1969
  start?: (controller: WritableStreamDefaultController) => void | Promise<void>;
1807
1970
  write?: (
@@ -1811,14 +1974,14 @@ declare interface UnderlyingSink<W = any> {
1811
1974
  abort?: (reason: any) => void | Promise<void>;
1812
1975
  close?: () => void | Promise<void>;
1813
1976
  }
1814
- declare interface UnderlyingByteSource {
1977
+ interface UnderlyingByteSource {
1815
1978
  type: "bytes";
1816
1979
  autoAllocateChunkSize?: number;
1817
1980
  start?: (controller: ReadableByteStreamController) => void | Promise<void>;
1818
1981
  pull?: (controller: ReadableByteStreamController) => void | Promise<void>;
1819
1982
  cancel?: (reason: any) => void | Promise<void>;
1820
1983
  }
1821
- declare interface UnderlyingSource<R = any> {
1984
+ interface UnderlyingSource<R = any> {
1822
1985
  type?: "" | undefined;
1823
1986
  start?: (
1824
1987
  controller: ReadableStreamDefaultController<R>,
@@ -1829,7 +1992,7 @@ declare interface UnderlyingSource<R = any> {
1829
1992
  cancel?: (reason: any) => void | Promise<void>;
1830
1993
  expectedLength?: number | bigint;
1831
1994
  }
1832
- declare interface Transformer<I = any, O = any> {
1995
+ interface Transformer<I = any, O = any> {
1833
1996
  readableType?: string;
1834
1997
  writableType?: string;
1835
1998
  start?: (
@@ -1845,7 +2008,7 @@ declare interface Transformer<I = any, O = any> {
1845
2008
  cancel?: (reason: any) => void | Promise<void>;
1846
2009
  expectedLength?: number;
1847
2010
  }
1848
- declare interface StreamPipeOptions {
2011
+ interface StreamPipeOptions {
1849
2012
  /**
1850
2013
  * Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
1851
2014
  *
@@ -1868,7 +2031,7 @@ declare interface StreamPipeOptions {
1868
2031
  preventCancel?: boolean;
1869
2032
  signal?: AbortSignal;
1870
2033
  }
1871
- declare type ReadableStreamReadResult<R = any> =
2034
+ type ReadableStreamReadResult<R = any> =
1872
2035
  | {
1873
2036
  done: false;
1874
2037
  value: R;
@@ -1882,32 +2045,37 @@ declare type ReadableStreamReadResult<R = any> =
1882
2045
  *
1883
2046
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
1884
2047
  */
1885
- declare interface ReadableStream<R = any> {
1886
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
2048
+ interface ReadableStream<R = any> {
2049
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
1887
2050
  readonly locked: boolean;
1888
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
2051
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
1889
2052
  cancel(reason?: any): Promise<void>;
1890
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
2053
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
1891
2054
  getReader(): ReadableStreamDefaultReader<R>;
1892
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
2055
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
1893
2056
  getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
1894
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
2057
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
1895
2058
  pipeThrough<T>(
1896
2059
  transform: ReadableWritablePair<T, R>,
1897
2060
  options?: StreamPipeOptions,
1898
2061
  ): ReadableStream<T>;
1899
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
2062
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
1900
2063
  pipeTo(
1901
2064
  destination: WritableStream<R>,
1902
2065
  options?: StreamPipeOptions,
1903
2066
  ): Promise<void>;
1904
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
2067
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
1905
2068
  tee(): [ReadableStream<R>, ReadableStream<R>];
1906
2069
  values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
1907
2070
  [Symbol.asyncIterator](
1908
2071
  options?: ReadableStreamValuesOptions,
1909
2072
  ): AsyncIterableIterator<R>;
1910
2073
  }
2074
+ /**
2075
+ * 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.
2076
+ *
2077
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
2078
+ */
1911
2079
  declare const ReadableStream: {
1912
2080
  prototype: ReadableStream;
1913
2081
  new (
@@ -1919,34 +2087,36 @@ declare const ReadableStream: {
1919
2087
  strategy?: QueuingStrategy<R>,
1920
2088
  ): ReadableStream<R>;
1921
2089
  };
2090
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
1922
2091
  declare class ReadableStreamDefaultReader<R = any> {
1923
2092
  constructor(stream: ReadableStream);
1924
2093
  readonly closed: Promise<void>;
1925
2094
  cancel(reason?: any): Promise<void>;
1926
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
2095
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
1927
2096
  read(): Promise<ReadableStreamReadResult<R>>;
1928
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
2097
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
1929
2098
  releaseLock(): void;
1930
2099
  }
2100
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
1931
2101
  declare class ReadableStreamBYOBReader {
1932
2102
  constructor(stream: ReadableStream);
1933
2103
  readonly closed: Promise<void>;
1934
2104
  cancel(reason?: any): Promise<void>;
1935
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
2105
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
1936
2106
  read<T extends ArrayBufferView>(
1937
2107
  view: T,
1938
2108
  ): Promise<ReadableStreamReadResult<T>>;
1939
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
2109
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
1940
2110
  releaseLock(): void;
1941
2111
  readAtLeast<T extends ArrayBufferView>(
1942
2112
  minElements: number,
1943
2113
  view: T,
1944
2114
  ): Promise<ReadableStreamReadResult<T>>;
1945
2115
  }
1946
- declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
2116
+ interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1947
2117
  min?: number;
1948
2118
  }
1949
- declare interface ReadableStreamGetReaderOptions {
2119
+ interface ReadableStreamGetReaderOptions {
1950
2120
  /**
1951
2121
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
1952
2122
  *
@@ -1954,38 +2124,38 @@ declare interface ReadableStreamGetReaderOptions {
1954
2124
  */
1955
2125
  mode: "byob";
1956
2126
  }
1957
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
1958
- declare interface ReadableStreamBYOBRequest {
1959
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
2127
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
2128
+ interface ReadableStreamBYOBRequest {
2129
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
1960
2130
  get view(): Uint8Array | null;
1961
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
2131
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
1962
2132
  respond(bytesWritten: number): void;
1963
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
2133
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
1964
2134
  respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
1965
2135
  get atLeast(): number | null;
1966
2136
  }
1967
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
1968
- declare interface ReadableStreamDefaultController<R = any> {
1969
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
2137
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
2138
+ interface ReadableStreamDefaultController<R = any> {
2139
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
1970
2140
  get desiredSize(): number | null;
1971
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
2141
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
1972
2142
  close(): void;
1973
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
2143
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
1974
2144
  enqueue(chunk?: R): void;
1975
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
2145
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
1976
2146
  error(reason: any): void;
1977
2147
  }
1978
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
1979
- declare interface ReadableByteStreamController {
1980
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
2148
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
2149
+ interface ReadableByteStreamController {
2150
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
1981
2151
  get byobRequest(): ReadableStreamBYOBRequest | null;
1982
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
2152
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
1983
2153
  get desiredSize(): number | null;
1984
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
2154
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
1985
2155
  close(): void;
1986
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
2156
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
1987
2157
  enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
1988
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
2158
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
1989
2159
  error(reason: any): void;
1990
2160
  }
1991
2161
  /**
@@ -1993,24 +2163,24 @@ declare interface ReadableByteStreamController {
1993
2163
  *
1994
2164
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
1995
2165
  */
1996
- declare interface WritableStreamDefaultController {
1997
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
2166
+ interface WritableStreamDefaultController {
2167
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
1998
2168
  get signal(): AbortSignal;
1999
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
2169
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
2000
2170
  error(reason?: any): void;
2001
2171
  }
2002
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
2003
- declare interface TransformStreamDefaultController<O = any> {
2004
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
2172
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
2173
+ interface TransformStreamDefaultController<O = any> {
2174
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
2005
2175
  get desiredSize(): number | null;
2006
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
2176
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
2007
2177
  enqueue(chunk?: O): void;
2008
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
2178
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
2009
2179
  error(reason: any): void;
2010
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
2180
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
2011
2181
  terminate(): void;
2012
2182
  }
2013
- declare interface ReadableWritablePair<R = any, W = any> {
2183
+ interface ReadableWritablePair<R = any, W = any> {
2014
2184
  /**
2015
2185
  * Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
2016
2186
  *
@@ -2019,46 +2189,57 @@ declare interface ReadableWritablePair<R = any, W = any> {
2019
2189
  writable: WritableStream<W>;
2020
2190
  readable: ReadableStream<R>;
2021
2191
  }
2192
+ /**
2193
+ * 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.
2194
+ *
2195
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
2196
+ */
2022
2197
  declare class WritableStream<W = any> {
2023
2198
  constructor(
2024
2199
  underlyingSink?: UnderlyingSink,
2025
2200
  queuingStrategy?: QueuingStrategy,
2026
2201
  );
2027
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
2202
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
2028
2203
  readonly locked: boolean;
2029
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
2204
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
2030
2205
  abort(reason?: any): Promise<void>;
2031
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
2206
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
2032
2207
  close(): Promise<void>;
2033
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
2208
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
2034
2209
  getWriter(): WritableStreamDefaultWriter<W>;
2035
2210
  }
2211
+ /**
2212
+ * 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.
2213
+ *
2214
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
2215
+ */
2036
2216
  declare class WritableStreamDefaultWriter<W = any> {
2037
2217
  constructor(stream: WritableStream);
2038
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
2218
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
2039
2219
  readonly closed: Promise<void>;
2040
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
2220
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
2041
2221
  readonly ready: Promise<void>;
2042
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
2222
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
2043
2223
  readonly desiredSize: number | null;
2044
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
2224
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
2045
2225
  abort(reason?: any): Promise<void>;
2046
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
2226
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
2047
2227
  close(): Promise<void>;
2048
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
2228
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
2049
2229
  write(chunk?: W): Promise<void>;
2050
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
2230
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
2051
2231
  releaseLock(): void;
2052
2232
  }
2233
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
2053
2234
  declare class TransformStream<I = any, O = any> {
2054
2235
  constructor(
2055
2236
  transformer?: Transformer<I, O>,
2056
2237
  writableStrategy?: QueuingStrategy<I>,
2057
2238
  readableStrategy?: QueuingStrategy<O>,
2058
2239
  );
2059
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
2240
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
2060
2241
  readonly readable: ReadableStream<O>;
2061
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
2242
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
2062
2243
  readonly writable: WritableStream<I>;
2063
2244
  }
2064
2245
  declare class FixedLengthStream extends IdentityTransformStream {
@@ -2073,28 +2254,32 @@ declare class IdentityTransformStream extends TransformStream<
2073
2254
  > {
2074
2255
  constructor(queuingStrategy?: IdentityTransformStreamQueuingStrategy);
2075
2256
  }
2076
- declare interface IdentityTransformStreamQueuingStrategy {
2257
+ interface IdentityTransformStreamQueuingStrategy {
2077
2258
  highWaterMark?: number | bigint;
2078
2259
  }
2079
- declare interface ReadableStreamValuesOptions {
2260
+ interface ReadableStreamValuesOptions {
2080
2261
  preventCancel?: boolean;
2081
2262
  }
2263
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
2082
2264
  declare class CompressionStream extends TransformStream<
2083
2265
  ArrayBuffer | ArrayBufferView,
2084
2266
  Uint8Array
2085
2267
  > {
2086
2268
  constructor(format: "gzip" | "deflate" | "deflate-raw");
2087
2269
  }
2270
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
2088
2271
  declare class DecompressionStream extends TransformStream<
2089
2272
  ArrayBuffer | ArrayBufferView,
2090
2273
  Uint8Array
2091
2274
  > {
2092
2275
  constructor(format: "gzip" | "deflate" | "deflate-raw");
2093
2276
  }
2277
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
2094
2278
  declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
2095
2279
  constructor();
2096
2280
  get encoding(): string;
2097
2281
  }
2282
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
2098
2283
  declare class TextDecoderStream extends TransformStream<
2099
2284
  ArrayBuffer | ArrayBufferView,
2100
2285
  string
@@ -2104,27 +2289,37 @@ declare class TextDecoderStream extends TransformStream<
2104
2289
  get fatal(): boolean;
2105
2290
  get ignoreBOM(): boolean;
2106
2291
  }
2107
- declare interface TextDecoderStreamTextDecoderStreamInit {
2292
+ interface TextDecoderStreamTextDecoderStreamInit {
2108
2293
  fatal?: boolean;
2109
2294
  ignoreBOM?: boolean;
2110
2295
  }
2296
+ /**
2297
+ * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
2298
+ *
2299
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
2300
+ */
2111
2301
  declare class ByteLengthQueuingStrategy
2112
2302
  implements QueuingStrategy<ArrayBufferView>
2113
2303
  {
2114
2304
  constructor(init: QueuingStrategyInit);
2115
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
2305
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
2116
2306
  get highWaterMark(): number;
2117
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
2307
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
2118
2308
  get size(): (chunk?: any) => number;
2119
2309
  }
2310
+ /**
2311
+ * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
2312
+ *
2313
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
2314
+ */
2120
2315
  declare class CountQueuingStrategy implements QueuingStrategy {
2121
2316
  constructor(init: QueuingStrategyInit);
2122
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
2317
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
2123
2318
  get highWaterMark(): number;
2124
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
2319
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
2125
2320
  get size(): (chunk?: any) => number;
2126
2321
  }
2127
- declare interface QueuingStrategyInit {
2322
+ interface QueuingStrategyInit {
2128
2323
  /**
2129
2324
  * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
2130
2325
  *
@@ -2132,7 +2327,7 @@ declare interface QueuingStrategyInit {
2132
2327
  */
2133
2328
  highWaterMark: number;
2134
2329
  }
2135
- declare interface ScriptVersion {
2330
+ interface ScriptVersion {
2136
2331
  id?: string;
2137
2332
  tag?: string;
2138
2333
  message?: string;
@@ -2141,7 +2336,7 @@ declare abstract class TailEvent extends ExtendableEvent {
2141
2336
  readonly events: TraceItem[];
2142
2337
  readonly traces: TraceItem[];
2143
2338
  }
2144
- declare interface TraceItem {
2339
+ interface TraceItem {
2145
2340
  readonly event:
2146
2341
  | (
2147
2342
  | TraceItemFetchEventInfo
@@ -2165,117 +2360,125 @@ declare interface TraceItem {
2165
2360
  readonly dispatchNamespace?: string;
2166
2361
  readonly scriptTags?: string[];
2167
2362
  readonly outcome: string;
2363
+ readonly truncated: boolean;
2168
2364
  }
2169
- declare interface TraceItemAlarmEventInfo {
2365
+ interface TraceItemAlarmEventInfo {
2170
2366
  readonly scheduledTime: Date;
2171
2367
  }
2172
- declare interface TraceItemCustomEventInfo {}
2173
- declare interface TraceItemScheduledEventInfo {
2368
+ interface TraceItemCustomEventInfo {}
2369
+ interface TraceItemScheduledEventInfo {
2174
2370
  readonly scheduledTime: number;
2175
2371
  readonly cron: string;
2176
2372
  }
2177
- declare interface TraceItemQueueEventInfo {
2373
+ interface TraceItemQueueEventInfo {
2178
2374
  readonly queue: string;
2179
2375
  readonly batchSize: number;
2180
2376
  }
2181
- declare interface TraceItemEmailEventInfo {
2377
+ interface TraceItemEmailEventInfo {
2182
2378
  readonly mailFrom: string;
2183
2379
  readonly rcptTo: string;
2184
2380
  readonly rawSize: number;
2185
2381
  }
2186
- declare interface TraceItemTailEventInfo {
2382
+ interface TraceItemTailEventInfo {
2187
2383
  readonly consumedEvents: TraceItemTailEventInfoTailItem[];
2188
2384
  }
2189
- declare interface TraceItemTailEventInfoTailItem {
2385
+ interface TraceItemTailEventInfoTailItem {
2190
2386
  readonly scriptName: string | null;
2191
2387
  }
2192
- declare interface TraceItemFetchEventInfo {
2388
+ interface TraceItemFetchEventInfo {
2193
2389
  readonly response?: TraceItemFetchEventInfoResponse;
2194
2390
  readonly request: TraceItemFetchEventInfoRequest;
2195
2391
  }
2196
- declare interface TraceItemFetchEventInfoRequest {
2392
+ interface TraceItemFetchEventInfoRequest {
2197
2393
  readonly cf?: any;
2198
2394
  readonly headers: Record<string, string>;
2199
2395
  readonly method: string;
2200
2396
  readonly url: string;
2201
2397
  getUnredacted(): TraceItemFetchEventInfoRequest;
2202
2398
  }
2203
- declare interface TraceItemFetchEventInfoResponse {
2399
+ interface TraceItemFetchEventInfoResponse {
2204
2400
  readonly status: number;
2205
2401
  }
2206
- declare interface TraceItemJsRpcEventInfo {
2402
+ interface TraceItemJsRpcEventInfo {
2207
2403
  readonly rpcMethod: string;
2208
2404
  }
2209
- declare interface TraceItemHibernatableWebSocketEventInfo {
2405
+ interface TraceItemHibernatableWebSocketEventInfo {
2210
2406
  readonly getWebSocketEvent:
2211
2407
  | TraceItemHibernatableWebSocketEventInfoMessage
2212
2408
  | TraceItemHibernatableWebSocketEventInfoClose
2213
2409
  | TraceItemHibernatableWebSocketEventInfoError;
2214
2410
  }
2215
- declare interface TraceItemHibernatableWebSocketEventInfoMessage {
2411
+ interface TraceItemHibernatableWebSocketEventInfoMessage {
2216
2412
  readonly webSocketEventType: string;
2217
2413
  }
2218
- declare interface TraceItemHibernatableWebSocketEventInfoClose {
2414
+ interface TraceItemHibernatableWebSocketEventInfoClose {
2219
2415
  readonly webSocketEventType: string;
2220
2416
  readonly code: number;
2221
2417
  readonly wasClean: boolean;
2222
2418
  }
2223
- declare interface TraceItemHibernatableWebSocketEventInfoError {
2419
+ interface TraceItemHibernatableWebSocketEventInfoError {
2224
2420
  readonly webSocketEventType: string;
2225
2421
  }
2226
- declare interface TraceLog {
2422
+ interface TraceLog {
2227
2423
  readonly timestamp: number;
2228
2424
  readonly level: string;
2229
2425
  readonly message: any;
2230
2426
  }
2231
- declare interface TraceException {
2427
+ interface TraceException {
2232
2428
  readonly timestamp: number;
2233
2429
  readonly message: string;
2234
2430
  readonly name: string;
2235
2431
  readonly stack?: string;
2236
2432
  }
2237
- declare interface TraceDiagnosticChannelEvent {
2433
+ interface TraceDiagnosticChannelEvent {
2238
2434
  readonly timestamp: number;
2239
2435
  readonly channel: string;
2240
2436
  readonly message: any;
2241
2437
  }
2242
- declare interface TraceMetrics {
2438
+ interface TraceMetrics {
2243
2439
  readonly cpuTime: number;
2244
2440
  readonly wallTime: number;
2245
2441
  }
2246
- declare interface UnsafeTraceMetrics {
2442
+ interface UnsafeTraceMetrics {
2247
2443
  fromTrace(item: TraceItem): TraceMetrics;
2248
2444
  }
2445
+ /**
2446
+ * The URL interface represents an object providing static methods used for creating object URLs.
2447
+ *
2448
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
2449
+ */
2249
2450
  declare class URL {
2250
2451
  constructor(url: string | URL, base?: string | URL);
2251
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
2452
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
2252
2453
  href: string;
2253
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
2454
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
2254
2455
  readonly origin: string;
2255
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
2456
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
2256
2457
  protocol: string;
2257
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
2458
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
2258
2459
  username: string;
2259
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
2460
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
2260
2461
  password: string;
2261
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
2462
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
2262
2463
  host: string;
2263
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
2464
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
2264
2465
  hostname: string;
2265
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
2466
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
2266
2467
  port: string;
2267
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
2468
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
2268
2469
  pathname: string;
2269
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
2470
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
2270
2471
  search: string;
2271
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
2472
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
2272
2473
  readonly searchParams: URLSearchParams;
2273
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
2474
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
2274
2475
  hash: string;
2476
+ /*function toString() { [native code] }*/
2275
2477
  toString(): string;
2276
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
2478
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
2277
2479
  toJSON(): string;
2278
2480
  }
2481
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
2279
2482
  declare class URLSearchParams {
2280
2483
  constructor(
2281
2484
  init?:
@@ -2284,19 +2487,51 @@ declare class URLSearchParams {
2284
2487
  | Record<string, string>
2285
2488
  | [key: string, value: string][],
2286
2489
  );
2490
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
2287
2491
  get size(): number;
2492
+ /**
2493
+ * Appends a specified key/value pair as a new search parameter.
2494
+ *
2495
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
2496
+ */
2288
2497
  append(name: string, value: string): void;
2498
+ /**
2499
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
2500
+ *
2501
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
2502
+ */
2289
2503
  delete(name: string): void;
2504
+ /**
2505
+ * Returns the first value associated to the given search parameter.
2506
+ *
2507
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
2508
+ */
2290
2509
  get(name: string): string | null;
2510
+ /**
2511
+ * Returns all the values association with a given search parameter.
2512
+ *
2513
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
2514
+ */
2291
2515
  getAll(name: string): string[];
2516
+ /**
2517
+ * Returns a Boolean indicating if such a search parameter exists.
2518
+ *
2519
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
2520
+ */
2292
2521
  has(name: string): boolean;
2522
+ /**
2523
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
2524
+ *
2525
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
2526
+ */
2293
2527
  set(name: string, value: string): void;
2528
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
2294
2529
  sort(): void;
2295
- /** Returns an array of key, value pairs for every entry in the search params. */
2530
+ /* Returns an array of key, value pairs for every entry in the search params. */
2296
2531
  entries(): IterableIterator<[key: string, value: string]>;
2297
- /** Returns a list of keys in the search params. */
2532
+ /* Returns a list of keys in the search params. */
2298
2533
  keys(): IterableIterator<string>;
2299
- /** Returns a list of values in the search params. */
2534
+ /* Returns a list of values in the search params. */
2300
2535
  values(): IterableIterator<string>;
2301
2536
  forEach<This = unknown>(
2302
2537
  callback: (
@@ -2307,6 +2542,7 @@ declare class URLSearchParams {
2307
2542
  ) => void,
2308
2543
  thisArg?: This,
2309
2544
  ): void;
2545
+ /*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
2310
2546
  toString(): string;
2311
2547
  [Symbol.iterator](): IterableIterator<[key: string, value: string]>;
2312
2548
  }
@@ -2330,7 +2566,7 @@ declare class URLPattern {
2330
2566
  baseURL?: string,
2331
2567
  ): URLPatternURLPatternResult | null;
2332
2568
  }
2333
- declare interface URLPatternURLPatternInit {
2569
+ interface URLPatternURLPatternInit {
2334
2570
  protocol?: string;
2335
2571
  username?: string;
2336
2572
  password?: string;
@@ -2341,11 +2577,11 @@ declare interface URLPatternURLPatternInit {
2341
2577
  hash?: string;
2342
2578
  baseURL?: string;
2343
2579
  }
2344
- declare interface URLPatternURLPatternComponentResult {
2580
+ interface URLPatternURLPatternComponentResult {
2345
2581
  input: string;
2346
2582
  groups: Record<string, string>;
2347
2583
  }
2348
- declare interface URLPatternURLPatternResult {
2584
+ interface URLPatternURLPatternResult {
2349
2585
  inputs: (string | URLPatternURLPatternInit)[];
2350
2586
  protocol: URLPatternURLPatternComponentResult;
2351
2587
  username: URLPatternURLPatternComponentResult;
@@ -2356,9 +2592,14 @@ declare interface URLPatternURLPatternResult {
2356
2592
  search: URLPatternURLPatternComponentResult;
2357
2593
  hash: URLPatternURLPatternComponentResult;
2358
2594
  }
2359
- declare interface URLPatternURLPatternOptions {
2595
+ interface URLPatternURLPatternOptions {
2360
2596
  ignoreCase?: boolean;
2361
2597
  }
2598
+ /**
2599
+ * 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.
2600
+ *
2601
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
2602
+ */
2362
2603
  declare class CloseEvent extends Event {
2363
2604
  constructor(type: string, initializer?: CloseEventInit);
2364
2605
  /**
@@ -2380,24 +2621,39 @@ declare class CloseEvent extends Event {
2380
2621
  */
2381
2622
  readonly wasClean: boolean;
2382
2623
  }
2383
- declare interface CloseEventInit {
2624
+ interface CloseEventInit {
2384
2625
  code?: number;
2385
2626
  reason?: string;
2386
2627
  wasClean?: boolean;
2387
2628
  }
2629
+ /**
2630
+ * A message received by a target object.
2631
+ *
2632
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
2633
+ */
2388
2634
  declare class MessageEvent extends Event {
2389
2635
  constructor(type: string, initializer: MessageEventInit);
2636
+ /**
2637
+ * Returns the data of the message.
2638
+ *
2639
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
2640
+ */
2390
2641
  readonly data: ArrayBuffer | string;
2391
2642
  }
2392
- declare interface MessageEventInit {
2643
+ interface MessageEventInit {
2393
2644
  data: ArrayBuffer | string;
2394
2645
  }
2395
- declare type WebSocketEventMap = {
2646
+ type WebSocketEventMap = {
2396
2647
  close: CloseEvent;
2397
2648
  message: MessageEvent;
2398
2649
  open: Event;
2399
2650
  error: ErrorEvent;
2400
2651
  };
2652
+ /**
2653
+ * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
2654
+ *
2655
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
2656
+ */
2401
2657
  declare class WebSocket extends EventTarget<WebSocketEventMap> {
2402
2658
  constructor(url: string, protocols?: string[] | string);
2403
2659
  accept(): void;
@@ -2454,7 +2710,7 @@ declare const WebSocketPair: {
2454
2710
  1: WebSocket;
2455
2711
  };
2456
2712
  };
2457
- declare interface Socket {
2713
+ interface Socket {
2458
2714
  get readable(): ReadableStream;
2459
2715
  get writable(): WritableStream;
2460
2716
  get closed(): Promise<void>;
@@ -2462,76 +2718,74 @@ declare interface Socket {
2462
2718
  close(): Promise<void>;
2463
2719
  startTls(options?: TlsOptions): Socket;
2464
2720
  }
2465
- declare interface SocketOptions {
2721
+ interface SocketOptions {
2466
2722
  secureTransport?: string;
2467
2723
  allowHalfOpen: boolean;
2468
2724
  highWaterMark?: number | bigint;
2469
2725
  }
2470
- declare interface SocketAddress {
2726
+ interface SocketAddress {
2471
2727
  hostname: string;
2472
2728
  port: number;
2473
2729
  }
2474
- declare interface TlsOptions {
2730
+ interface TlsOptions {
2475
2731
  expectedServerHostname?: string;
2476
2732
  }
2477
- declare interface SocketInfo {
2733
+ interface SocketInfo {
2478
2734
  remoteAddress?: string;
2479
2735
  localAddress?: string;
2480
2736
  }
2481
- declare abstract class gpuGPUAdapter {
2482
- requestDevice(param1?: gpuGPUDeviceDescriptor): Promise<gpuGPUDevice>;
2483
- requestAdapterInfo(unmaskHints?: string[]): Promise<gpuGPUAdapterInfo>;
2484
- get features(): gpuGPUSupportedFeatures;
2485
- get limits(): gpuGPUSupportedLimits;
2737
+ declare abstract class GPUAdapter {
2738
+ requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
2739
+ requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
2740
+ get features(): GPUSupportedFeatures;
2741
+ get limits(): GPUSupportedLimits;
2486
2742
  }
2487
- declare interface gpuGPUDevice extends EventTarget {
2488
- createBuffer(param1: gpuGPUBufferDescriptor): gpuGPUBuffer;
2743
+ interface GPUDevice extends EventTarget {
2744
+ createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
2489
2745
  createBindGroupLayout(
2490
- descriptor: gpuGPUBindGroupLayoutDescriptor,
2491
- ): gpuGPUBindGroupLayout;
2492
- createBindGroup(descriptor: gpuGPUBindGroupDescriptor): gpuGPUBindGroup;
2493
- createSampler(descriptor: gpuGPUSamplerDescriptor): gpuGPUSampler;
2494
- createShaderModule(
2495
- descriptor: gpuGPUShaderModuleDescriptor,
2496
- ): gpuGPUShaderModule;
2746
+ descriptor: GPUBindGroupLayoutDescriptor,
2747
+ ): GPUBindGroupLayout;
2748
+ createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
2749
+ createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
2750
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
2497
2751
  createPipelineLayout(
2498
- descriptor: gpuGPUPipelineLayoutDescriptor,
2499
- ): gpuGPUPipelineLayout;
2752
+ descriptor: GPUPipelineLayoutDescriptor,
2753
+ ): GPUPipelineLayout;
2500
2754
  createComputePipeline(
2501
- descriptor: gpuGPUComputePipelineDescriptor,
2502
- ): gpuGPUComputePipeline;
2755
+ descriptor: GPUComputePipelineDescriptor,
2756
+ ): GPUComputePipeline;
2503
2757
  createRenderPipeline(
2504
- descriptor: gpuGPURenderPipelineDescriptor,
2505
- ): gpuGPURenderPipeline;
2758
+ descriptor: GPURenderPipelineDescriptor,
2759
+ ): GPURenderPipeline;
2506
2760
  createCommandEncoder(
2507
- descriptor?: gpuGPUCommandEncoderDescriptor,
2508
- ): gpuGPUCommandEncoder;
2509
- createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
2761
+ descriptor?: GPUCommandEncoderDescriptor,
2762
+ ): GPUCommandEncoder;
2763
+ createTexture(param1: GPUTextureDescriptor): GPUTexture;
2510
2764
  destroy(): void;
2511
- createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
2765
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
2512
2766
  pushErrorScope(filter: string): void;
2513
- popErrorScope(): Promise<gpuGPUError | null>;
2514
- get queue(): gpuGPUQueue;
2515
- get lost(): Promise<gpuGPUDeviceLostInfo>;
2516
- get features(): gpuGPUSupportedFeatures;
2517
- get limits(): gpuGPUSupportedLimits;
2767
+ popErrorScope(): Promise<GPUError | null>;
2768
+ get queue(): GPUQueue;
2769
+ get lost(): Promise<GPUDeviceLostInfo>;
2770
+ get features(): GPUSupportedFeatures;
2771
+ get limits(): GPUSupportedLimits;
2518
2772
  }
2519
- declare interface gpuGPUDeviceDescriptor {
2773
+ interface GPUDeviceDescriptor {
2520
2774
  label?: string;
2521
2775
  requiredFeatures?: string[];
2522
2776
  requiredLimits?: Record<string, number | bigint>;
2523
- defaultQueue?: gpuGPUQueueDescriptor;
2777
+ defaultQueue?: GPUQueueDescriptor;
2524
2778
  }
2525
- declare interface gpuGPUBufferDescriptor {
2779
+ interface GPUBufferDescriptor {
2526
2780
  label: string;
2527
2781
  size: number | bigint;
2528
2782
  usage: number;
2529
2783
  mappedAtCreation: boolean;
2530
2784
  }
2531
- declare interface gpuGPUQueueDescriptor {
2785
+ interface GPUQueueDescriptor {
2532
2786
  label?: string;
2533
2787
  }
2534
- declare abstract class gpuGPUBufferUsage {
2788
+ declare abstract class GPUBufferUsage {
2535
2789
  static readonly MAP_READ: number;
2536
2790
  static readonly MAP_WRITE: number;
2537
2791
  static readonly COPY_SRC: number;
@@ -2543,7 +2797,7 @@ declare abstract class gpuGPUBufferUsage {
2543
2797
  static readonly INDIRECT: number;
2544
2798
  static readonly QUERY_RESOLVE: number;
2545
2799
  }
2546
- declare interface gpuGPUBuffer {
2800
+ interface GPUBuffer {
2547
2801
  getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
2548
2802
  unmap(): void;
2549
2803
  destroy(): void;
@@ -2556,59 +2810,59 @@ declare interface gpuGPUBuffer {
2556
2810
  get usage(): number;
2557
2811
  get mapState(): string;
2558
2812
  }
2559
- declare abstract class gpuGPUShaderStage {
2813
+ declare abstract class GPUShaderStage {
2560
2814
  static readonly VERTEX: number;
2561
2815
  static readonly FRAGMENT: number;
2562
2816
  static readonly COMPUTE: number;
2563
2817
  }
2564
- declare interface gpuGPUBindGroupLayoutDescriptor {
2818
+ interface GPUBindGroupLayoutDescriptor {
2565
2819
  label?: string;
2566
- entries: gpuGPUBindGroupLayoutEntry[];
2820
+ entries: GPUBindGroupLayoutEntry[];
2567
2821
  }
2568
- declare interface gpuGPUBindGroupLayoutEntry {
2822
+ interface GPUBindGroupLayoutEntry {
2569
2823
  binding: number;
2570
2824
  visibility: number;
2571
- buffer?: gpuGPUBufferBindingLayout;
2572
- sampler?: gpuGPUSamplerBindingLayout;
2573
- texture?: gpuGPUTextureBindingLayout;
2574
- storageTexture?: gpuGPUStorageTextureBindingLayout;
2825
+ buffer?: GPUBufferBindingLayout;
2826
+ sampler?: GPUSamplerBindingLayout;
2827
+ texture?: GPUTextureBindingLayout;
2828
+ storageTexture?: GPUStorageTextureBindingLayout;
2575
2829
  }
2576
- declare interface gpuGPUStorageTextureBindingLayout {
2830
+ interface GPUStorageTextureBindingLayout {
2577
2831
  access?: string;
2578
2832
  format: string;
2579
2833
  viewDimension?: string;
2580
2834
  }
2581
- declare interface gpuGPUTextureBindingLayout {
2835
+ interface GPUTextureBindingLayout {
2582
2836
  sampleType?: string;
2583
2837
  viewDimension?: string;
2584
2838
  multisampled?: boolean;
2585
2839
  }
2586
- declare interface gpuGPUSamplerBindingLayout {
2840
+ interface GPUSamplerBindingLayout {
2587
2841
  type?: string;
2588
2842
  }
2589
- declare interface gpuGPUBufferBindingLayout {
2843
+ interface GPUBufferBindingLayout {
2590
2844
  type?: string;
2591
2845
  hasDynamicOffset?: boolean;
2592
2846
  minBindingSize?: number | bigint;
2593
2847
  }
2594
- declare interface gpuGPUBindGroupLayout {}
2595
- declare interface gpuGPUBindGroup {}
2596
- declare interface gpuGPUBindGroupDescriptor {
2848
+ interface GPUBindGroupLayout {}
2849
+ interface GPUBindGroup {}
2850
+ interface GPUBindGroupDescriptor {
2597
2851
  label?: string;
2598
- layout: gpuGPUBindGroupLayout;
2599
- entries: gpuGPUBindGroupEntry[];
2852
+ layout: GPUBindGroupLayout;
2853
+ entries: GPUBindGroupEntry[];
2600
2854
  }
2601
- declare interface gpuGPUBindGroupEntry {
2855
+ interface GPUBindGroupEntry {
2602
2856
  binding: number;
2603
- resource: gpuGPUBufferBinding | gpuGPUSampler;
2857
+ resource: GPUBufferBinding | GPUSampler;
2604
2858
  }
2605
- declare interface gpuGPUBufferBinding {
2606
- buffer: gpuGPUBuffer;
2859
+ interface GPUBufferBinding {
2860
+ buffer: GPUBuffer;
2607
2861
  offset?: number | bigint;
2608
2862
  size?: number | bigint;
2609
2863
  }
2610
- declare interface gpuGPUSampler {}
2611
- declare interface gpuGPUSamplerDescriptor {
2864
+ interface GPUSampler {}
2865
+ interface GPUSamplerDescriptor {
2612
2866
  label?: string;
2613
2867
  addressModeU?: string;
2614
2868
  addressModeV?: string;
@@ -2621,76 +2875,74 @@ declare interface gpuGPUSamplerDescriptor {
2621
2875
  compare: string;
2622
2876
  maxAnisotropy?: number;
2623
2877
  }
2624
- declare interface gpuGPUShaderModule {
2625
- getCompilationInfo(): Promise<gpuGPUCompilationInfo>;
2878
+ interface GPUShaderModule {
2879
+ getCompilationInfo(): Promise<GPUCompilationInfo>;
2626
2880
  }
2627
- declare interface gpuGPUShaderModuleDescriptor {
2881
+ interface GPUShaderModuleDescriptor {
2628
2882
  label?: string;
2629
2883
  code: string;
2630
2884
  }
2631
- declare interface gpuGPUPipelineLayout {}
2632
- declare interface gpuGPUPipelineLayoutDescriptor {
2885
+ interface GPUPipelineLayout {}
2886
+ interface GPUPipelineLayoutDescriptor {
2633
2887
  label?: string;
2634
- bindGroupLayouts: gpuGPUBindGroupLayout[];
2888
+ bindGroupLayouts: GPUBindGroupLayout[];
2635
2889
  }
2636
- declare interface gpuGPUComputePipeline {
2637
- getBindGroupLayout(index: number): gpuGPUBindGroupLayout;
2890
+ interface GPUComputePipeline {
2891
+ getBindGroupLayout(index: number): GPUBindGroupLayout;
2638
2892
  }
2639
- declare interface gpuGPUComputePipelineDescriptor {
2893
+ interface GPUComputePipelineDescriptor {
2640
2894
  label?: string;
2641
- compute: gpuGPUProgrammableStage;
2642
- layout: string | gpuGPUPipelineLayout;
2895
+ compute: GPUProgrammableStage;
2896
+ layout: string | GPUPipelineLayout;
2643
2897
  }
2644
- declare interface gpuGPUProgrammableStage {
2645
- module: gpuGPUShaderModule;
2898
+ interface GPUProgrammableStage {
2899
+ module: GPUShaderModule;
2646
2900
  entryPoint: string;
2647
2901
  constants?: Record<string, number>;
2648
2902
  }
2649
- declare interface gpuGPUCommandEncoder {
2903
+ interface GPUCommandEncoder {
2650
2904
  get label(): string;
2651
2905
  beginComputePass(
2652
- descriptor?: gpuGPUComputePassDescriptor,
2653
- ): gpuGPUComputePassEncoder;
2654
- beginRenderPass(
2655
- descriptor: gpuGPURenderPassDescriptor,
2656
- ): gpuGPURenderPassEncoder;
2906
+ descriptor?: GPUComputePassDescriptor,
2907
+ ): GPUComputePassEncoder;
2908
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
2657
2909
  copyBufferToBuffer(
2658
- source: gpuGPUBuffer,
2910
+ source: GPUBuffer,
2659
2911
  sourceOffset: number | bigint,
2660
- destination: gpuGPUBuffer,
2912
+ destination: GPUBuffer,
2661
2913
  destinationOffset: number | bigint,
2662
2914
  size: number | bigint,
2663
2915
  ): void;
2664
- finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
2916
+ finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
2665
2917
  copyTextureToBuffer(
2666
- source: gpuGPUImageCopyTexture,
2667
- destination: gpuGPUImageCopyBuffer,
2668
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2918
+ source: GPUImageCopyTexture,
2919
+ destination: GPUImageCopyBuffer,
2920
+ copySize: Iterable<number> | GPUExtent3DDict,
2669
2921
  ): void;
2670
2922
  copyBufferToTexture(
2671
- source: gpuGPUImageCopyBuffer,
2672
- destination: gpuGPUImageCopyTexture,
2673
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2923
+ source: GPUImageCopyBuffer,
2924
+ destination: GPUImageCopyTexture,
2925
+ copySize: Iterable<number> | GPUExtent3DDict,
2674
2926
  ): void;
2675
2927
  copyTextureToTexture(
2676
- source: gpuGPUImageCopyTexture,
2677
- destination: gpuGPUImageCopyTexture,
2678
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2928
+ source: GPUImageCopyTexture,
2929
+ destination: GPUImageCopyTexture,
2930
+ copySize: Iterable<number> | GPUExtent3DDict,
2679
2931
  ): void;
2680
2932
  clearBuffer(
2681
- buffer: gpuGPUBuffer,
2933
+ buffer: GPUBuffer,
2682
2934
  offset?: number | bigint,
2683
2935
  size?: number | bigint,
2684
2936
  ): void;
2685
2937
  }
2686
- declare interface gpuGPUCommandEncoderDescriptor {
2938
+ interface GPUCommandEncoderDescriptor {
2687
2939
  label?: string;
2688
2940
  }
2689
- declare interface gpuGPUComputePassEncoder {
2690
- setPipeline(pipeline: gpuGPUComputePipeline): void;
2941
+ interface GPUComputePassEncoder {
2942
+ setPipeline(pipeline: GPUComputePipeline): void;
2691
2943
  setBindGroup(
2692
2944
  index: number,
2693
- bindGroup: gpuGPUBindGroup | null,
2945
+ bindGroup: GPUBindGroup | null,
2694
2946
  dynamicOffsets?: Iterable<number>,
2695
2947
  ): void;
2696
2948
  dispatchWorkgroups(
@@ -2700,48 +2952,48 @@ declare interface gpuGPUComputePassEncoder {
2700
2952
  ): void;
2701
2953
  end(): void;
2702
2954
  }
2703
- declare interface gpuGPUComputePassDescriptor {
2955
+ interface GPUComputePassDescriptor {
2704
2956
  label?: string;
2705
- timestampWrites?: gpuGPUComputePassTimestampWrites;
2957
+ timestampWrites?: GPUComputePassTimestampWrites;
2706
2958
  }
2707
- declare interface gpuGPUQuerySet {}
2708
- declare interface gpuGPUQuerySetDescriptor {
2959
+ interface GPUQuerySet {}
2960
+ interface GPUQuerySetDescriptor {
2709
2961
  label?: string;
2710
2962
  }
2711
- declare interface gpuGPUComputePassTimestampWrites {
2712
- querySet: gpuGPUQuerySet;
2963
+ interface GPUComputePassTimestampWrites {
2964
+ querySet: GPUQuerySet;
2713
2965
  beginningOfPassWriteIndex?: number;
2714
2966
  endOfPassWriteIndex?: number;
2715
2967
  }
2716
- declare interface gpuGPUCommandBufferDescriptor {
2968
+ interface GPUCommandBufferDescriptor {
2717
2969
  label?: string;
2718
2970
  }
2719
- declare interface gpuGPUCommandBuffer {}
2720
- declare interface gpuGPUQueue {
2721
- submit(commandBuffers: gpuGPUCommandBuffer[]): void;
2971
+ interface GPUCommandBuffer {}
2972
+ interface GPUQueue {
2973
+ submit(commandBuffers: GPUCommandBuffer[]): void;
2722
2974
  writeBuffer(
2723
- buffer: gpuGPUBuffer,
2975
+ buffer: GPUBuffer,
2724
2976
  bufferOffset: number | bigint,
2725
2977
  data: ArrayBuffer | ArrayBufferView,
2726
2978
  dataOffset?: number | bigint,
2727
2979
  size?: number | bigint,
2728
2980
  ): void;
2729
2981
  }
2730
- declare abstract class gpuGPUMapMode {
2982
+ declare abstract class GPUMapMode {
2731
2983
  static readonly READ: number;
2732
2984
  static readonly WRITE: number;
2733
2985
  }
2734
- declare interface gpuGPUAdapterInfo {
2986
+ interface GPUAdapterInfo {
2735
2987
  get vendor(): string;
2736
2988
  get architecture(): string;
2737
2989
  get device(): string;
2738
2990
  get description(): string;
2739
2991
  }
2740
- declare interface gpuGPUSupportedFeatures {
2992
+ interface GPUSupportedFeatures {
2741
2993
  has(name: string): boolean;
2742
2994
  keys(): string[];
2743
2995
  }
2744
- declare interface gpuGPUSupportedLimits {
2996
+ interface GPUSupportedLimits {
2745
2997
  get maxTextureDimension1D(): number;
2746
2998
  get maxTextureDimension2D(): number;
2747
2999
  get maxTextureDimension3D(): number;
@@ -2774,17 +3026,17 @@ declare interface gpuGPUSupportedLimits {
2774
3026
  get maxComputeWorkgroupSizeZ(): number;
2775
3027
  get maxComputeWorkgroupsPerDimension(): number;
2776
3028
  }
2777
- declare abstract class gpuGPUError {
3029
+ declare abstract class GPUError {
2778
3030
  get message(): string;
2779
3031
  }
2780
- declare abstract class gpuGPUOutOfMemoryError extends gpuGPUError {}
2781
- declare abstract class gpuGPUInternalError extends gpuGPUError {}
2782
- declare abstract class gpuGPUValidationError extends gpuGPUError {}
2783
- declare abstract class gpuGPUDeviceLostInfo {
3032
+ declare abstract class GPUOutOfMemoryError extends GPUError {}
3033
+ declare abstract class GPUInternalError extends GPUError {}
3034
+ declare abstract class GPUValidationError extends GPUError {}
3035
+ declare abstract class GPUDeviceLostInfo {
2784
3036
  get message(): string;
2785
3037
  get reason(): string;
2786
3038
  }
2787
- declare interface gpuGPUCompilationMessage {
3039
+ interface GPUCompilationMessage {
2788
3040
  get message(): string;
2789
3041
  get type(): string;
2790
3042
  get lineNum(): number;
@@ -2792,19 +3044,19 @@ declare interface gpuGPUCompilationMessage {
2792
3044
  get offset(): number;
2793
3045
  get length(): number;
2794
3046
  }
2795
- declare interface gpuGPUCompilationInfo {
2796
- get messages(): gpuGPUCompilationMessage[];
3047
+ interface GPUCompilationInfo {
3048
+ get messages(): GPUCompilationMessage[];
2797
3049
  }
2798
- declare abstract class gpuGPUTextureUsage {
3050
+ declare abstract class GPUTextureUsage {
2799
3051
  static readonly COPY_SRC: number;
2800
3052
  static readonly COPY_DST: number;
2801
3053
  static readonly TEXTURE_BINDING: number;
2802
3054
  static readonly STORAGE_BINDING: number;
2803
3055
  static readonly RENDER_ATTACHMENT: number;
2804
3056
  }
2805
- declare interface gpuGPUTextureDescriptor {
3057
+ interface GPUTextureDescriptor {
2806
3058
  label: string;
2807
- size: number[] | gpuGPUExtent3DDict;
3059
+ size: number[] | GPUExtent3DDict;
2808
3060
  mipLevelCount?: number;
2809
3061
  sampleCount?: number;
2810
3062
  dimension?: string;
@@ -2812,13 +3064,13 @@ declare interface gpuGPUTextureDescriptor {
2812
3064
  usage: number;
2813
3065
  viewFormats?: string[];
2814
3066
  }
2815
- declare interface gpuGPUExtent3DDict {
3067
+ interface GPUExtent3DDict {
2816
3068
  width: number;
2817
3069
  height?: number;
2818
3070
  depthOrArrayLayers?: number;
2819
3071
  }
2820
- declare interface gpuGPUTexture {
2821
- createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
3072
+ interface GPUTexture {
3073
+ createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
2822
3074
  destroy(): void;
2823
3075
  get width(): number;
2824
3076
  get height(): number;
@@ -2828,8 +3080,8 @@ declare interface gpuGPUTexture {
2828
3080
  get format(): string;
2829
3081
  get usage(): number;
2830
3082
  }
2831
- declare interface gpuGPUTextureView {}
2832
- declare interface gpuGPUTextureViewDescriptor {
3083
+ interface GPUTextureView {}
3084
+ interface GPUTextureViewDescriptor {
2833
3085
  label: string;
2834
3086
  format: string;
2835
3087
  dimension: string;
@@ -2839,91 +3091,91 @@ declare interface gpuGPUTextureViewDescriptor {
2839
3091
  baseArrayLayer?: number;
2840
3092
  arrayLayerCount: number;
2841
3093
  }
2842
- declare abstract class gpuGPUColorWrite {
3094
+ declare abstract class GPUColorWrite {
2843
3095
  static readonly RED: number;
2844
3096
  static readonly GREEN: number;
2845
3097
  static readonly BLUE: number;
2846
3098
  static readonly ALPHA: number;
2847
3099
  static readonly ALL: number;
2848
3100
  }
2849
- declare interface gpuGPURenderPipeline {}
2850
- declare interface gpuGPURenderPipelineDescriptor {
3101
+ interface GPURenderPipeline {}
3102
+ interface GPURenderPipelineDescriptor {
2851
3103
  label?: string;
2852
- layout: string | gpuGPUPipelineLayout;
2853
- vertex: gpuGPUVertexState;
2854
- primitive?: gpuGPUPrimitiveState;
2855
- depthStencil?: gpuGPUDepthStencilState;
2856
- multisample?: gpuGPUMultisampleState;
2857
- fragment?: gpuGPUFragmentState;
2858
- }
2859
- declare interface gpuGPUVertexState {
2860
- module: gpuGPUShaderModule;
3104
+ layout: string | GPUPipelineLayout;
3105
+ vertex: GPUVertexState;
3106
+ primitive?: GPUPrimitiveState;
3107
+ depthStencil?: GPUDepthStencilState;
3108
+ multisample?: GPUMultisampleState;
3109
+ fragment?: GPUFragmentState;
3110
+ }
3111
+ interface GPUVertexState {
3112
+ module: GPUShaderModule;
2861
3113
  entryPoint: string;
2862
3114
  constants?: Record<string, number>;
2863
- buffers?: gpuGPUVertexBufferLayout[];
3115
+ buffers?: GPUVertexBufferLayout[];
2864
3116
  }
2865
- declare interface gpuGPUVertexBufferLayout {
3117
+ interface GPUVertexBufferLayout {
2866
3118
  arrayStride: number | bigint;
2867
3119
  stepMode?: string;
2868
- attributes: gpuGPUVertexAttribute[];
3120
+ attributes: GPUVertexAttribute[];
2869
3121
  }
2870
- declare interface gpuGPUVertexAttribute {
3122
+ interface GPUVertexAttribute {
2871
3123
  format: string;
2872
3124
  offset: number | bigint;
2873
3125
  shaderLocation: number;
2874
3126
  }
2875
- declare interface gpuGPUPrimitiveState {
3127
+ interface GPUPrimitiveState {
2876
3128
  topology?: string;
2877
3129
  stripIndexFormat?: string;
2878
3130
  frontFace?: string;
2879
3131
  cullMode?: string;
2880
3132
  unclippedDepth?: boolean;
2881
3133
  }
2882
- declare interface gpuGPUStencilFaceState {
3134
+ interface GPUStencilFaceState {
2883
3135
  compare?: string;
2884
3136
  failOp?: string;
2885
3137
  depthFailOp?: string;
2886
3138
  passOp?: string;
2887
3139
  }
2888
- declare interface gpuGPUDepthStencilState {
3140
+ interface GPUDepthStencilState {
2889
3141
  format: string;
2890
3142
  depthWriteEnabled: boolean;
2891
3143
  depthCompare: string;
2892
- stencilFront?: gpuGPUStencilFaceState;
2893
- stencilBack?: gpuGPUStencilFaceState;
3144
+ stencilFront?: GPUStencilFaceState;
3145
+ stencilBack?: GPUStencilFaceState;
2894
3146
  stencilReadMask?: number;
2895
3147
  stencilWriteMask?: number;
2896
3148
  depthBias?: number;
2897
3149
  depthBiasSlopeScale?: number;
2898
3150
  depthBiasClamp?: number;
2899
3151
  }
2900
- declare interface gpuGPUMultisampleState {
3152
+ interface GPUMultisampleState {
2901
3153
  count?: number;
2902
3154
  mask?: number;
2903
3155
  alphaToCoverageEnabled?: boolean;
2904
3156
  }
2905
- declare interface gpuGPUFragmentState {
2906
- module: gpuGPUShaderModule;
3157
+ interface GPUFragmentState {
3158
+ module: GPUShaderModule;
2907
3159
  entryPoint: string;
2908
3160
  constants?: Record<string, number>;
2909
- targets: gpuGPUColorTargetState[];
3161
+ targets: GPUColorTargetState[];
2910
3162
  }
2911
- declare interface gpuGPUColorTargetState {
3163
+ interface GPUColorTargetState {
2912
3164
  format: string;
2913
- blend: gpuGPUBlendState;
3165
+ blend: GPUBlendState;
2914
3166
  writeMask?: number;
2915
3167
  }
2916
- declare interface gpuGPUBlendState {
2917
- color: gpuGPUBlendComponent;
2918
- alpha: gpuGPUBlendComponent;
3168
+ interface GPUBlendState {
3169
+ color: GPUBlendComponent;
3170
+ alpha: GPUBlendComponent;
2919
3171
  }
2920
- declare interface gpuGPUBlendComponent {
3172
+ interface GPUBlendComponent {
2921
3173
  operation?: string;
2922
3174
  srcFactor?: string;
2923
3175
  dstFactor?: string;
2924
3176
  }
2925
- declare interface gpuGPURenderPassEncoder {
2926
- setPipeline(pipeline: gpuGPURenderPipeline): void;
3177
+ interface GPURenderPassEncoder {
3178
+ setPipeline(pipeline: GPURenderPipeline): void;
2927
3179
  draw(
2928
3180
  vertexCount: number,
2929
3181
  instanceCount?: number,
@@ -2932,30 +3184,30 @@ declare interface gpuGPURenderPassEncoder {
2932
3184
  ): void;
2933
3185
  end(): void;
2934
3186
  }
2935
- declare interface gpuGPURenderPassDescriptor {
3187
+ interface GPURenderPassDescriptor {
2936
3188
  label?: string;
2937
- colorAttachments: gpuGPURenderPassColorAttachment[];
2938
- depthStencilAttachment?: gpuGPURenderPassDepthStencilAttachment;
2939
- occlusionQuerySet?: gpuGPUQuerySet;
2940
- timestampWrites?: gpuGPURenderPassTimestampWrites;
3189
+ colorAttachments: GPURenderPassColorAttachment[];
3190
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
3191
+ occlusionQuerySet?: GPUQuerySet;
3192
+ timestampWrites?: GPURenderPassTimestampWrites;
2941
3193
  maxDrawCount?: number | bigint;
2942
3194
  }
2943
- declare interface gpuGPURenderPassColorAttachment {
2944
- view: gpuGPUTextureView;
3195
+ interface GPURenderPassColorAttachment {
3196
+ view: GPUTextureView;
2945
3197
  depthSlice?: number;
2946
- resolveTarget?: gpuGPUTextureView;
2947
- clearValue?: number[] | gpuGPUColorDict;
3198
+ resolveTarget?: GPUTextureView;
3199
+ clearValue?: number[] | GPUColorDict;
2948
3200
  loadOp: string;
2949
3201
  storeOp: string;
2950
3202
  }
2951
- declare interface gpuGPUColorDict {
3203
+ interface GPUColorDict {
2952
3204
  r: number;
2953
3205
  g: number;
2954
3206
  b: number;
2955
3207
  a: number;
2956
3208
  }
2957
- declare interface gpuGPURenderPassDepthStencilAttachment {
2958
- view: gpuGPUTextureView;
3209
+ interface GPURenderPassDepthStencilAttachment {
3210
+ view: GPUTextureView;
2959
3211
  depthClearValue?: number;
2960
3212
  depthLoadOp?: string;
2961
3213
  depthStoreOp?: string;
@@ -2965,28 +3217,29 @@ declare interface gpuGPURenderPassDepthStencilAttachment {
2965
3217
  stencilStoreOp?: string;
2966
3218
  stencilReadOnly?: boolean;
2967
3219
  }
2968
- declare interface gpuGPURenderPassTimestampWrites {
2969
- querySet: gpuGPUQuerySet;
3220
+ interface GPURenderPassTimestampWrites {
3221
+ querySet: GPUQuerySet;
2970
3222
  beginningOfPassWriteIndex?: number;
2971
3223
  endOfPassWriteIndex?: number;
2972
3224
  }
2973
- declare interface gpuGPUImageCopyTexture {
2974
- texture: gpuGPUTexture;
3225
+ interface GPUImageCopyTexture {
3226
+ texture: GPUTexture;
2975
3227
  mipLevel?: number;
2976
- origin?: number[] | gpuGPUOrigin3DDict;
3228
+ origin?: number[] | GPUOrigin3DDict;
2977
3229
  aspect?: string;
2978
3230
  }
2979
- declare interface gpuGPUImageCopyBuffer {
2980
- buffer: gpuGPUBuffer;
3231
+ interface GPUImageCopyBuffer {
3232
+ buffer: GPUBuffer;
2981
3233
  offset?: number | bigint;
2982
3234
  bytesPerRow?: number;
2983
3235
  rowsPerImage?: number;
2984
3236
  }
2985
- declare interface gpuGPUOrigin3DDict {
3237
+ interface GPUOrigin3DDict {
2986
3238
  x?: number;
2987
3239
  y?: number;
2988
3240
  z?: number;
2989
3241
  }
3242
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
2990
3243
  declare class EventSource {
2991
3244
  constructor(url: string, init?: EventSourceEventSourceInit);
2992
3245
  /**
@@ -3013,31 +3266,31 @@ declare class EventSource {
3013
3266
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
3014
3267
  */
3015
3268
  get readyState(): number;
3016
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3269
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3017
3270
  get onopen(): any | null;
3018
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3271
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3019
3272
  set onopen(value: any | null);
3020
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3273
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3021
3274
  get onmessage(): any | null;
3022
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3275
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3023
3276
  set onmessage(value: any | null);
3024
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3277
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3025
3278
  get onerror(): any | null;
3026
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3279
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3027
3280
  set onerror(value: any | null);
3028
3281
  static readonly CONNECTING: number;
3029
3282
  static readonly OPEN: number;
3030
3283
  static readonly CLOSED: number;
3031
3284
  static from(stream: ReadableStream): EventSource;
3032
3285
  }
3033
- declare interface EventSourceEventSourceInit {
3286
+ interface EventSourceEventSourceInit {
3034
3287
  withCredentials?: boolean;
3035
3288
  fetcher?: Fetcher;
3036
3289
  }
3037
- declare type AiImageClassificationInput = {
3290
+ type AiImageClassificationInput = {
3038
3291
  image: number[];
3039
3292
  };
3040
- declare type AiImageClassificationOutput = {
3293
+ type AiImageClassificationOutput = {
3041
3294
  score?: number;
3042
3295
  label?: string;
3043
3296
  }[];
@@ -3045,7 +3298,7 @@ declare abstract class BaseAiImageClassification {
3045
3298
  inputs: AiImageClassificationInput;
3046
3299
  postProcessedOutputs: AiImageClassificationOutput;
3047
3300
  }
3048
- declare type AiImageToTextInput = {
3301
+ type AiImageToTextInput = {
3049
3302
  image: number[];
3050
3303
  prompt?: string;
3051
3304
  max_tokens?: number;
@@ -3059,17 +3312,17 @@ declare type AiImageToTextInput = {
3059
3312
  raw?: boolean;
3060
3313
  messages?: RoleScopedChatInput[];
3061
3314
  };
3062
- declare type AiImageToTextOutput = {
3315
+ type AiImageToTextOutput = {
3063
3316
  description: string;
3064
3317
  };
3065
3318
  declare abstract class BaseAiImageToText {
3066
3319
  inputs: AiImageToTextInput;
3067
3320
  postProcessedOutputs: AiImageToTextOutput;
3068
3321
  }
3069
- declare type AiObjectDetectionInput = {
3322
+ type AiObjectDetectionInput = {
3070
3323
  image: number[];
3071
3324
  };
3072
- declare type AiObjectDetectionOutput = {
3325
+ type AiObjectDetectionOutput = {
3073
3326
  score?: number;
3074
3327
  label?: string;
3075
3328
  }[];
@@ -3077,19 +3330,19 @@ declare abstract class BaseAiObjectDetection {
3077
3330
  inputs: AiObjectDetectionInput;
3078
3331
  postProcessedOutputs: AiObjectDetectionOutput;
3079
3332
  }
3080
- declare type AiSentenceSimilarityInput = {
3333
+ type AiSentenceSimilarityInput = {
3081
3334
  source: string;
3082
3335
  sentences: string[];
3083
3336
  };
3084
- declare type AiSentenceSimilarityOutput = number[];
3337
+ type AiSentenceSimilarityOutput = number[];
3085
3338
  declare abstract class BaseAiSentenceSimilarity {
3086
3339
  inputs: AiSentenceSimilarityInput;
3087
3340
  postProcessedOutputs: AiSentenceSimilarityOutput;
3088
3341
  }
3089
- declare type AiSpeechRecognitionInput = {
3342
+ type AiSpeechRecognitionInput = {
3090
3343
  audio: number[];
3091
3344
  };
3092
- declare type AiSpeechRecognitionOutput = {
3345
+ type AiSpeechRecognitionOutput = {
3093
3346
  text?: string;
3094
3347
  words?: {
3095
3348
  word: string;
@@ -3102,21 +3355,21 @@ declare abstract class BaseAiSpeechRecognition {
3102
3355
  inputs: AiSpeechRecognitionInput;
3103
3356
  postProcessedOutputs: AiSpeechRecognitionOutput;
3104
3357
  }
3105
- declare type AiSummarizationInput = {
3358
+ type AiSummarizationInput = {
3106
3359
  input_text: string;
3107
3360
  max_length?: number;
3108
3361
  };
3109
- declare type AiSummarizationOutput = {
3362
+ type AiSummarizationOutput = {
3110
3363
  summary: string;
3111
3364
  };
3112
3365
  declare abstract class BaseAiSummarization {
3113
3366
  inputs: AiSummarizationInput;
3114
3367
  postProcessedOutputs: AiSummarizationOutput;
3115
3368
  }
3116
- declare type AiTextClassificationInput = {
3369
+ type AiTextClassificationInput = {
3117
3370
  text: string;
3118
3371
  };
3119
- declare type AiTextClassificationOutput = {
3372
+ type AiTextClassificationOutput = {
3120
3373
  score?: number;
3121
3374
  label?: string;
3122
3375
  }[];
@@ -3124,10 +3377,10 @@ declare abstract class BaseAiTextClassification {
3124
3377
  inputs: AiTextClassificationInput;
3125
3378
  postProcessedOutputs: AiTextClassificationOutput;
3126
3379
  }
3127
- declare type AiTextEmbeddingsInput = {
3380
+ type AiTextEmbeddingsInput = {
3128
3381
  text: string | string[];
3129
3382
  };
3130
- declare type AiTextEmbeddingsOutput = {
3383
+ type AiTextEmbeddingsOutput = {
3131
3384
  shape: number[];
3132
3385
  data: number[][];
3133
3386
  };
@@ -3135,11 +3388,11 @@ declare abstract class BaseAiTextEmbeddings {
3135
3388
  inputs: AiTextEmbeddingsInput;
3136
3389
  postProcessedOutputs: AiTextEmbeddingsOutput;
3137
3390
  }
3138
- declare type RoleScopedChatInput = {
3391
+ type RoleScopedChatInput = {
3139
3392
  role: "user" | "assistant" | "system" | "tool";
3140
3393
  content: string;
3141
3394
  };
3142
- declare type AiTextGenerationToolInput = {
3395
+ type AiTextGenerationToolInput = {
3143
3396
  type: "function";
3144
3397
  function: {
3145
3398
  name: string;
@@ -3156,7 +3409,7 @@ declare type AiTextGenerationToolInput = {
3156
3409
  };
3157
3410
  };
3158
3411
  };
3159
- declare type AiTextGenerationInput = {
3412
+ type AiTextGenerationInput = {
3160
3413
  prompt?: string;
3161
3414
  raw?: boolean;
3162
3415
  stream?: boolean;
@@ -3171,7 +3424,7 @@ declare type AiTextGenerationInput = {
3171
3424
  messages?: RoleScopedChatInput[];
3172
3425
  tools?: AiTextGenerationToolInput[];
3173
3426
  };
3174
- declare type AiTextGenerationOutput =
3427
+ type AiTextGenerationOutput =
3175
3428
  | {
3176
3429
  response?: string;
3177
3430
  tool_calls?: {
@@ -3184,7 +3437,7 @@ declare abstract class BaseAiTextGeneration {
3184
3437
  inputs: AiTextGenerationInput;
3185
3438
  postProcessedOutputs: AiTextGenerationOutput;
3186
3439
  }
3187
- declare type AiTextToImageInput = {
3440
+ type AiTextToImageInput = {
3188
3441
  prompt: string;
3189
3442
  image?: number[];
3190
3443
  mask?: number[];
@@ -3192,53 +3445,52 @@ declare type AiTextToImageInput = {
3192
3445
  strength?: number;
3193
3446
  guidance?: number;
3194
3447
  };
3195
- declare type AiTextToImageOutput = Uint8Array;
3448
+ type AiTextToImageOutput = Uint8Array;
3196
3449
  declare abstract class BaseAiTextToImage {
3197
3450
  inputs: AiTextToImageInput;
3198
3451
  postProcessedOutputs: AiTextToImageOutput;
3199
3452
  }
3200
- declare type AiTranslationInput = {
3453
+ type AiTranslationInput = {
3201
3454
  text: string;
3202
3455
  target_lang: string;
3203
3456
  source_lang?: string;
3204
3457
  };
3205
- declare type AiTranslationOutput = {
3458
+ type AiTranslationOutput = {
3206
3459
  translated_text?: string;
3207
3460
  };
3208
3461
  declare abstract class BaseAiTranslation {
3209
3462
  inputs: AiTranslationInput;
3210
3463
  postProcessedOutputs: AiTranslationOutput;
3211
3464
  }
3212
- declare type GatewayOptions = {
3465
+ type GatewayOptions = {
3213
3466
  id: string;
3214
3467
  cacheTtl?: number;
3215
3468
  skipCache?: boolean;
3216
3469
  metadata?: Record<string, number | string | boolean | null | bigint>;
3217
3470
  };
3218
- declare type AiOptions = {
3471
+ type AiOptions = {
3219
3472
  gateway?: GatewayOptions;
3220
3473
  prefix?: string;
3221
3474
  extraHeaders?: object;
3222
3475
  };
3223
- declare type BaseAiTextClassificationModels =
3224
- "@cf/huggingface/distilbert-sst-2-int8";
3225
- declare type BaseAiTextToImageModels =
3476
+ type BaseAiTextClassificationModels = "@cf/huggingface/distilbert-sst-2-int8";
3477
+ type BaseAiTextToImageModels =
3226
3478
  | "@cf/stabilityai/stable-diffusion-xl-base-1.0"
3227
3479
  | "@cf/runwayml/stable-diffusion-v1-5-inpainting"
3228
3480
  | "@cf/runwayml/stable-diffusion-v1-5-img2img"
3229
3481
  | "@cf/lykon/dreamshaper-8-lcm"
3230
3482
  | "@cf/bytedance/stable-diffusion-xl-lightning";
3231
- declare type BaseAiTextEmbeddingsModels =
3483
+ type BaseAiTextEmbeddingsModels =
3232
3484
  | "@cf/baai/bge-small-en-v1.5"
3233
3485
  | "@cf/baai/bge-base-en-v1.5"
3234
3486
  | "@cf/baai/bge-large-en-v1.5";
3235
- declare type BaseAiSpeechRecognitionModels =
3487
+ type BaseAiSpeechRecognitionModels =
3236
3488
  | "@cf/openai/whisper"
3237
3489
  | "@cf/openai/whisper-tiny-en"
3238
3490
  | "@cf/openai/whisper-sherpa";
3239
- declare type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
3240
- declare type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
3241
- declare type BaseAiTextGenerationModels =
3491
+ type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
3492
+ type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
3493
+ type BaseAiTextGenerationModels =
3242
3494
  | "@cf/meta/llama-3-8b-instruct"
3243
3495
  | "@cf/meta/llama-3-8b-instruct-awq"
3244
3496
  | "@cf/meta/llama-2-7b-chat-int8"
@@ -3274,9 +3526,9 @@ declare type BaseAiTextGenerationModels =
3274
3526
  | "@cf/meta-llama/llama-2-7b-chat-hf-lora"
3275
3527
  | "@cf/fblgit/una-cybertron-7b-v2-bf16"
3276
3528
  | "@cf/fblgit/una-cybertron-7b-v2-awq";
3277
- declare type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
3278
- declare type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
3279
- declare type BaseAiImageToTextModels =
3529
+ type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
3530
+ type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
3531
+ type BaseAiImageToTextModels =
3280
3532
  | "@cf/unum/uform-gen2-qwen-500m"
3281
3533
  | "@cf/llava-hf/llava-1.5-7b-hf";
3282
3534
  declare abstract class Ai {
@@ -3331,7 +3583,7 @@ declare abstract class Ai {
3331
3583
  options?: AiOptions,
3332
3584
  ): Promise<BaseAiImageToText["postProcessedOutputs"]>;
3333
3585
  }
3334
- declare interface BasicImageTransformations {
3586
+ interface BasicImageTransformations {
3335
3587
  /**
3336
3588
  * Maximum width in image pixels. The value must be an integer.
3337
3589
  */
@@ -3397,7 +3649,7 @@ declare interface BasicImageTransformations {
3397
3649
  */
3398
3650
  rotate?: 0 | 90 | 180 | 270 | 360;
3399
3651
  }
3400
- declare interface BasicImageTransformationsGravityCoordinates {
3652
+ interface BasicImageTransformationsGravityCoordinates {
3401
3653
  x: number;
3402
3654
  y: number;
3403
3655
  }
@@ -3410,7 +3662,7 @@ declare interface BasicImageTransformationsGravityCoordinates {
3410
3662
  * Note: Currently, these properties cannot be tested in the
3411
3663
  * playground.
3412
3664
  */
3413
- declare interface RequestInitCfProperties extends Record<string, unknown> {
3665
+ interface RequestInitCfProperties extends Record<string, unknown> {
3414
3666
  cacheEverything?: boolean;
3415
3667
  /**
3416
3668
  * A request's cache key is what determines if two requests are
@@ -3461,8 +3713,7 @@ declare interface RequestInitCfProperties extends Record<string, unknown> {
3461
3713
  */
3462
3714
  resolveOverride?: string;
3463
3715
  }
3464
- declare interface RequestInitCfPropertiesImageDraw
3465
- extends BasicImageTransformations {
3716
+ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
3466
3717
  /**
3467
3718
  * Absolute URL of the image file to use for the drawing. It can be any of
3468
3719
  * the supported file formats. For drawing of watermarks or non-rectangular
@@ -3499,8 +3750,7 @@ declare interface RequestInitCfPropertiesImageDraw
3499
3750
  bottom?: number;
3500
3751
  right?: number;
3501
3752
  }
3502
- declare interface RequestInitCfPropertiesImage
3503
- extends BasicImageTransformations {
3753
+ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
3504
3754
  /**
3505
3755
  * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
3506
3756
  * easier to specify higher-DPI sizes in <img srcset>.
@@ -3625,12 +3875,12 @@ declare interface RequestInitCfPropertiesImage
3625
3875
  */
3626
3876
  compression?: "fast";
3627
3877
  }
3628
- declare interface RequestInitCfPropertiesImageMinify {
3878
+ interface RequestInitCfPropertiesImageMinify {
3629
3879
  javascript?: boolean;
3630
3880
  css?: boolean;
3631
3881
  html?: boolean;
3632
3882
  }
3633
- declare interface RequestInitCfPropertiesR2 {
3883
+ interface RequestInitCfPropertiesR2 {
3634
3884
  /**
3635
3885
  * Colo id of bucket that an object is stored in
3636
3886
  */
@@ -3639,14 +3889,13 @@ declare interface RequestInitCfPropertiesR2 {
3639
3889
  /**
3640
3890
  * Request metadata provided by Cloudflare's edge.
3641
3891
  */
3642
- declare type IncomingRequestCfProperties<HostMetadata = unknown> =
3892
+ type IncomingRequestCfProperties<HostMetadata = unknown> =
3643
3893
  IncomingRequestCfPropertiesBase &
3644
3894
  IncomingRequestCfPropertiesBotManagementEnterprise &
3645
3895
  IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
3646
3896
  IncomingRequestCfPropertiesGeographicInformation &
3647
3897
  IncomingRequestCfPropertiesCloudflareAccessOrApiShield;
3648
- declare interface IncomingRequestCfPropertiesBase
3649
- extends Record<string, unknown> {
3898
+ interface IncomingRequestCfPropertiesBase extends Record<string, unknown> {
3650
3899
  /**
3651
3900
  * [ASN](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) of the incoming request.
3652
3901
  *
@@ -3724,7 +3973,7 @@ declare interface IncomingRequestCfPropertiesBase
3724
3973
  */
3725
3974
  tlsExportedAuthenticator?: IncomingRequestCfPropertiesExportedAuthenticatorMetadata;
3726
3975
  }
3727
- declare interface IncomingRequestCfPropertiesBotManagementBase {
3976
+ interface IncomingRequestCfPropertiesBotManagementBase {
3728
3977
  /**
3729
3978
  * Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
3730
3979
  * represented as an integer percentage between `1` (almost certainly a bot) and `99` (almost certainly human).
@@ -3751,7 +4000,7 @@ declare interface IncomingRequestCfPropertiesBotManagementBase {
3751
4000
  */
3752
4001
  detectionIds: number[];
3753
4002
  }
3754
- declare interface IncomingRequestCfPropertiesBotManagement {
4003
+ interface IncomingRequestCfPropertiesBotManagement {
3755
4004
  /**
3756
4005
  * Results of Cloudflare's Bot Management analysis
3757
4006
  */
@@ -3763,7 +4012,7 @@ declare interface IncomingRequestCfPropertiesBotManagement {
3763
4012
  */
3764
4013
  clientTrustScore: number;
3765
4014
  }
3766
- declare interface IncomingRequestCfPropertiesBotManagementEnterprise
4015
+ interface IncomingRequestCfPropertiesBotManagementEnterprise
3767
4016
  extends IncomingRequestCfPropertiesBotManagement {
3768
4017
  /**
3769
4018
  * Results of Cloudflare's Bot Management analysis
@@ -3776,9 +4025,7 @@ declare interface IncomingRequestCfPropertiesBotManagementEnterprise
3776
4025
  ja3Hash: string;
3777
4026
  };
3778
4027
  }
3779
- declare interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<
3780
- HostMetadata,
3781
- > {
4028
+ interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> {
3782
4029
  /**
3783
4030
  * Custom metadata set per-host in [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/).
3784
4031
  *
@@ -3787,7 +4034,7 @@ declare interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<
3787
4034
  */
3788
4035
  hostMetadata: HostMetadata;
3789
4036
  }
3790
- declare interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
4037
+ interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
3791
4038
  /**
3792
4039
  * Information about the client certificate presented to Cloudflare.
3793
4040
  *
@@ -3809,7 +4056,7 @@ declare interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
3809
4056
  /**
3810
4057
  * Metadata about the request's TLS handshake
3811
4058
  */
3812
- declare interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
4059
+ interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
3813
4060
  /**
3814
4061
  * The client's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal
3815
4062
  *
@@ -3838,7 +4085,7 @@ declare interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
3838
4085
  /**
3839
4086
  * Geographic data about the request's origin.
3840
4087
  */
3841
- declare interface IncomingRequestCfPropertiesGeographicInformation {
4088
+ interface IncomingRequestCfPropertiesGeographicInformation {
3842
4089
  /**
3843
4090
  * The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from.
3844
4091
  *
@@ -3915,7 +4162,7 @@ declare interface IncomingRequestCfPropertiesGeographicInformation {
3915
4162
  metroCode?: string;
3916
4163
  }
3917
4164
  /** Data about the incoming request's TLS certificate */
3918
- declare interface IncomingRequestCfPropertiesTLSClientAuth {
4165
+ interface IncomingRequestCfPropertiesTLSClientAuth {
3919
4166
  /** Always `"1"`, indicating that the certificate was presented */
3920
4167
  certPresented: "1";
3921
4168
  /**
@@ -4008,7 +4255,7 @@ declare interface IncomingRequestCfPropertiesTLSClientAuth {
4008
4255
  certNotAfter: string;
4009
4256
  }
4010
4257
  /** Placeholder values for TLS Client Authorization */
4011
- declare interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
4258
+ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
4012
4259
  certPresented: "0";
4013
4260
  certVerified: "NONE";
4014
4261
  certRevoked: "0";
@@ -4306,10 +4553,10 @@ declare type Iso3166Alpha2Code =
4306
4553
  | "ZW";
4307
4554
  /** The 2-letter continent codes Cloudflare uses */
4308
4555
  declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
4309
- declare type CfProperties<HostMetadata = unknown> =
4556
+ type CfProperties<HostMetadata = unknown> =
4310
4557
  | IncomingRequestCfProperties<HostMetadata>
4311
4558
  | RequestInitCfProperties;
4312
- declare interface D1Meta {
4559
+ interface D1Meta {
4313
4560
  duration: number;
4314
4561
  size_after: number;
4315
4562
  rows_read: number;
@@ -4318,15 +4565,15 @@ declare interface D1Meta {
4318
4565
  changed_db: boolean;
4319
4566
  changes: number;
4320
4567
  }
4321
- declare interface D1Response {
4568
+ interface D1Response {
4322
4569
  success: true;
4323
4570
  meta: D1Meta & Record<string, unknown>;
4324
4571
  error?: never;
4325
4572
  }
4326
- declare type D1Result<T = unknown> = D1Response & {
4573
+ type D1Result<T = unknown> = D1Response & {
4327
4574
  results: T[];
4328
4575
  };
4329
- declare interface D1ExecResult {
4576
+ interface D1ExecResult {
4330
4577
  count: number;
4331
4578
  duration: number;
4332
4579
  }
@@ -4353,11 +4600,11 @@ declare abstract class D1PreparedStatement {
4353
4600
  // but this will ensure type checking on older versions still passes.
4354
4601
  // TypeScript's interface merging will ensure our empty interface is effectively
4355
4602
  // ignored when `Disposable` is included in the standard lib.
4356
- declare interface Disposable {}
4603
+ interface Disposable {}
4357
4604
  /**
4358
4605
  * An email message that can be sent from a Worker.
4359
4606
  */
4360
- declare interface EmailMessage {
4607
+ interface EmailMessage {
4361
4608
  /**
4362
4609
  * Envelope From attribute of the email message.
4363
4610
  */
@@ -4370,7 +4617,7 @@ declare interface EmailMessage {
4370
4617
  /**
4371
4618
  * An email message that is sent to a consumer Worker and can be rejected/forwarded.
4372
4619
  */
4373
- declare interface ForwardableEmailMessage extends EmailMessage {
4620
+ interface ForwardableEmailMessage extends EmailMessage {
4374
4621
  /**
4375
4622
  * Stream of the email message content.
4376
4623
  */
@@ -4400,7 +4647,7 @@ declare interface ForwardableEmailMessage extends EmailMessage {
4400
4647
  /**
4401
4648
  * A binding that allows a Worker to send email messages.
4402
4649
  */
4403
- declare interface SendEmail {
4650
+ interface SendEmail {
4404
4651
  send(message: EmailMessage): Promise<void>;
4405
4652
  }
4406
4653
  declare abstract class EmailEvent extends ExtendableEvent {
@@ -4418,7 +4665,7 @@ declare module "cloudflare:email" {
4418
4665
  };
4419
4666
  export { _EmailMessage as EmailMessage };
4420
4667
  }
4421
- declare interface Hyperdrive {
4668
+ interface Hyperdrive {
4422
4669
  /**
4423
4670
  * Connect directly to Hyperdrive as if it's your database, returning a TCP socket.
4424
4671
  *
@@ -4465,8 +4712,8 @@ declare interface Hyperdrive {
4465
4712
  */
4466
4713
  readonly database: string;
4467
4714
  }
4468
- declare type Params<P extends string = any> = Record<P, string | string[]>;
4469
- declare type EventContext<Env, P extends string, Data> = {
4715
+ type Params<P extends string = any> = Record<P, string | string[]>;
4716
+ type EventContext<Env, P extends string, Data> = {
4470
4717
  request: Request<unknown, IncomingRequestCfProperties<unknown>>;
4471
4718
  functionPath: string;
4472
4719
  waitUntil: (promise: Promise<any>) => void;
@@ -4480,12 +4727,12 @@ declare type EventContext<Env, P extends string, Data> = {
4480
4727
  params: Params<P>;
4481
4728
  data: Data;
4482
4729
  };
4483
- declare type PagesFunction<
4730
+ type PagesFunction<
4484
4731
  Env = unknown,
4485
4732
  Params extends string = any,
4486
4733
  Data extends Record<string, unknown> = Record<string, unknown>,
4487
4734
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
4488
- declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4735
+ type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4489
4736
  request: Request<unknown, IncomingRequestCfProperties<unknown>>;
4490
4737
  functionPath: string;
4491
4738
  waitUntil: (promise: Promise<any>) => void;
@@ -4500,7 +4747,7 @@ declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4500
4747
  data: Data;
4501
4748
  pluginArgs: PluginArgs;
4502
4749
  };
4503
- declare type PagesPluginFunction<
4750
+ type PagesPluginFunction<
4504
4751
  Env = unknown,
4505
4752
  Params extends string = any,
4506
4753
  Data extends Record<string, unknown> = Record<string, unknown>,
@@ -4515,7 +4762,7 @@ declare module "assets:*" {
4515
4762
  // The message includes metadata about the broker, the client, and the payload
4516
4763
  // itself.
4517
4764
  // https://developers.cloudflare.com/pub-sub/
4518
- declare interface PubSubMessage {
4765
+ interface PubSubMessage {
4519
4766
  // Message ID
4520
4767
  readonly mid: number;
4521
4768
  // MQTT broker FQDN in the form mqtts://BROKER.NAMESPACE.cloudflarepubsub.com:PORT
@@ -4541,10 +4788,24 @@ declare interface PubSubMessage {
4541
4788
  payload: string | Uint8Array;
4542
4789
  }
4543
4790
  // JsonWebKey extended by kid parameter
4544
- declare interface JsonWebKeyWithKid extends JsonWebKey {
4791
+ interface JsonWebKeyWithKid extends JsonWebKey {
4545
4792
  // Key Identifier of the JWK
4546
4793
  readonly kid: string;
4547
4794
  }
4795
+ interface RateLimitOptions {
4796
+ key: string;
4797
+ }
4798
+ interface RateLimitOutcome {
4799
+ success: boolean;
4800
+ }
4801
+ interface RateLimit {
4802
+ /**
4803
+ * Rate limit a request based on the provided options.
4804
+ * @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
4805
+ * @returns A promise that resolves with the outcome of the rate limit.
4806
+ */
4807
+ limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
4808
+ }
4548
4809
  // Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
4549
4810
  // to referenced by `Fetcher`. This is included in the "importable" version of the types which
4550
4811
  // strips all `module` blocks.
@@ -4752,19 +5013,15 @@ declare module "cloudflare:sockets" {
4752
5013
  /**
4753
5014
  * Data types supported for holding vector metadata.
4754
5015
  */
4755
- declare type VectorizeVectorMetadataValue =
4756
- | string
4757
- | number
4758
- | boolean
4759
- | string[];
5016
+ type VectorizeVectorMetadataValue = string | number | boolean | string[];
4760
5017
  /**
4761
5018
  * Additional information to associate with a vector.
4762
5019
  */
4763
- declare type VectorizeVectorMetadata =
5020
+ type VectorizeVectorMetadata =
4764
5021
  | VectorizeVectorMetadataValue
4765
5022
  | Record<string, VectorizeVectorMetadataValue>;
4766
- declare type VectorFloatArray = Float32Array | Float64Array;
4767
- declare interface VectorizeError {
5023
+ type VectorFloatArray = Float32Array | Float64Array;
5024
+ interface VectorizeError {
4768
5025
  code?: number;
4769
5026
  error: string;
4770
5027
  }
@@ -4773,11 +5030,11 @@ declare interface VectorizeError {
4773
5030
  *
4774
5031
  * This list is expected to grow as support for more operations are released.
4775
5032
  */
4776
- declare type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
5033
+ type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
4777
5034
  /**
4778
5035
  * Filter criteria for vector metadata used to limit the retrieved query result set.
4779
5036
  */
4780
- declare type VectorizeVectorMetadataFilter = {
5037
+ type VectorizeVectorMetadataFilter = {
4781
5038
  [field: string]:
4782
5039
  | Exclude<VectorizeVectorMetadataValue, string[]>
4783
5040
  | null
@@ -4792,8 +5049,8 @@ declare type VectorizeVectorMetadataFilter = {
4792
5049
  * Supported distance metrics for an index.
4793
5050
  * Distance metrics determine how other "similar" vectors are determined.
4794
5051
  */
4795
- declare type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
4796
- declare interface VectorizeQueryOptions {
5052
+ type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
5053
+ interface VectorizeQueryOptions {
4797
5054
  topK?: number;
4798
5055
  namespace?: string;
4799
5056
  returnValues?: boolean;
@@ -4803,7 +5060,7 @@ declare interface VectorizeQueryOptions {
4803
5060
  /**
4804
5061
  * Information about the configuration of an index.
4805
5062
  */
4806
- declare type VectorizeIndexConfig =
5063
+ type VectorizeIndexConfig =
4807
5064
  | {
4808
5065
  dimensions: number;
4809
5066
  metric: VectorizeDistanceMetric;
@@ -4814,7 +5071,7 @@ declare type VectorizeIndexConfig =
4814
5071
  /**
4815
5072
  * Metadata about an existing index.
4816
5073
  */
4817
- declare interface VectorizeIndexDetails {
5074
+ interface VectorizeIndexDetails {
4818
5075
  /** The unique ID of the index */
4819
5076
  readonly id: string;
4820
5077
  /** The name of the index. */
@@ -4829,7 +5086,7 @@ declare interface VectorizeIndexDetails {
4829
5086
  /**
4830
5087
  * Represents a single vector value set along with its associated metadata.
4831
5088
  */
4832
- declare interface VectorizeVector {
5089
+ interface VectorizeVector {
4833
5090
  /** The ID for the vector. This can be user-defined, and must be unique. It should uniquely identify the object, and is best set based on the ID of what the vector represents. */
4834
5091
  id: string;
4835
5092
  /** The vector values */
@@ -4842,7 +5099,7 @@ declare interface VectorizeVector {
4842
5099
  /**
4843
5100
  * Represents a matched vector for a query along with its score and (if specified) the matching vector information.
4844
5101
  */
4845
- declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
5102
+ type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
4846
5103
  Omit<VectorizeVector, "values"> & {
4847
5104
  /** The score or rank for similarity, when returned as a result */
4848
5105
  score: number;
@@ -4850,7 +5107,7 @@ declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
4850
5107
  /**
4851
5108
  * A set of vector {@link VectorizeMatch} for a particular query.
4852
5109
  */
4853
- declare interface VectorizeMatches {
5110
+ interface VectorizeMatches {
4854
5111
  matches: VectorizeMatch[];
4855
5112
  count: number;
4856
5113
  }
@@ -4858,7 +5115,7 @@ declare interface VectorizeMatches {
4858
5115
  * Results of an operation that performed a mutation on a set of vectors.
4859
5116
  * Here, `ids` is a list of vectors that were successfully processed.
4860
5117
  */
4861
- declare interface VectorizeVectorMutation {
5118
+ interface VectorizeVectorMutation {
4862
5119
  /* List of ids of vectors that were successfully processed. */
4863
5120
  ids: string[];
4864
5121
  /* Total count of the number of processed vectors. */
@@ -4869,7 +5126,7 @@ declare interface VectorizeVectorMutation {
4869
5126
  * with the v2 version of Vectorize.
4870
5127
  * Here, `mutationId` is the identifier for the last mutation processed by Vectorize.
4871
5128
  */
4872
- declare interface VectorizeVectorMutationV2 {
5129
+ interface VectorizeVectorMutationV2 {
4873
5130
  /* The identifier for the last mutation processed by Vectorize. */
4874
5131
  mutationId: string;
4875
5132
  }
@@ -4918,7 +5175,7 @@ declare abstract class VectorizeIndex {
4918
5175
  * The interface for "version_metadata" binding
4919
5176
  * providing metadata about the Worker Version using this binding.
4920
5177
  */
4921
- declare type WorkerVersionMetadata = {
5178
+ type WorkerVersionMetadata = {
4922
5179
  /** The ID of the Worker Version using this binding */
4923
5180
  id: string;
4924
5181
  /** The tag of the Worker Version using this binding */
@@ -4926,7 +5183,7 @@ declare type WorkerVersionMetadata = {
4926
5183
  /** The timestamp of when the Worker Version was uploaded */
4927
5184
  timestamp: string;
4928
5185
  };
4929
- declare interface DynamicDispatchLimits {
5186
+ interface DynamicDispatchLimits {
4930
5187
  /**
4931
5188
  * Limit CPU time in milliseconds.
4932
5189
  */
@@ -4936,7 +5193,7 @@ declare interface DynamicDispatchLimits {
4936
5193
  */
4937
5194
  subRequests?: number;
4938
5195
  }
4939
- declare interface DynamicDispatchOptions {
5196
+ interface DynamicDispatchOptions {
4940
5197
  /**
4941
5198
  * Limit resources of invoked Worker script.
4942
5199
  */
@@ -4948,7 +5205,7 @@ declare interface DynamicDispatchOptions {
4948
5205
  [key: string]: any;
4949
5206
  };
4950
5207
  }
4951
- declare interface DispatchNamespace {
5208
+ interface DispatchNamespace {
4952
5209
  /**
4953
5210
  * @param name Name of the Worker script.
4954
5211
  * @param args Arguments to Worker script.