@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;
@@ -286,16 +292,16 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
286
292
  FixedLengthStream: typeof FixedLengthStream;
287
293
  IdentityTransformStream: typeof IdentityTransformStream;
288
294
  HTMLRewriter: typeof HTMLRewriter;
289
- GPUAdapter: typeof gpuGPUAdapter;
290
- GPUOutOfMemoryError: typeof gpuGPUOutOfMemoryError;
291
- GPUValidationError: typeof gpuGPUValidationError;
292
- GPUInternalError: typeof gpuGPUInternalError;
293
- GPUDeviceLostInfo: typeof gpuGPUDeviceLostInfo;
294
- GPUBufferUsage: typeof gpuGPUBufferUsage;
295
- GPUShaderStage: typeof gpuGPUShaderStage;
296
- GPUMapMode: typeof gpuGPUMapMode;
297
- GPUTextureUsage: typeof gpuGPUTextureUsage;
298
- GPUColorWrite: typeof gpuGPUColorWrite;
295
+ GPUAdapter: typeof GPUAdapter;
296
+ GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
297
+ GPUValidationError: typeof GPUValidationError;
298
+ GPUInternalError: typeof GPUInternalError;
299
+ GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
300
+ GPUBufferUsage: typeof GPUBufferUsage;
301
+ GPUShaderStage: typeof GPUShaderStage;
302
+ GPUMapMode: typeof GPUMapMode;
303
+ GPUTextureUsage: typeof GPUTextureUsage;
304
+ GPUColorWrite: typeof GPUColorWrite;
299
305
  }
300
306
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
301
307
  type: Type,
@@ -317,96 +323,112 @@ declare function removeEventListener<
317
323
  declare function dispatchEvent(
318
324
  event: WorkerGlobalScopeEventMap[keyof WorkerGlobalScopeEventMap],
319
325
  ): boolean;
320
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
326
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/btoa) */
321
327
  declare function btoa(data: string): string;
322
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
328
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/atob) */
323
329
  declare function atob(data: string): string;
324
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
330
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
325
331
  declare function setTimeout(
326
332
  callback: (...args: any[]) => void,
327
333
  msDelay?: number,
328
334
  ): number;
329
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
335
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
330
336
  declare function setTimeout<Args extends any[]>(
331
337
  callback: (...args: Args) => void,
332
338
  msDelay?: number,
333
339
  ...args: Args
334
340
  ): number;
335
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
341
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
336
342
  declare function clearTimeout(timeoutId: number | null): void;
337
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
343
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
338
344
  declare function setInterval(
339
345
  callback: (...args: any[]) => void,
340
346
  msDelay?: number,
341
347
  ): number;
342
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
348
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
343
349
  declare function setInterval<Args extends any[]>(
344
350
  callback: (...args: Args) => void,
345
351
  msDelay?: number,
346
352
  ...args: Args
347
353
  ): number;
348
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
354
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
349
355
  declare function clearInterval(timeoutId: number | null): void;
350
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
356
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
351
357
  declare function queueMicrotask(task: Function): void;
352
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
358
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
353
359
  declare function structuredClone<T>(
354
360
  value: T,
355
361
  options?: StructuredSerializeOptions,
356
362
  ): T;
357
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
363
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
358
364
  declare function reportError(error: any): void;
359
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
365
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
360
366
  declare function fetch(
361
367
  input: RequestInfo,
362
368
  init?: RequestInit<RequestInitCfProperties>,
363
369
  ): Promise<Response>;
364
370
  declare const self: ServiceWorkerGlobalScope;
371
+ /**
372
+ * The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
373
+ * The Workers runtime implements the full surface of this API, but with some differences in
374
+ * the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
375
+ * compared to those implemented in most browsers.
376
+ *
377
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
378
+ */
365
379
  declare const crypto: Crypto;
380
+ /**
381
+ * The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
382
+ *
383
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
384
+ */
366
385
  declare const caches: CacheStorage;
367
386
  declare const scheduler: Scheduler;
387
+ /**
388
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
389
+ * as well as timing of subrequests and other operations.
390
+ *
391
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
392
+ */
368
393
  declare const performance: Performance;
369
394
  declare const origin: string;
370
395
  declare const navigator: Navigator;
371
- declare interface TestController {}
372
- declare interface ExecutionContext {
396
+ interface TestController {}
397
+ interface ExecutionContext {
373
398
  waitUntil(promise: Promise<any>): void;
374
399
  passThroughOnException(): void;
375
400
  }
376
- declare type ExportedHandlerFetchHandler<
377
- Env = unknown,
378
- CfHostMetadata = unknown,
379
- > = (
401
+ type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (
380
402
  request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>,
381
403
  env: Env,
382
404
  ctx: ExecutionContext,
383
405
  ) => Response | Promise<Response>;
384
- declare type ExportedHandlerTailHandler<Env = unknown> = (
406
+ type ExportedHandlerTailHandler<Env = unknown> = (
385
407
  events: TraceItem[],
386
408
  env: Env,
387
409
  ctx: ExecutionContext,
388
410
  ) => void | Promise<void>;
389
- declare type ExportedHandlerTraceHandler<Env = unknown> = (
411
+ type ExportedHandlerTraceHandler<Env = unknown> = (
390
412
  traces: TraceItem[],
391
413
  env: Env,
392
414
  ctx: ExecutionContext,
393
415
  ) => void | Promise<void>;
394
- declare type ExportedHandlerScheduledHandler<Env = unknown> = (
416
+ type ExportedHandlerScheduledHandler<Env = unknown> = (
395
417
  controller: ScheduledController,
396
418
  env: Env,
397
419
  ctx: ExecutionContext,
398
420
  ) => void | Promise<void>;
399
- declare type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (
421
+ type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (
400
422
  batch: MessageBatch<Message>,
401
423
  env: Env,
402
424
  ctx: ExecutionContext,
403
425
  ) => void | Promise<void>;
404
- declare type ExportedHandlerTestHandler<Env = unknown> = (
426
+ type ExportedHandlerTestHandler<Env = unknown> = (
405
427
  controller: TestController,
406
428
  env: Env,
407
429
  ctx: ExecutionContext,
408
430
  ) => void | Promise<void>;
409
- declare interface ExportedHandler<
431
+ interface ExportedHandler<
410
432
  Env = unknown,
411
433
  QueueHandlerMessage = unknown,
412
434
  CfHostMetadata = unknown,
@@ -419,13 +441,14 @@ declare interface ExportedHandler<
419
441
  email?: EmailExportedHandler<Env>;
420
442
  queue?: ExportedHandlerQueueHandler<Env, QueueHandlerMessage>;
421
443
  }
422
- declare interface StructuredSerializeOptions {
444
+ interface StructuredSerializeOptions {
423
445
  transfer?: any[];
424
446
  }
447
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
425
448
  declare abstract class PromiseRejectionEvent extends Event {
426
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
449
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
427
450
  readonly promise: Promise<any>;
428
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
451
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
429
452
  readonly reason: any;
430
453
  }
431
454
  declare abstract class Navigator {
@@ -440,24 +463,25 @@ declare abstract class Navigator {
440
463
  | FormData,
441
464
  ): boolean;
442
465
  readonly userAgent: string;
443
- readonly gpu: gpuGPU;
466
+ readonly gpu: GPU;
444
467
  }
445
468
  /**
446
- * 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.
469
+ * The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
470
+ * as well as timing of subrequests and other operations.
447
471
  *
448
- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance)
472
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
449
473
  */
450
- declare interface Performance {
451
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin) */
474
+ interface Performance {
475
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
452
476
  readonly timeOrigin: number;
453
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/now) */
477
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
454
478
  now(): number;
455
479
  }
456
- declare interface AlarmInvocationInfo {
480
+ interface AlarmInvocationInfo {
457
481
  readonly isRetry: boolean;
458
482
  readonly retryCount: number;
459
483
  }
460
- declare interface DurableObject {
484
+ interface DurableObject {
461
485
  fetch(request: Request): Response | Promise<Response>;
462
486
  alarm?(): void | Promise<void>;
463
487
  webSocketMessage?(
@@ -472,7 +496,7 @@ declare interface DurableObject {
472
496
  ): void | Promise<void>;
473
497
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
474
498
  }
475
- declare type DurableObjectStub<
499
+ type DurableObjectStub<
476
500
  T extends Rpc.DurableObjectBranded | undefined = undefined,
477
501
  > = Fetcher<
478
502
  T,
@@ -481,12 +505,12 @@ declare type DurableObjectStub<
481
505
  readonly id: DurableObjectId;
482
506
  readonly name?: string;
483
507
  };
484
- declare interface DurableObjectId {
508
+ interface DurableObjectId {
485
509
  toString(): string;
486
510
  equals(other: DurableObjectId): boolean;
487
511
  readonly name?: string;
488
512
  }
489
- declare interface DurableObjectNamespace<
513
+ interface DurableObjectNamespace<
490
514
  T extends Rpc.DurableObjectBranded | undefined = undefined,
491
515
  > {
492
516
  newUniqueId(
@@ -502,11 +526,11 @@ declare interface DurableObjectNamespace<
502
526
  jurisdiction: DurableObjectJurisdiction,
503
527
  ): DurableObjectNamespace<T>;
504
528
  }
505
- declare type DurableObjectJurisdiction = "eu" | "fedramp";
506
- declare interface DurableObjectNamespaceNewUniqueIdOptions {
529
+ type DurableObjectJurisdiction = "eu" | "fedramp";
530
+ interface DurableObjectNamespaceNewUniqueIdOptions {
507
531
  jurisdiction?: DurableObjectJurisdiction;
508
532
  }
509
- declare type DurableObjectLocationHint =
533
+ type DurableObjectLocationHint =
510
534
  | "wnam"
511
535
  | "enam"
512
536
  | "sam"
@@ -516,10 +540,10 @@ declare type DurableObjectLocationHint =
516
540
  | "oc"
517
541
  | "afr"
518
542
  | "me";
519
- declare interface DurableObjectNamespaceGetDurableObjectOptions {
543
+ interface DurableObjectNamespaceGetDurableObjectOptions {
520
544
  locationHint?: DurableObjectLocationHint;
521
545
  }
522
- declare interface DurableObjectState {
546
+ interface DurableObjectState {
523
547
  waitUntil(promise: Promise<any>): void;
524
548
  readonly id: DurableObjectId;
525
549
  readonly storage: DurableObjectStorage;
@@ -533,7 +557,7 @@ declare interface DurableObjectState {
533
557
  getHibernatableWebSocketEventTimeout(): number | null;
534
558
  getTags(ws: WebSocket): string[];
535
559
  }
536
- declare interface DurableObjectTransaction {
560
+ interface DurableObjectTransaction {
537
561
  get<T = unknown>(
538
562
  key: string,
539
563
  options?: DurableObjectGetOptions,
@@ -564,7 +588,7 @@ declare interface DurableObjectTransaction {
564
588
  ): Promise<void>;
565
589
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
566
590
  }
567
- declare interface DurableObjectStorage {
591
+ interface DurableObjectStorage {
568
592
  get<T = unknown>(
569
593
  key: string,
570
594
  options?: DurableObjectGetOptions,
@@ -600,7 +624,7 @@ declare interface DurableObjectStorage {
600
624
  sync(): Promise<void>;
601
625
  transactionSync<T>(closure: () => T): T;
602
626
  }
603
- declare interface DurableObjectListOptions {
627
+ interface DurableObjectListOptions {
604
628
  start?: string;
605
629
  startAfter?: string;
606
630
  end?: string;
@@ -610,19 +634,19 @@ declare interface DurableObjectListOptions {
610
634
  allowConcurrency?: boolean;
611
635
  noCache?: boolean;
612
636
  }
613
- declare interface DurableObjectGetOptions {
637
+ interface DurableObjectGetOptions {
614
638
  allowConcurrency?: boolean;
615
639
  noCache?: boolean;
616
640
  }
617
- declare interface DurableObjectGetAlarmOptions {
641
+ interface DurableObjectGetAlarmOptions {
618
642
  allowConcurrency?: boolean;
619
643
  }
620
- declare interface DurableObjectPutOptions {
644
+ interface DurableObjectPutOptions {
621
645
  allowConcurrency?: boolean;
622
646
  allowUnconfirmed?: boolean;
623
647
  noCache?: boolean;
624
648
  }
625
- declare interface DurableObjectSetAlarmOptions {
649
+ interface DurableObjectSetAlarmOptions {
626
650
  allowConcurrency?: boolean;
627
651
  allowUnconfirmed?: boolean;
628
652
  }
@@ -631,14 +655,19 @@ declare class WebSocketRequestResponsePair {
631
655
  get request(): string;
632
656
  get response(): string;
633
657
  }
634
- declare interface AnalyticsEngineDataset {
658
+ interface AnalyticsEngineDataset {
635
659
  writeDataPoint(event?: AnalyticsEngineDataPoint): void;
636
660
  }
637
- declare interface AnalyticsEngineDataPoint {
661
+ interface AnalyticsEngineDataPoint {
638
662
  indexes?: ((ArrayBuffer | string) | null)[];
639
663
  doubles?: number[];
640
664
  blobs?: ((ArrayBuffer | string) | null)[];
641
665
  }
666
+ /**
667
+ * An event which takes place in the DOM.
668
+ *
669
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
670
+ */
642
671
  declare class Event {
643
672
  constructor(type: string, init?: EventInit);
644
673
  /**
@@ -748,20 +777,25 @@ declare class Event {
748
777
  static readonly AT_TARGET: number;
749
778
  static readonly BUBBLING_PHASE: number;
750
779
  }
751
- declare interface EventInit {
780
+ interface EventInit {
752
781
  bubbles?: boolean;
753
782
  cancelable?: boolean;
754
783
  composed?: boolean;
755
784
  }
756
- declare type EventListener<EventType extends Event = Event> = (
785
+ type EventListener<EventType extends Event = Event> = (
757
786
  event: EventType,
758
787
  ) => void;
759
- declare interface EventListenerObject<EventType extends Event = Event> {
788
+ interface EventListenerObject<EventType extends Event = Event> {
760
789
  handleEvent(event: EventType): void;
761
790
  }
762
- declare type EventListenerOrEventListenerObject<
763
- EventType extends Event = Event,
764
- > = EventListener<EventType> | EventListenerObject<EventType>;
791
+ type EventListenerOrEventListenerObject<EventType extends Event = Event> =
792
+ | EventListener<EventType>
793
+ | EventListenerObject<EventType>;
794
+ /**
795
+ * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
796
+ *
797
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
798
+ */
765
799
  declare class EventTarget<
766
800
  EventMap extends Record<string, Event> = Record<string, Event>,
767
801
  > {
@@ -805,18 +839,23 @@ declare class EventTarget<
805
839
  */
806
840
  dispatchEvent(event: EventMap[keyof EventMap]): boolean;
807
841
  }
808
- declare interface EventTargetEventListenerOptions {
842
+ interface EventTargetEventListenerOptions {
809
843
  capture?: boolean;
810
844
  }
811
- declare interface EventTargetAddEventListenerOptions {
845
+ interface EventTargetAddEventListenerOptions {
812
846
  capture?: boolean;
813
847
  passive?: boolean;
814
848
  once?: boolean;
815
849
  signal?: AbortSignal;
816
850
  }
817
- declare interface EventTargetHandlerObject {
851
+ interface EventTargetHandlerObject {
818
852
  handleEvent: (event: Event) => any | undefined;
819
853
  }
854
+ /**
855
+ * A controller object that allows you to abort one or more DOM requests as and when desired.
856
+ *
857
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
858
+ */
820
859
  declare class AbortController {
821
860
  constructor();
822
861
  /**
@@ -832,11 +871,17 @@ declare class AbortController {
832
871
  */
833
872
  abort(reason?: any): void;
834
873
  }
874
+ /**
875
+ * A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
876
+ *
877
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
878
+ */
835
879
  declare abstract class AbortSignal extends EventTarget {
836
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
880
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
837
881
  static abort(reason?: any): AbortSignal;
838
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
882
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
839
883
  static timeout(delay: number): AbortSignal;
884
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
840
885
  static any(signals: AbortSignal[]): AbortSignal;
841
886
  /**
842
887
  * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
@@ -844,25 +889,31 @@ declare abstract class AbortSignal extends EventTarget {
844
889
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
845
890
  */
846
891
  get aborted(): boolean;
847
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
892
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
848
893
  get reason(): any;
849
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
894
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
850
895
  get onabort(): any | null;
851
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
896
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
852
897
  set onabort(value: any | null);
853
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
898
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
854
899
  throwIfAborted(): void;
855
900
  }
856
- declare interface Scheduler {
901
+ interface Scheduler {
857
902
  wait(delay: number, maybeOptions?: SchedulerWaitOptions): Promise<void>;
858
903
  }
859
- declare interface SchedulerWaitOptions {
904
+ interface SchedulerWaitOptions {
860
905
  signal?: AbortSignal;
861
906
  }
907
+ /**
908
+ * Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
909
+ *
910
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
911
+ */
862
912
  declare abstract class ExtendableEvent extends Event {
863
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
913
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
864
914
  waitUntil(promise: Promise<any>): void;
865
915
  }
916
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
866
917
  declare class CustomEvent<T = any> extends Event {
867
918
  constructor(type: string, init?: CustomEventCustomEventInit);
868
919
  /**
@@ -872,65 +923,96 @@ declare class CustomEvent<T = any> extends Event {
872
923
  */
873
924
  get detail(): T;
874
925
  }
875
- declare interface CustomEventCustomEventInit {
926
+ interface CustomEventCustomEventInit {
876
927
  bubbles?: boolean;
877
928
  cancelable?: boolean;
878
929
  composed?: boolean;
879
930
  detail?: any;
880
931
  }
932
+ /**
933
+ * A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
934
+ *
935
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
936
+ */
881
937
  declare class Blob {
882
938
  constructor(
883
939
  type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[],
884
940
  options?: BlobOptions,
885
941
  );
886
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
942
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
887
943
  get size(): number;
888
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
944
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
889
945
  get type(): string;
890
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
946
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
891
947
  slice(start?: number, end?: number, type?: string): Blob;
892
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
948
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
893
949
  arrayBuffer(): Promise<ArrayBuffer>;
894
950
  bytes(): Promise<Uint8Array>;
895
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
951
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
896
952
  text(): Promise<string>;
897
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
953
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
898
954
  stream(): ReadableStream;
899
955
  }
900
- declare interface BlobOptions {
956
+ interface BlobOptions {
901
957
  type?: string;
902
958
  }
959
+ /**
960
+ * Provides information about files and allows JavaScript in a web page to access their content.
961
+ *
962
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
963
+ */
903
964
  declare class File extends Blob {
904
965
  constructor(
905
966
  bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined,
906
967
  name: string,
907
968
  options?: FileOptions,
908
969
  );
909
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
970
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
910
971
  get name(): string;
911
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
972
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
912
973
  get lastModified(): number;
913
974
  }
914
- declare interface FileOptions {
975
+ interface FileOptions {
915
976
  type?: string;
916
977
  lastModified?: number;
917
978
  }
979
+ /**
980
+ * The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
981
+ *
982
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
983
+ */
918
984
  declare abstract class CacheStorage {
919
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
985
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
920
986
  open(cacheName: string): Promise<Cache>;
921
987
  readonly default: Cache;
922
988
  }
989
+ /**
990
+ * The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
991
+ *
992
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
993
+ */
923
994
  declare abstract class Cache {
995
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#delete) */
924
996
  delete(request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>;
997
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#match) */
925
998
  match(
926
999
  request: RequestInfo,
927
1000
  options?: CacheQueryOptions,
928
1001
  ): Promise<Response | undefined>;
1002
+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/#put) */
929
1003
  put(request: RequestInfo, response: Response): Promise<void>;
930
1004
  }
931
- declare interface CacheQueryOptions {
1005
+ interface CacheQueryOptions {
932
1006
  ignoreMethod?: boolean;
933
1007
  }
1008
+ /**
1009
+ * The Web Crypto API provides a set of low-level functions for common cryptographic tasks.
1010
+ * The Workers runtime implements the full surface of this API, but with some differences in
1011
+ * the [supported algorithms](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/#supported-algorithms)
1012
+ * compared to those implemented in most browsers.
1013
+ *
1014
+ * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
1015
+ */
934
1016
  declare abstract class Crypto {
935
1017
  /**
936
1018
  * Available only in secure contexts.
@@ -938,7 +1020,7 @@ declare abstract class Crypto {
938
1020
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
939
1021
  */
940
1022
  get subtle(): SubtleCrypto;
941
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
1023
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
942
1024
  getRandomValues<
943
1025
  T extends
944
1026
  | Int8Array
@@ -958,39 +1040,50 @@ declare abstract class Crypto {
958
1040
  randomUUID(): string;
959
1041
  DigestStream: typeof DigestStream;
960
1042
  }
1043
+ /**
1044
+ * This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
1045
+ * Available only in secure contexts.
1046
+ *
1047
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
1048
+ */
961
1049
  declare abstract class SubtleCrypto {
1050
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
962
1051
  encrypt(
963
1052
  algorithm: string | SubtleCryptoEncryptAlgorithm,
964
1053
  key: CryptoKey,
965
1054
  plainText: ArrayBuffer | ArrayBufferView,
966
1055
  ): Promise<ArrayBuffer>;
1056
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
967
1057
  decrypt(
968
1058
  algorithm: string | SubtleCryptoEncryptAlgorithm,
969
1059
  key: CryptoKey,
970
1060
  cipherText: ArrayBuffer | ArrayBufferView,
971
1061
  ): Promise<ArrayBuffer>;
1062
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
972
1063
  sign(
973
1064
  algorithm: string | SubtleCryptoSignAlgorithm,
974
1065
  key: CryptoKey,
975
1066
  data: ArrayBuffer | ArrayBufferView,
976
1067
  ): Promise<ArrayBuffer>;
1068
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
977
1069
  verify(
978
1070
  algorithm: string | SubtleCryptoSignAlgorithm,
979
1071
  key: CryptoKey,
980
1072
  signature: ArrayBuffer | ArrayBufferView,
981
1073
  data: ArrayBuffer | ArrayBufferView,
982
1074
  ): Promise<boolean>;
1075
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
983
1076
  digest(
984
1077
  algorithm: string | SubtleCryptoHashAlgorithm,
985
1078
  data: ArrayBuffer | ArrayBufferView,
986
1079
  ): Promise<ArrayBuffer>;
987
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
1080
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
988
1081
  generateKey(
989
1082
  algorithm: string | SubtleCryptoGenerateKeyAlgorithm,
990
1083
  extractable: boolean,
991
1084
  keyUsages: string[],
992
1085
  ): Promise<CryptoKey | CryptoKeyPair>;
993
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
1086
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
994
1087
  deriveKey(
995
1088
  algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
996
1089
  baseKey: CryptoKey,
@@ -998,12 +1091,13 @@ declare abstract class SubtleCrypto {
998
1091
  extractable: boolean,
999
1092
  keyUsages: string[],
1000
1093
  ): Promise<CryptoKey>;
1094
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
1001
1095
  deriveBits(
1002
1096
  algorithm: string | SubtleCryptoDeriveKeyAlgorithm,
1003
1097
  baseKey: CryptoKey,
1004
- length: number | null,
1098
+ length?: number | null,
1005
1099
  ): Promise<ArrayBuffer>;
1006
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
1100
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
1007
1101
  importKey(
1008
1102
  format: string,
1009
1103
  keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey,
@@ -1011,14 +1105,16 @@ declare abstract class SubtleCrypto {
1011
1105
  extractable: boolean,
1012
1106
  keyUsages: string[],
1013
1107
  ): Promise<CryptoKey>;
1108
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
1014
1109
  exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
1110
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
1015
1111
  wrapKey(
1016
1112
  format: string,
1017
1113
  key: CryptoKey,
1018
1114
  wrappingKey: CryptoKey,
1019
1115
  wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm,
1020
1116
  ): Promise<ArrayBuffer>;
1021
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
1117
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
1022
1118
  unwrapKey(
1023
1119
  format: string,
1024
1120
  wrappedKey: ArrayBuffer | ArrayBufferView,
@@ -1033,12 +1129,18 @@ declare abstract class SubtleCrypto {
1033
1129
  b: ArrayBuffer | ArrayBufferView,
1034
1130
  ): boolean;
1035
1131
  }
1132
+ /**
1133
+ * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
1134
+ * Available only in secure contexts.
1135
+ *
1136
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
1137
+ */
1036
1138
  declare abstract class CryptoKey {
1037
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
1139
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
1038
1140
  readonly type: string;
1039
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
1141
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
1040
1142
  readonly extractable: boolean;
1041
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
1143
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
1042
1144
  readonly algorithm:
1043
1145
  | CryptoKeyKeyAlgorithm
1044
1146
  | CryptoKeyAesKeyAlgorithm
@@ -1046,14 +1148,14 @@ declare abstract class CryptoKey {
1046
1148
  | CryptoKeyRsaKeyAlgorithm
1047
1149
  | CryptoKeyEllipticKeyAlgorithm
1048
1150
  | CryptoKeyArbitraryKeyAlgorithm;
1049
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
1151
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
1050
1152
  readonly usages: string[];
1051
1153
  }
1052
- declare interface CryptoKeyPair {
1154
+ interface CryptoKeyPair {
1053
1155
  publicKey: CryptoKey;
1054
1156
  privateKey: CryptoKey;
1055
1157
  }
1056
- declare interface JsonWebKey {
1158
+ interface JsonWebKey {
1057
1159
  kty: string;
1058
1160
  use?: string;
1059
1161
  key_ops?: string[];
@@ -1073,12 +1175,12 @@ declare interface JsonWebKey {
1073
1175
  oth?: RsaOtherPrimesInfo[];
1074
1176
  k?: string;
1075
1177
  }
1076
- declare interface RsaOtherPrimesInfo {
1178
+ interface RsaOtherPrimesInfo {
1077
1179
  r?: string;
1078
1180
  d?: string;
1079
1181
  t?: string;
1080
1182
  }
1081
- declare interface SubtleCryptoDeriveKeyAlgorithm {
1183
+ interface SubtleCryptoDeriveKeyAlgorithm {
1082
1184
  name: string;
1083
1185
  salt?: ArrayBuffer;
1084
1186
  iterations?: number;
@@ -1086,7 +1188,7 @@ declare interface SubtleCryptoDeriveKeyAlgorithm {
1086
1188
  $public?: CryptoKey;
1087
1189
  info?: ArrayBuffer;
1088
1190
  }
1089
- declare interface SubtleCryptoEncryptAlgorithm {
1191
+ interface SubtleCryptoEncryptAlgorithm {
1090
1192
  name: string;
1091
1193
  iv?: ArrayBuffer;
1092
1194
  additionalData?: ArrayBuffer;
@@ -1095,7 +1197,7 @@ declare interface SubtleCryptoEncryptAlgorithm {
1095
1197
  length?: number;
1096
1198
  label?: ArrayBuffer;
1097
1199
  }
1098
- declare interface SubtleCryptoGenerateKeyAlgorithm {
1200
+ interface SubtleCryptoGenerateKeyAlgorithm {
1099
1201
  name: string;
1100
1202
  hash?: string | SubtleCryptoHashAlgorithm;
1101
1203
  modulusLength?: number;
@@ -1103,45 +1205,45 @@ declare interface SubtleCryptoGenerateKeyAlgorithm {
1103
1205
  length?: number;
1104
1206
  namedCurve?: string;
1105
1207
  }
1106
- declare interface SubtleCryptoHashAlgorithm {
1208
+ interface SubtleCryptoHashAlgorithm {
1107
1209
  name: string;
1108
1210
  }
1109
- declare interface SubtleCryptoImportKeyAlgorithm {
1211
+ interface SubtleCryptoImportKeyAlgorithm {
1110
1212
  name: string;
1111
1213
  hash?: string | SubtleCryptoHashAlgorithm;
1112
1214
  length?: number;
1113
1215
  namedCurve?: string;
1114
1216
  compressed?: boolean;
1115
1217
  }
1116
- declare interface SubtleCryptoSignAlgorithm {
1218
+ interface SubtleCryptoSignAlgorithm {
1117
1219
  name: string;
1118
1220
  hash?: string | SubtleCryptoHashAlgorithm;
1119
1221
  dataLength?: number;
1120
1222
  saltLength?: number;
1121
1223
  }
1122
- declare interface CryptoKeyKeyAlgorithm {
1224
+ interface CryptoKeyKeyAlgorithm {
1123
1225
  name: string;
1124
1226
  }
1125
- declare interface CryptoKeyAesKeyAlgorithm {
1227
+ interface CryptoKeyAesKeyAlgorithm {
1126
1228
  name: string;
1127
1229
  length: number;
1128
1230
  }
1129
- declare interface CryptoKeyHmacKeyAlgorithm {
1231
+ interface CryptoKeyHmacKeyAlgorithm {
1130
1232
  name: string;
1131
1233
  hash: CryptoKeyKeyAlgorithm;
1132
1234
  length: number;
1133
1235
  }
1134
- declare interface CryptoKeyRsaKeyAlgorithm {
1236
+ interface CryptoKeyRsaKeyAlgorithm {
1135
1237
  name: string;
1136
1238
  modulusLength: number;
1137
1239
  publicExponent: ArrayBuffer | (ArrayBuffer | ArrayBufferView);
1138
1240
  hash?: CryptoKeyKeyAlgorithm;
1139
1241
  }
1140
- declare interface CryptoKeyEllipticKeyAlgorithm {
1242
+ interface CryptoKeyEllipticKeyAlgorithm {
1141
1243
  name: string;
1142
1244
  namedCurve: string;
1143
1245
  }
1144
- declare interface CryptoKeyArbitraryKeyAlgorithm {
1246
+ interface CryptoKeyArbitraryKeyAlgorithm {
1145
1247
  name: string;
1146
1248
  hash?: CryptoKeyKeyAlgorithm;
1147
1249
  namedCurve?: string;
@@ -1154,6 +1256,11 @@ declare class DigestStream extends WritableStream<
1154
1256
  get digest(): Promise<ArrayBuffer>;
1155
1257
  get bytesWritten(): number | bigint;
1156
1258
  }
1259
+ /**
1260
+ * A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
1261
+ *
1262
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1263
+ */
1157
1264
  declare class TextDecoder {
1158
1265
  constructor(decoder?: string, options?: TextDecoderConstructorOptions);
1159
1266
  /**
@@ -1179,6 +1286,11 @@ declare class TextDecoder {
1179
1286
  get fatal(): boolean;
1180
1287
  get ignoreBOM(): boolean;
1181
1288
  }
1289
+ /**
1290
+ * TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
1291
+ *
1292
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
1293
+ */
1182
1294
  declare class TextEncoder {
1183
1295
  constructor();
1184
1296
  /**
@@ -1198,52 +1310,70 @@ declare class TextEncoder {
1198
1310
  ): TextEncoderEncodeIntoResult;
1199
1311
  get encoding(): string;
1200
1312
  }
1201
- declare interface TextDecoderConstructorOptions {
1313
+ interface TextDecoderConstructorOptions {
1202
1314
  fatal: boolean;
1203
1315
  ignoreBOM: boolean;
1204
1316
  }
1205
- declare interface TextDecoderDecodeOptions {
1317
+ interface TextDecoderDecodeOptions {
1206
1318
  stream: boolean;
1207
1319
  }
1208
- declare interface TextEncoderEncodeIntoResult {
1320
+ interface TextEncoderEncodeIntoResult {
1209
1321
  read: number;
1210
1322
  written: number;
1211
1323
  }
1324
+ /**
1325
+ * Events providing information related to errors in scripts or in files.
1326
+ *
1327
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
1328
+ */
1212
1329
  declare class ErrorEvent extends Event {
1213
1330
  constructor(type: string, init?: ErrorEventErrorEventInit);
1214
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
1331
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
1215
1332
  get filename(): string;
1216
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
1333
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
1217
1334
  get message(): string;
1218
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
1335
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
1219
1336
  get lineno(): number;
1220
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
1337
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
1221
1338
  get colno(): number;
1222
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
1339
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
1223
1340
  get error(): any;
1224
1341
  }
1225
- declare interface ErrorEventErrorEventInit {
1342
+ interface ErrorEventErrorEventInit {
1226
1343
  message?: string;
1227
1344
  filename?: string;
1228
1345
  lineno?: number;
1229
1346
  colno?: number;
1230
1347
  error?: any;
1231
1348
  }
1349
+ /**
1350
+ * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
1351
+ *
1352
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
1353
+ */
1232
1354
  declare class FormData {
1233
1355
  constructor();
1356
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
1234
1357
  append(name: string, value: string): void;
1358
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
1235
1359
  append(name: string, value: Blob, filename?: string): void;
1360
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
1236
1361
  delete(name: string): void;
1362
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
1237
1363
  get(name: string): (File | string) | null;
1364
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
1238
1365
  getAll(name: string): (File | string)[];
1366
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
1239
1367
  has(name: string): boolean;
1368
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
1240
1369
  set(name: string, value: string): void;
1370
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
1241
1371
  set(name: string, value: Blob, filename?: string): void;
1242
- /** Returns an array of key, value pairs for every entry in the list. */
1372
+ /* Returns an array of key, value pairs for every entry in the list. */
1243
1373
  entries(): IterableIterator<[key: string, value: File | string]>;
1244
- /** Returns a list of keys in the list. */
1374
+ /* Returns a list of keys in the list. */
1245
1375
  keys(): IterableIterator<string>;
1246
- /** Returns a list of values in the list. */
1376
+ /* Returns a list of values in the list. */
1247
1377
  values(): IterableIterator<File | string>;
1248
1378
  forEach<This = unknown>(
1249
1379
  callback: (
@@ -1256,7 +1386,7 @@ declare class FormData {
1256
1386
  ): void;
1257
1387
  [Symbol.iterator](): IterableIterator<[key: string, value: File | string]>;
1258
1388
  }
1259
- declare interface ContentOptions {
1389
+ interface ContentOptions {
1260
1390
  html?: boolean;
1261
1391
  }
1262
1392
  declare class HTMLRewriter {
@@ -1268,23 +1398,23 @@ declare class HTMLRewriter {
1268
1398
  onDocument(handlers: HTMLRewriterDocumentContentHandlers): HTMLRewriter;
1269
1399
  transform(response: Response): Response;
1270
1400
  }
1271
- declare interface HTMLRewriterElementContentHandlers {
1401
+ interface HTMLRewriterElementContentHandlers {
1272
1402
  element?(element: Element): void | Promise<void>;
1273
1403
  comments?(comment: Comment): void | Promise<void>;
1274
1404
  text?(element: Text): void | Promise<void>;
1275
1405
  }
1276
- declare interface HTMLRewriterDocumentContentHandlers {
1406
+ interface HTMLRewriterDocumentContentHandlers {
1277
1407
  doctype?(doctype: Doctype): void | Promise<void>;
1278
1408
  comments?(comment: Comment): void | Promise<void>;
1279
1409
  text?(text: Text): void | Promise<void>;
1280
1410
  end?(end: DocumentEnd): void | Promise<void>;
1281
1411
  }
1282
- declare interface Doctype {
1412
+ interface Doctype {
1283
1413
  readonly name: string | null;
1284
1414
  readonly publicId: string | null;
1285
1415
  readonly systemId: string | null;
1286
1416
  }
1287
- declare interface Element {
1417
+ interface Element {
1288
1418
  tagName: string;
1289
1419
  readonly attributes: IterableIterator<string[]>;
1290
1420
  readonly removed: boolean;
@@ -1303,13 +1433,13 @@ declare interface Element {
1303
1433
  setInnerContent(content: string, options?: ContentOptions): Element;
1304
1434
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1305
1435
  }
1306
- declare interface EndTag {
1436
+ interface EndTag {
1307
1437
  name: string;
1308
1438
  before(content: string, options?: ContentOptions): EndTag;
1309
1439
  after(content: string, options?: ContentOptions): EndTag;
1310
1440
  remove(): EndTag;
1311
1441
  }
1312
- declare interface Comment {
1442
+ interface Comment {
1313
1443
  text: string;
1314
1444
  readonly removed: boolean;
1315
1445
  before(content: string, options?: ContentOptions): Comment;
@@ -1317,7 +1447,7 @@ declare interface Comment {
1317
1447
  replace(content: string, options?: ContentOptions): Comment;
1318
1448
  remove(): Comment;
1319
1449
  }
1320
- declare interface Text {
1450
+ interface Text {
1321
1451
  readonly text: string;
1322
1452
  readonly lastInTextNode: boolean;
1323
1453
  readonly removed: boolean;
@@ -1326,42 +1456,58 @@ declare interface Text {
1326
1456
  replace(content: string, options?: ContentOptions): Text;
1327
1457
  remove(): Text;
1328
1458
  }
1329
- declare interface DocumentEnd {
1459
+ interface DocumentEnd {
1330
1460
  append(content: string, options?: ContentOptions): DocumentEnd;
1331
1461
  }
1462
+ /**
1463
+ * This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.
1464
+ *
1465
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
1466
+ */
1332
1467
  declare abstract class FetchEvent extends ExtendableEvent {
1333
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
1468
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
1334
1469
  readonly request: Request;
1335
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
1470
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
1336
1471
  respondWith(promise: Response | Promise<Response>): void;
1337
1472
  passThroughOnException(): void;
1338
1473
  }
1339
- declare type HeadersInit =
1474
+ type HeadersInit =
1340
1475
  | Headers
1341
1476
  | Iterable<Iterable<string>>
1342
1477
  | Record<string, string>;
1478
+ /**
1479
+ * This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs.  You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
1480
+ *
1481
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
1482
+ */
1343
1483
  declare class Headers {
1344
1484
  constructor(init?: HeadersInit);
1485
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
1345
1486
  get(name: string): string | null;
1346
1487
  getAll(name: string): string[];
1488
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */
1347
1489
  getSetCookie(): string[];
1490
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
1348
1491
  has(name: string): boolean;
1492
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
1349
1493
  set(name: string, value: string): void;
1494
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
1350
1495
  append(name: string, value: string): void;
1496
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
1351
1497
  delete(name: string): void;
1352
1498
  forEach<This = unknown>(
1353
1499
  callback: (this: This, value: string, key: string, parent: Headers) => void,
1354
1500
  thisArg?: This,
1355
1501
  ): void;
1356
- /** Returns an iterator allowing to go through all key/value pairs contained in this object. */
1502
+ /* Returns an iterator allowing to go through all key/value pairs contained in this object. */
1357
1503
  entries(): IterableIterator<[key: string, value: string]>;
1358
- /** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
1504
+ /* Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
1359
1505
  keys(): IterableIterator<string>;
1360
- /** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
1506
+ /* Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
1361
1507
  values(): IterableIterator<string>;
1362
1508
  [Symbol.iterator](): IterableIterator<[key: string, value: string]>;
1363
1509
  }
1364
- declare type BodyInit =
1510
+ type BodyInit =
1365
1511
  | ReadableStream<Uint8Array>
1366
1512
  | string
1367
1513
  | ArrayBuffer
@@ -1370,39 +1516,51 @@ declare type BodyInit =
1370
1516
  | URLSearchParams
1371
1517
  | FormData;
1372
1518
  declare abstract class Body {
1519
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
1373
1520
  get body(): ReadableStream | null;
1521
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
1374
1522
  get bodyUsed(): boolean;
1523
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
1375
1524
  arrayBuffer(): Promise<ArrayBuffer>;
1376
1525
  bytes(): Promise<Uint8Array>;
1526
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
1377
1527
  text(): Promise<string>;
1528
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/json) */
1378
1529
  json<T>(): Promise<T>;
1530
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/formData) */
1379
1531
  formData(): Promise<FormData>;
1532
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/blob) */
1380
1533
  blob(): Promise<Blob>;
1381
1534
  }
1535
+ /**
1536
+ * This Fetch API interface represents the response to a request.
1537
+ *
1538
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
1539
+ */
1382
1540
  declare class Response extends Body {
1383
1541
  constructor(body?: BodyInit | null, init?: ResponseInit);
1384
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
1542
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirect_static) */
1385
1543
  static redirect(url: string, status?: number): Response;
1386
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
1544
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/json_static) */
1387
1545
  static json(any: any, maybeInit?: ResponseInit | Response): Response;
1388
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
1546
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
1389
1547
  clone(): Response;
1390
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
1548
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
1391
1549
  get status(): number;
1392
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
1550
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
1393
1551
  get statusText(): string;
1394
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
1552
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
1395
1553
  get headers(): Headers;
1396
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
1554
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
1397
1555
  get ok(): boolean;
1398
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
1556
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
1399
1557
  get redirected(): boolean;
1400
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
1558
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
1401
1559
  get url(): string;
1402
1560
  get webSocket(): WebSocket | null;
1403
1561
  get cf(): any | undefined;
1404
1562
  }
1405
- declare interface ResponseInit {
1563
+ interface ResponseInit {
1406
1564
  status?: number;
1407
1565
  statusText?: string;
1408
1566
  headers?: HeadersInit;
@@ -1410,16 +1568,21 @@ declare interface ResponseInit {
1410
1568
  webSocket?: WebSocket | null;
1411
1569
  encodeBody?: "automatic" | "manual";
1412
1570
  }
1413
- declare type RequestInfo<
1414
- CfHostMetadata = unknown,
1415
- Cf = CfProperties<CfHostMetadata>,
1416
- > = Request<CfHostMetadata, Cf> | string | URL;
1571
+ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
1572
+ | Request<CfHostMetadata, Cf>
1573
+ | string
1574
+ | URL;
1575
+ /**
1576
+ * This Fetch API interface represents a resource request.
1577
+ *
1578
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
1579
+ */
1417
1580
  declare class Request<
1418
1581
  CfHostMetadata = unknown,
1419
1582
  Cf = CfProperties<CfHostMetadata>,
1420
1583
  > extends Body {
1421
1584
  constructor(input: RequestInfo<CfProperties>, init?: RequestInit<Cf>);
1422
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
1585
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
1423
1586
  clone(): Request<CfHostMetadata, Cf>;
1424
1587
  /**
1425
1588
  * Returns request's HTTP method, which is "GET" by default.
@@ -1465,27 +1628,34 @@ declare class Request<
1465
1628
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
1466
1629
  */
1467
1630
  get keepalive(): boolean;
1631
+ /**
1632
+ * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
1633
+ *
1634
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
1635
+ */
1636
+ get cache(): string | undefined;
1468
1637
  }
1469
- declare interface RequestInit<Cf = CfProperties> {
1470
- /** A string to set request's method. */
1638
+ interface RequestInit<Cf = CfProperties> {
1639
+ /* A string to set request's method. */
1471
1640
  method?: string;
1472
- /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
1641
+ /* A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
1473
1642
  headers?: HeadersInit;
1474
- /** A BodyInit object or null to set request's body. */
1643
+ /* A BodyInit object or null to set request's body. */
1475
1644
  body?: BodyInit | null;
1476
- /** 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. */
1645
+ /* 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. */
1477
1646
  redirect?: string;
1478
1647
  fetcher?: Fetcher | null;
1479
1648
  cf?: Cf;
1480
- /** A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
1649
+ /* A string indicating how the request will interact with the browser's cache to set request's cache. */
1650
+ cache?: string;
1651
+ /* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
1481
1652
  integrity?: string;
1482
- /** An AbortSignal to set request's signal. */
1653
+ /* An AbortSignal to set request's signal. */
1483
1654
  signal?: AbortSignal | null;
1484
1655
  }
1485
- declare type Service<
1486
- T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
1487
- > = Fetcher<T>;
1488
- declare type Fetcher<
1656
+ type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
1657
+ Fetcher<T>;
1658
+ type Fetcher<
1489
1659
  T extends Rpc.EntrypointBranded | undefined = undefined,
1490
1660
  Reserved extends string = never,
1491
1661
  > = (T extends Rpc.EntrypointBranded
@@ -1494,16 +1664,16 @@ declare type Fetcher<
1494
1664
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
1495
1665
  connect(address: SocketAddress | string, options?: SocketOptions): Socket;
1496
1666
  };
1497
- declare interface FetcherPutOptions {
1667
+ interface FetcherPutOptions {
1498
1668
  expiration?: number;
1499
1669
  expirationTtl?: number;
1500
1670
  }
1501
- declare interface KVNamespaceListKey<Metadata, Key extends string = string> {
1671
+ interface KVNamespaceListKey<Metadata, Key extends string = string> {
1502
1672
  name: Key;
1503
1673
  expiration?: number;
1504
1674
  metadata?: Metadata;
1505
1675
  }
1506
- declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1676
+ type KVNamespaceListResult<Metadata, Key extends string = string> =
1507
1677
  | {
1508
1678
  list_complete: false;
1509
1679
  keys: KVNamespaceListKey<Metadata, Key>[];
@@ -1515,7 +1685,7 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1515
1685
  keys: KVNamespaceListKey<Metadata, Key>[];
1516
1686
  cacheStatus: string | null;
1517
1687
  };
1518
- declare interface KVNamespace<Key extends string = string> {
1688
+ interface KVNamespace<Key extends string = string> {
1519
1689
  get(
1520
1690
  key: Key,
1521
1691
  options?: Partial<KVNamespaceGetOptions<undefined>>,
@@ -1589,49 +1759,49 @@ declare interface KVNamespace<Key extends string = string> {
1589
1759
  ): Promise<KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>>;
1590
1760
  delete(key: Key): Promise<void>;
1591
1761
  }
1592
- declare interface KVNamespaceListOptions {
1762
+ interface KVNamespaceListOptions {
1593
1763
  limit?: number;
1594
1764
  prefix?: string | null;
1595
1765
  cursor?: string | null;
1596
1766
  }
1597
- declare interface KVNamespaceGetOptions<Type> {
1767
+ interface KVNamespaceGetOptions<Type> {
1598
1768
  type: Type;
1599
1769
  cacheTtl?: number;
1600
1770
  }
1601
- declare interface KVNamespacePutOptions {
1771
+ interface KVNamespacePutOptions {
1602
1772
  expiration?: number;
1603
1773
  expirationTtl?: number;
1604
1774
  metadata?: any | null;
1605
1775
  }
1606
- declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1776
+ interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1607
1777
  value: Value | null;
1608
1778
  metadata: Metadata | null;
1609
1779
  cacheStatus: string | null;
1610
1780
  }
1611
- declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1612
- declare interface Queue<Body = unknown> {
1781
+ type QueueContentType = "text" | "bytes" | "json" | "v8";
1782
+ interface Queue<Body = unknown> {
1613
1783
  send(message: Body, options?: QueueSendOptions): Promise<void>;
1614
1784
  sendBatch(
1615
1785
  messages: Iterable<MessageSendRequest<Body>>,
1616
1786
  options?: QueueSendBatchOptions,
1617
1787
  ): Promise<void>;
1618
1788
  }
1619
- declare interface QueueSendOptions {
1789
+ interface QueueSendOptions {
1620
1790
  contentType?: QueueContentType;
1621
1791
  delaySeconds?: number;
1622
1792
  }
1623
- declare interface QueueSendBatchOptions {
1793
+ interface QueueSendBatchOptions {
1624
1794
  delaySeconds?: number;
1625
1795
  }
1626
- declare interface MessageSendRequest<Body = unknown> {
1796
+ interface MessageSendRequest<Body = unknown> {
1627
1797
  body: Body;
1628
1798
  contentType?: QueueContentType;
1629
1799
  delaySeconds?: number;
1630
1800
  }
1631
- declare interface QueueRetryOptions {
1801
+ interface QueueRetryOptions {
1632
1802
  delaySeconds?: number;
1633
1803
  }
1634
- declare interface Message<Body = unknown> {
1804
+ interface Message<Body = unknown> {
1635
1805
  readonly id: string;
1636
1806
  readonly timestamp: Date;
1637
1807
  readonly body: Body;
@@ -1639,26 +1809,26 @@ declare interface Message<Body = unknown> {
1639
1809
  retry(options?: QueueRetryOptions): void;
1640
1810
  ack(): void;
1641
1811
  }
1642
- declare interface QueueEvent<Body = unknown> extends ExtendableEvent {
1812
+ interface QueueEvent<Body = unknown> extends ExtendableEvent {
1643
1813
  readonly messages: readonly Message<Body>[];
1644
1814
  readonly queue: string;
1645
1815
  retryAll(options?: QueueRetryOptions): void;
1646
1816
  ackAll(): void;
1647
1817
  }
1648
- declare interface MessageBatch<Body = unknown> {
1818
+ interface MessageBatch<Body = unknown> {
1649
1819
  readonly messages: readonly Message<Body>[];
1650
1820
  readonly queue: string;
1651
1821
  retryAll(options?: QueueRetryOptions): void;
1652
1822
  ackAll(): void;
1653
1823
  }
1654
- declare interface R2Error extends Error {
1824
+ interface R2Error extends Error {
1655
1825
  readonly name: string;
1656
1826
  readonly code: number;
1657
1827
  readonly message: string;
1658
1828
  readonly action: string;
1659
1829
  readonly stack: any;
1660
1830
  }
1661
- declare interface R2ListOptions {
1831
+ interface R2ListOptions {
1662
1832
  limit?: number;
1663
1833
  prefix?: string;
1664
1834
  cursor?: string;
@@ -1707,7 +1877,7 @@ declare abstract class R2Bucket {
1707
1877
  delete(keys: string | string[]): Promise<void>;
1708
1878
  list(options?: R2ListOptions): Promise<R2Objects>;
1709
1879
  }
1710
- declare interface R2MultipartUpload {
1880
+ interface R2MultipartUpload {
1711
1881
  readonly key: string;
1712
1882
  readonly uploadId: string;
1713
1883
  uploadPart(
@@ -1717,7 +1887,7 @@ declare interface R2MultipartUpload {
1717
1887
  abort(): Promise<void>;
1718
1888
  complete(uploadedParts: R2UploadedPart[]): Promise<R2Object>;
1719
1889
  }
1720
- declare interface R2UploadedPart {
1890
+ interface R2UploadedPart {
1721
1891
  partNumber: number;
1722
1892
  etag: string;
1723
1893
  }
@@ -1735,7 +1905,7 @@ declare abstract class R2Object {
1735
1905
  readonly storageClass: string;
1736
1906
  writeHttpMetadata(headers: Headers): void;
1737
1907
  }
1738
- declare interface R2ObjectBody extends R2Object {
1908
+ interface R2ObjectBody extends R2Object {
1739
1909
  get body(): ReadableStream;
1740
1910
  get bodyUsed(): boolean;
1741
1911
  arrayBuffer(): Promise<ArrayBuffer>;
@@ -1743,7 +1913,7 @@ declare interface R2ObjectBody extends R2Object {
1743
1913
  json<T>(): Promise<T>;
1744
1914
  blob(): Promise<Blob>;
1745
1915
  }
1746
- declare type R2Range =
1916
+ type R2Range =
1747
1917
  | {
1748
1918
  offset: number;
1749
1919
  length?: number;
@@ -1755,18 +1925,18 @@ declare type R2Range =
1755
1925
  | {
1756
1926
  suffix: number;
1757
1927
  };
1758
- declare interface R2Conditional {
1928
+ interface R2Conditional {
1759
1929
  etagMatches?: string;
1760
1930
  etagDoesNotMatch?: string;
1761
1931
  uploadedBefore?: Date;
1762
1932
  uploadedAfter?: Date;
1763
1933
  secondsGranularity?: boolean;
1764
1934
  }
1765
- declare interface R2GetOptions {
1935
+ interface R2GetOptions {
1766
1936
  onlyIf?: R2Conditional | Headers;
1767
1937
  range?: R2Range | Headers;
1768
1938
  }
1769
- declare interface R2PutOptions {
1939
+ interface R2PutOptions {
1770
1940
  onlyIf?: R2Conditional | Headers;
1771
1941
  httpMetadata?: R2HTTPMetadata | Headers;
1772
1942
  customMetadata?: Record<string, string>;
@@ -1777,12 +1947,12 @@ declare interface R2PutOptions {
1777
1947
  sha512?: ArrayBuffer | string;
1778
1948
  storageClass?: string;
1779
1949
  }
1780
- declare interface R2MultipartOptions {
1950
+ interface R2MultipartOptions {
1781
1951
  httpMetadata?: R2HTTPMetadata | Headers;
1782
1952
  customMetadata?: Record<string, string>;
1783
1953
  storageClass?: string;
1784
1954
  }
1785
- declare interface R2Checksums {
1955
+ interface R2Checksums {
1786
1956
  readonly md5?: ArrayBuffer;
1787
1957
  readonly sha1?: ArrayBuffer;
1788
1958
  readonly sha256?: ArrayBuffer;
@@ -1790,14 +1960,14 @@ declare interface R2Checksums {
1790
1960
  readonly sha512?: ArrayBuffer;
1791
1961
  toJSON(): R2StringChecksums;
1792
1962
  }
1793
- declare interface R2StringChecksums {
1963
+ interface R2StringChecksums {
1794
1964
  md5?: string;
1795
1965
  sha1?: string;
1796
1966
  sha256?: string;
1797
1967
  sha384?: string;
1798
1968
  sha512?: string;
1799
1969
  }
1800
- declare interface R2HTTPMetadata {
1970
+ interface R2HTTPMetadata {
1801
1971
  contentType?: string;
1802
1972
  contentLanguage?: string;
1803
1973
  contentDisposition?: string;
@@ -1805,7 +1975,7 @@ declare interface R2HTTPMetadata {
1805
1975
  cacheControl?: string;
1806
1976
  cacheExpiry?: Date;
1807
1977
  }
1808
- declare type R2Objects = {
1978
+ type R2Objects = {
1809
1979
  objects: R2Object[];
1810
1980
  delimitedPrefixes: string[];
1811
1981
  } & (
@@ -1822,16 +1992,16 @@ declare abstract class ScheduledEvent extends ExtendableEvent {
1822
1992
  readonly cron: string;
1823
1993
  noRetry(): void;
1824
1994
  }
1825
- declare interface ScheduledController {
1995
+ interface ScheduledController {
1826
1996
  readonly scheduledTime: number;
1827
1997
  readonly cron: string;
1828
1998
  noRetry(): void;
1829
1999
  }
1830
- declare interface QueuingStrategy<T = any> {
2000
+ interface QueuingStrategy<T = any> {
1831
2001
  highWaterMark?: number | bigint;
1832
2002
  size?: (chunk: T) => number | bigint;
1833
2003
  }
1834
- declare interface UnderlyingSink<W = any> {
2004
+ interface UnderlyingSink<W = any> {
1835
2005
  type?: string;
1836
2006
  start?: (controller: WritableStreamDefaultController) => void | Promise<void>;
1837
2007
  write?: (
@@ -1841,14 +2011,14 @@ declare interface UnderlyingSink<W = any> {
1841
2011
  abort?: (reason: any) => void | Promise<void>;
1842
2012
  close?: () => void | Promise<void>;
1843
2013
  }
1844
- declare interface UnderlyingByteSource {
2014
+ interface UnderlyingByteSource {
1845
2015
  type: "bytes";
1846
2016
  autoAllocateChunkSize?: number;
1847
2017
  start?: (controller: ReadableByteStreamController) => void | Promise<void>;
1848
2018
  pull?: (controller: ReadableByteStreamController) => void | Promise<void>;
1849
2019
  cancel?: (reason: any) => void | Promise<void>;
1850
2020
  }
1851
- declare interface UnderlyingSource<R = any> {
2021
+ interface UnderlyingSource<R = any> {
1852
2022
  type?: "" | undefined;
1853
2023
  start?: (
1854
2024
  controller: ReadableStreamDefaultController<R>,
@@ -1859,7 +2029,7 @@ declare interface UnderlyingSource<R = any> {
1859
2029
  cancel?: (reason: any) => void | Promise<void>;
1860
2030
  expectedLength?: number | bigint;
1861
2031
  }
1862
- declare interface Transformer<I = any, O = any> {
2032
+ interface Transformer<I = any, O = any> {
1863
2033
  readableType?: string;
1864
2034
  writableType?: string;
1865
2035
  start?: (
@@ -1875,7 +2045,7 @@ declare interface Transformer<I = any, O = any> {
1875
2045
  cancel?: (reason: any) => void | Promise<void>;
1876
2046
  expectedLength?: number;
1877
2047
  }
1878
- declare interface StreamPipeOptions {
2048
+ interface StreamPipeOptions {
1879
2049
  /**
1880
2050
  * 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.
1881
2051
  *
@@ -1898,7 +2068,7 @@ declare interface StreamPipeOptions {
1898
2068
  preventCancel?: boolean;
1899
2069
  signal?: AbortSignal;
1900
2070
  }
1901
- declare type ReadableStreamReadResult<R = any> =
2071
+ type ReadableStreamReadResult<R = any> =
1902
2072
  | {
1903
2073
  done: false;
1904
2074
  value: R;
@@ -1912,32 +2082,37 @@ declare type ReadableStreamReadResult<R = any> =
1912
2082
  *
1913
2083
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
1914
2084
  */
1915
- declare interface ReadableStream<R = any> {
1916
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
2085
+ interface ReadableStream<R = any> {
2086
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
1917
2087
  get locked(): boolean;
1918
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
2088
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
1919
2089
  cancel(reason?: any): Promise<void>;
1920
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
2090
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
1921
2091
  getReader(): ReadableStreamDefaultReader<R>;
1922
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
2092
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
1923
2093
  getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
1924
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
2094
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
1925
2095
  pipeThrough<T>(
1926
2096
  transform: ReadableWritablePair<T, R>,
1927
2097
  options?: StreamPipeOptions,
1928
2098
  ): ReadableStream<T>;
1929
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
2099
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
1930
2100
  pipeTo(
1931
2101
  destination: WritableStream<R>,
1932
2102
  options?: StreamPipeOptions,
1933
2103
  ): Promise<void>;
1934
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
2104
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
1935
2105
  tee(): [ReadableStream<R>, ReadableStream<R>];
1936
2106
  values(options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
1937
2107
  [Symbol.asyncIterator](
1938
2108
  options?: ReadableStreamValuesOptions,
1939
2109
  ): AsyncIterableIterator<R>;
1940
2110
  }
2111
+ /**
2112
+ * 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.
2113
+ *
2114
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
2115
+ */
1941
2116
  declare const ReadableStream: {
1942
2117
  prototype: ReadableStream;
1943
2118
  new (
@@ -1949,34 +2124,36 @@ declare const ReadableStream: {
1949
2124
  strategy?: QueuingStrategy<R>,
1950
2125
  ): ReadableStream<R>;
1951
2126
  };
2127
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
1952
2128
  declare class ReadableStreamDefaultReader<R = any> {
1953
2129
  constructor(stream: ReadableStream);
1954
2130
  get closed(): Promise<void>;
1955
2131
  cancel(reason?: any): Promise<void>;
1956
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
2132
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
1957
2133
  read(): Promise<ReadableStreamReadResult<R>>;
1958
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
2134
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
1959
2135
  releaseLock(): void;
1960
2136
  }
2137
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
1961
2138
  declare class ReadableStreamBYOBReader {
1962
2139
  constructor(stream: ReadableStream);
1963
2140
  get closed(): Promise<void>;
1964
2141
  cancel(reason?: any): Promise<void>;
1965
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
2142
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
1966
2143
  read<T extends ArrayBufferView>(
1967
2144
  view: T,
1968
2145
  ): Promise<ReadableStreamReadResult<T>>;
1969
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
2146
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
1970
2147
  releaseLock(): void;
1971
2148
  readAtLeast<T extends ArrayBufferView>(
1972
2149
  minElements: number,
1973
2150
  view: T,
1974
2151
  ): Promise<ReadableStreamReadResult<T>>;
1975
2152
  }
1976
- declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
2153
+ interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1977
2154
  min?: number;
1978
2155
  }
1979
- declare interface ReadableStreamGetReaderOptions {
2156
+ interface ReadableStreamGetReaderOptions {
1980
2157
  /**
1981
2158
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
1982
2159
  *
@@ -1984,54 +2161,63 @@ declare interface ReadableStreamGetReaderOptions {
1984
2161
  */
1985
2162
  mode: "byob";
1986
2163
  }
2164
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
1987
2165
  declare abstract class ReadableStreamBYOBRequest {
1988
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
2166
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
1989
2167
  get view(): Uint8Array | null;
1990
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
2168
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
1991
2169
  respond(bytesWritten: number): void;
1992
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
2170
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
1993
2171
  respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
1994
2172
  get atLeast(): number | null;
1995
2173
  }
2174
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
1996
2175
  declare abstract class ReadableStreamDefaultController<R = any> {
1997
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
2176
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
1998
2177
  get desiredSize(): number | null;
1999
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
2178
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
2000
2179
  close(): void;
2001
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
2180
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
2002
2181
  enqueue(chunk?: R): void;
2003
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
2182
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
2004
2183
  error(reason: any): void;
2005
2184
  }
2185
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
2006
2186
  declare abstract class ReadableByteStreamController {
2007
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
2187
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
2008
2188
  get byobRequest(): ReadableStreamBYOBRequest | null;
2009
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
2189
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
2010
2190
  get desiredSize(): number | null;
2011
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
2191
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
2012
2192
  close(): void;
2013
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
2193
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
2014
2194
  enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
2015
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
2195
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
2016
2196
  error(reason: any): void;
2017
2197
  }
2198
+ /**
2199
+ * This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
2200
+ *
2201
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
2202
+ */
2018
2203
  declare abstract class WritableStreamDefaultController {
2019
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
2204
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
2020
2205
  get signal(): AbortSignal;
2021
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
2206
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
2022
2207
  error(reason?: any): void;
2023
2208
  }
2209
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
2024
2210
  declare abstract class TransformStreamDefaultController<O = any> {
2025
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
2211
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
2026
2212
  get desiredSize(): number | null;
2027
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
2213
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
2028
2214
  enqueue(chunk?: O): void;
2029
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
2215
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
2030
2216
  error(reason: any): void;
2031
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
2217
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
2032
2218
  terminate(): void;
2033
2219
  }
2034
- declare interface ReadableWritablePair<R = any, W = any> {
2220
+ interface ReadableWritablePair<R = any, W = any> {
2035
2221
  /**
2036
2222
  * 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.
2037
2223
  *
@@ -2040,46 +2226,57 @@ declare interface ReadableWritablePair<R = any, W = any> {
2040
2226
  writable: WritableStream<W>;
2041
2227
  readable: ReadableStream<R>;
2042
2228
  }
2229
+ /**
2230
+ * 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.
2231
+ *
2232
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
2233
+ */
2043
2234
  declare class WritableStream<W = any> {
2044
2235
  constructor(
2045
2236
  underlyingSink?: UnderlyingSink,
2046
2237
  queuingStrategy?: QueuingStrategy,
2047
2238
  );
2048
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
2239
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
2049
2240
  get locked(): boolean;
2050
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
2241
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
2051
2242
  abort(reason?: any): Promise<void>;
2052
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
2243
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
2053
2244
  close(): Promise<void>;
2054
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
2245
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
2055
2246
  getWriter(): WritableStreamDefaultWriter<W>;
2056
2247
  }
2248
+ /**
2249
+ * 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.
2250
+ *
2251
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
2252
+ */
2057
2253
  declare class WritableStreamDefaultWriter<W = any> {
2058
2254
  constructor(stream: WritableStream);
2059
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
2255
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
2060
2256
  get closed(): Promise<void>;
2061
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
2257
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
2062
2258
  get ready(): Promise<void>;
2063
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
2259
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
2064
2260
  get desiredSize(): number | null;
2065
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
2261
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
2066
2262
  abort(reason?: any): Promise<void>;
2067
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
2263
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
2068
2264
  close(): Promise<void>;
2069
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
2265
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
2070
2266
  write(chunk?: W): Promise<void>;
2071
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
2267
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
2072
2268
  releaseLock(): void;
2073
2269
  }
2270
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
2074
2271
  declare class TransformStream<I = any, O = any> {
2075
2272
  constructor(
2076
2273
  transformer?: Transformer<I, O>,
2077
2274
  writableStrategy?: QueuingStrategy<I>,
2078
2275
  readableStrategy?: QueuingStrategy<O>,
2079
2276
  );
2080
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
2277
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
2081
2278
  get readable(): ReadableStream<O>;
2082
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
2279
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
2083
2280
  get writable(): WritableStream<I>;
2084
2281
  }
2085
2282
  declare class FixedLengthStream extends IdentityTransformStream {
@@ -2094,28 +2291,32 @@ declare class IdentityTransformStream extends TransformStream<
2094
2291
  > {
2095
2292
  constructor(queuingStrategy?: IdentityTransformStreamQueuingStrategy);
2096
2293
  }
2097
- declare interface IdentityTransformStreamQueuingStrategy {
2294
+ interface IdentityTransformStreamQueuingStrategy {
2098
2295
  highWaterMark?: number | bigint;
2099
2296
  }
2100
- declare interface ReadableStreamValuesOptions {
2297
+ interface ReadableStreamValuesOptions {
2101
2298
  preventCancel?: boolean;
2102
2299
  }
2300
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
2103
2301
  declare class CompressionStream extends TransformStream<
2104
2302
  ArrayBuffer | ArrayBufferView,
2105
2303
  Uint8Array
2106
2304
  > {
2107
2305
  constructor(format: "gzip" | "deflate" | "deflate-raw");
2108
2306
  }
2307
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
2109
2308
  declare class DecompressionStream extends TransformStream<
2110
2309
  ArrayBuffer | ArrayBufferView,
2111
2310
  Uint8Array
2112
2311
  > {
2113
2312
  constructor(format: "gzip" | "deflate" | "deflate-raw");
2114
2313
  }
2314
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
2115
2315
  declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
2116
2316
  constructor();
2117
2317
  get encoding(): string;
2118
2318
  }
2319
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
2119
2320
  declare class TextDecoderStream extends TransformStream<
2120
2321
  ArrayBuffer | ArrayBufferView,
2121
2322
  string
@@ -2125,27 +2326,37 @@ declare class TextDecoderStream extends TransformStream<
2125
2326
  get fatal(): boolean;
2126
2327
  get ignoreBOM(): boolean;
2127
2328
  }
2128
- declare interface TextDecoderStreamTextDecoderStreamInit {
2329
+ interface TextDecoderStreamTextDecoderStreamInit {
2129
2330
  fatal?: boolean;
2130
2331
  ignoreBOM?: boolean;
2131
2332
  }
2333
+ /**
2334
+ * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
2335
+ *
2336
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
2337
+ */
2132
2338
  declare class ByteLengthQueuingStrategy
2133
2339
  implements QueuingStrategy<ArrayBufferView>
2134
2340
  {
2135
2341
  constructor(init: QueuingStrategyInit);
2136
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
2342
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
2137
2343
  get highWaterMark(): number;
2138
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
2344
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
2139
2345
  get size(): (chunk?: any) => number;
2140
2346
  }
2347
+ /**
2348
+ * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
2349
+ *
2350
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
2351
+ */
2141
2352
  declare class CountQueuingStrategy implements QueuingStrategy {
2142
2353
  constructor(init: QueuingStrategyInit);
2143
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
2354
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
2144
2355
  get highWaterMark(): number;
2145
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
2356
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
2146
2357
  get size(): (chunk?: any) => number;
2147
2358
  }
2148
- declare interface QueuingStrategyInit {
2359
+ interface QueuingStrategyInit {
2149
2360
  /**
2150
2361
  * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
2151
2362
  *
@@ -2153,7 +2364,7 @@ declare interface QueuingStrategyInit {
2153
2364
  */
2154
2365
  highWaterMark: number;
2155
2366
  }
2156
- declare interface ScriptVersion {
2367
+ interface ScriptVersion {
2157
2368
  id?: string;
2158
2369
  tag?: string;
2159
2370
  message?: string;
@@ -2162,7 +2373,7 @@ declare abstract class TailEvent extends ExtendableEvent {
2162
2373
  readonly events: TraceItem[];
2163
2374
  readonly traces: TraceItem[];
2164
2375
  }
2165
- declare interface TraceItem {
2376
+ interface TraceItem {
2166
2377
  readonly event:
2167
2378
  | (
2168
2379
  | TraceItemFetchEventInfo
@@ -2186,157 +2397,197 @@ declare interface TraceItem {
2186
2397
  readonly dispatchNamespace?: string;
2187
2398
  readonly scriptTags?: string[];
2188
2399
  readonly outcome: string;
2400
+ readonly truncated: boolean;
2189
2401
  }
2190
- declare interface TraceItemAlarmEventInfo {
2402
+ interface TraceItemAlarmEventInfo {
2191
2403
  readonly scheduledTime: Date;
2192
2404
  }
2193
- declare interface TraceItemCustomEventInfo {}
2194
- declare interface TraceItemScheduledEventInfo {
2405
+ interface TraceItemCustomEventInfo {}
2406
+ interface TraceItemScheduledEventInfo {
2195
2407
  readonly scheduledTime: number;
2196
2408
  readonly cron: string;
2197
2409
  }
2198
- declare interface TraceItemQueueEventInfo {
2410
+ interface TraceItemQueueEventInfo {
2199
2411
  readonly queue: string;
2200
2412
  readonly batchSize: number;
2201
2413
  }
2202
- declare interface TraceItemEmailEventInfo {
2414
+ interface TraceItemEmailEventInfo {
2203
2415
  readonly mailFrom: string;
2204
2416
  readonly rcptTo: string;
2205
2417
  readonly rawSize: number;
2206
2418
  }
2207
- declare interface TraceItemTailEventInfo {
2419
+ interface TraceItemTailEventInfo {
2208
2420
  readonly consumedEvents: TraceItemTailEventInfoTailItem[];
2209
2421
  }
2210
- declare interface TraceItemTailEventInfoTailItem {
2422
+ interface TraceItemTailEventInfoTailItem {
2211
2423
  readonly scriptName: string | null;
2212
2424
  }
2213
- declare interface TraceItemFetchEventInfo {
2425
+ interface TraceItemFetchEventInfo {
2214
2426
  readonly response?: TraceItemFetchEventInfoResponse;
2215
2427
  readonly request: TraceItemFetchEventInfoRequest;
2216
2428
  }
2217
- declare interface TraceItemFetchEventInfoRequest {
2429
+ interface TraceItemFetchEventInfoRequest {
2218
2430
  readonly cf?: any;
2219
2431
  readonly headers: Record<string, string>;
2220
2432
  readonly method: string;
2221
2433
  readonly url: string;
2222
2434
  getUnredacted(): TraceItemFetchEventInfoRequest;
2223
2435
  }
2224
- declare interface TraceItemFetchEventInfoResponse {
2436
+ interface TraceItemFetchEventInfoResponse {
2225
2437
  readonly status: number;
2226
2438
  }
2227
- declare interface TraceItemJsRpcEventInfo {
2439
+ interface TraceItemJsRpcEventInfo {
2228
2440
  readonly rpcMethod: string;
2229
2441
  }
2230
- declare interface TraceItemHibernatableWebSocketEventInfo {
2442
+ interface TraceItemHibernatableWebSocketEventInfo {
2231
2443
  readonly getWebSocketEvent:
2232
2444
  | TraceItemHibernatableWebSocketEventInfoMessage
2233
2445
  | TraceItemHibernatableWebSocketEventInfoClose
2234
2446
  | TraceItemHibernatableWebSocketEventInfoError;
2235
2447
  }
2236
- declare interface TraceItemHibernatableWebSocketEventInfoMessage {
2448
+ interface TraceItemHibernatableWebSocketEventInfoMessage {
2237
2449
  readonly webSocketEventType: string;
2238
2450
  }
2239
- declare interface TraceItemHibernatableWebSocketEventInfoClose {
2451
+ interface TraceItemHibernatableWebSocketEventInfoClose {
2240
2452
  readonly webSocketEventType: string;
2241
2453
  readonly code: number;
2242
2454
  readonly wasClean: boolean;
2243
2455
  }
2244
- declare interface TraceItemHibernatableWebSocketEventInfoError {
2456
+ interface TraceItemHibernatableWebSocketEventInfoError {
2245
2457
  readonly webSocketEventType: string;
2246
2458
  }
2247
- declare interface TraceLog {
2459
+ interface TraceLog {
2248
2460
  readonly timestamp: number;
2249
2461
  readonly level: string;
2250
2462
  readonly message: any;
2251
2463
  }
2252
- declare interface TraceException {
2464
+ interface TraceException {
2253
2465
  readonly timestamp: number;
2254
2466
  readonly message: string;
2255
2467
  readonly name: string;
2256
2468
  readonly stack?: string;
2257
2469
  }
2258
- declare interface TraceDiagnosticChannelEvent {
2470
+ interface TraceDiagnosticChannelEvent {
2259
2471
  readonly timestamp: number;
2260
2472
  readonly channel: string;
2261
2473
  readonly message: any;
2262
2474
  }
2263
- declare interface TraceMetrics {
2475
+ interface TraceMetrics {
2264
2476
  readonly cpuTime: number;
2265
2477
  readonly wallTime: number;
2266
2478
  }
2267
- declare interface UnsafeTraceMetrics {
2479
+ interface UnsafeTraceMetrics {
2268
2480
  fromTrace(item: TraceItem): TraceMetrics;
2269
2481
  }
2482
+ /**
2483
+ * The URL interface represents an object providing static methods used for creating object URLs.
2484
+ *
2485
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
2486
+ */
2270
2487
  declare class URL {
2271
2488
  constructor(url: string | URL, base?: string | URL);
2272
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
2489
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
2273
2490
  get origin(): string;
2274
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
2491
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
2275
2492
  get href(): string;
2276
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
2493
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
2277
2494
  set href(value: string);
2278
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
2495
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
2279
2496
  get protocol(): string;
2280
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
2497
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
2281
2498
  set protocol(value: string);
2282
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
2499
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
2283
2500
  get username(): string;
2284
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
2501
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
2285
2502
  set username(value: string);
2286
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
2503
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
2287
2504
  get password(): string;
2288
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
2505
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
2289
2506
  set password(value: string);
2290
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
2507
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
2291
2508
  get host(): string;
2292
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
2509
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
2293
2510
  set host(value: string);
2294
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
2511
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
2295
2512
  get hostname(): string;
2296
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
2513
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
2297
2514
  set hostname(value: string);
2298
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
2515
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
2299
2516
  get port(): string;
2300
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
2517
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
2301
2518
  set port(value: string);
2302
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
2519
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
2303
2520
  get pathname(): string;
2304
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
2521
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
2305
2522
  set pathname(value: string);
2306
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
2523
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
2307
2524
  get search(): string;
2308
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
2525
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
2309
2526
  set search(value: string);
2310
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
2527
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
2311
2528
  get hash(): string;
2312
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
2529
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
2313
2530
  set hash(value: string);
2314
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
2531
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
2315
2532
  get searchParams(): URLSearchParams;
2316
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
2533
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
2317
2534
  toJSON(): string;
2535
+ /*function toString() { [native code] }*/
2318
2536
  toString(): string;
2319
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
2537
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
2320
2538
  static canParse(url: string, base?: string): boolean;
2321
2539
  static parse(url: string, base?: string): URL | null;
2322
2540
  }
2541
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
2323
2542
  declare class URLSearchParams {
2324
2543
  constructor(
2325
2544
  init?: Iterable<Iterable<string>> | Record<string, string> | string,
2326
2545
  );
2546
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
2327
2547
  get size(): number;
2548
+ /**
2549
+ * Appends a specified key/value pair as a new search parameter.
2550
+ *
2551
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
2552
+ */
2328
2553
  append(name: string, value: string): void;
2554
+ /**
2555
+ * Deletes the given search parameter, and its associated value, from the list of all search parameters.
2556
+ *
2557
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
2558
+ */
2329
2559
  delete(name: string, value?: string): void;
2560
+ /**
2561
+ * Returns the first value associated to the given search parameter.
2562
+ *
2563
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
2564
+ */
2330
2565
  get(name: string): string | null;
2566
+ /**
2567
+ * Returns all the values association with a given search parameter.
2568
+ *
2569
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
2570
+ */
2331
2571
  getAll(name: string): string[];
2572
+ /**
2573
+ * Returns a Boolean indicating if such a search parameter exists.
2574
+ *
2575
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
2576
+ */
2332
2577
  has(name: string, value?: string): boolean;
2578
+ /**
2579
+ * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
2580
+ *
2581
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
2582
+ */
2333
2583
  set(name: string, value: string): void;
2584
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
2334
2585
  sort(): void;
2335
- /** Returns an array of key, value pairs for every entry in the search params. */
2586
+ /* Returns an array of key, value pairs for every entry in the search params. */
2336
2587
  entries(): IterableIterator<[key: string, value: string]>;
2337
- /** Returns a list of keys in the search params. */
2588
+ /* Returns a list of keys in the search params. */
2338
2589
  keys(): IterableIterator<string>;
2339
- /** Returns a list of values in the search params. */
2590
+ /* Returns a list of values in the search params. */
2340
2591
  values(): IterableIterator<string>;
2341
2592
  forEach<This = unknown>(
2342
2593
  callback: (
@@ -2347,6 +2598,7 @@ declare class URLSearchParams {
2347
2598
  ) => void,
2348
2599
  thisArg?: This,
2349
2600
  ): void;
2601
+ /*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
2350
2602
  toString(): string;
2351
2603
  [Symbol.iterator](): IterableIterator<[key: string, value: string]>;
2352
2604
  }
@@ -2370,7 +2622,7 @@ declare class URLPattern {
2370
2622
  baseURL?: string,
2371
2623
  ): URLPatternURLPatternResult | null;
2372
2624
  }
2373
- declare interface URLPatternURLPatternInit {
2625
+ interface URLPatternURLPatternInit {
2374
2626
  protocol?: string;
2375
2627
  username?: string;
2376
2628
  password?: string;
@@ -2381,11 +2633,11 @@ declare interface URLPatternURLPatternInit {
2381
2633
  hash?: string;
2382
2634
  baseURL?: string;
2383
2635
  }
2384
- declare interface URLPatternURLPatternComponentResult {
2636
+ interface URLPatternURLPatternComponentResult {
2385
2637
  input: string;
2386
2638
  groups: Record<string, string>;
2387
2639
  }
2388
- declare interface URLPatternURLPatternResult {
2640
+ interface URLPatternURLPatternResult {
2389
2641
  inputs: (string | URLPatternURLPatternInit)[];
2390
2642
  protocol: URLPatternURLPatternComponentResult;
2391
2643
  username: URLPatternURLPatternComponentResult;
@@ -2396,9 +2648,14 @@ declare interface URLPatternURLPatternResult {
2396
2648
  search: URLPatternURLPatternComponentResult;
2397
2649
  hash: URLPatternURLPatternComponentResult;
2398
2650
  }
2399
- declare interface URLPatternURLPatternOptions {
2651
+ interface URLPatternURLPatternOptions {
2400
2652
  ignoreCase?: boolean;
2401
2653
  }
2654
+ /**
2655
+ * 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.
2656
+ *
2657
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
2658
+ */
2402
2659
  declare class CloseEvent extends Event {
2403
2660
  constructor(type: string, initializer?: CloseEventInit);
2404
2661
  /**
@@ -2420,24 +2677,39 @@ declare class CloseEvent extends Event {
2420
2677
  */
2421
2678
  readonly wasClean: boolean;
2422
2679
  }
2423
- declare interface CloseEventInit {
2680
+ interface CloseEventInit {
2424
2681
  code?: number;
2425
2682
  reason?: string;
2426
2683
  wasClean?: boolean;
2427
2684
  }
2685
+ /**
2686
+ * A message received by a target object.
2687
+ *
2688
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
2689
+ */
2428
2690
  declare class MessageEvent extends Event {
2429
2691
  constructor(type: string, initializer: MessageEventInit);
2692
+ /**
2693
+ * Returns the data of the message.
2694
+ *
2695
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
2696
+ */
2430
2697
  readonly data: ArrayBuffer | string;
2431
2698
  }
2432
- declare interface MessageEventInit {
2699
+ interface MessageEventInit {
2433
2700
  data: ArrayBuffer | string;
2434
2701
  }
2435
- declare type WebSocketEventMap = {
2702
+ type WebSocketEventMap = {
2436
2703
  close: CloseEvent;
2437
2704
  message: MessageEvent;
2438
2705
  open: Event;
2439
2706
  error: ErrorEvent;
2440
2707
  };
2708
+ /**
2709
+ * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
2710
+ *
2711
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
2712
+ */
2441
2713
  declare class WebSocket extends EventTarget<WebSocketEventMap> {
2442
2714
  constructor(url: string, protocols?: string[] | string);
2443
2715
  accept(): void;
@@ -2494,7 +2766,7 @@ declare const WebSocketPair: {
2494
2766
  1: WebSocket;
2495
2767
  };
2496
2768
  };
2497
- declare interface Socket {
2769
+ interface Socket {
2498
2770
  get readable(): ReadableStream;
2499
2771
  get writable(): WritableStream;
2500
2772
  get closed(): Promise<void>;
@@ -2502,81 +2774,77 @@ declare interface Socket {
2502
2774
  close(): Promise<void>;
2503
2775
  startTls(options?: TlsOptions): Socket;
2504
2776
  }
2505
- declare interface SocketOptions {
2777
+ interface SocketOptions {
2506
2778
  secureTransport?: string;
2507
2779
  allowHalfOpen: boolean;
2508
2780
  highWaterMark?: number | bigint;
2509
2781
  }
2510
- declare interface SocketAddress {
2782
+ interface SocketAddress {
2511
2783
  hostname: string;
2512
2784
  port: number;
2513
2785
  }
2514
- declare interface TlsOptions {
2786
+ interface TlsOptions {
2515
2787
  expectedServerHostname?: string;
2516
2788
  }
2517
- declare interface SocketInfo {
2789
+ interface SocketInfo {
2518
2790
  remoteAddress?: string;
2519
2791
  localAddress?: string;
2520
2792
  }
2521
- declare interface gpuGPU {
2522
- requestAdapter(
2523
- param1?: gpuGPURequestAdapterOptions,
2524
- ): Promise<gpuGPUAdapter | null>;
2793
+ interface GPU {
2794
+ requestAdapter(param1?: GPURequestAdapterOptions): Promise<GPUAdapter | null>;
2525
2795
  }
2526
- declare abstract class gpuGPUAdapter {
2527
- requestDevice(param1?: gpuGPUDeviceDescriptor): Promise<gpuGPUDevice>;
2528
- requestAdapterInfo(unmaskHints?: string[]): Promise<gpuGPUAdapterInfo>;
2529
- get features(): gpuGPUSupportedFeatures;
2530
- get limits(): gpuGPUSupportedLimits;
2796
+ declare abstract class GPUAdapter {
2797
+ requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
2798
+ requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
2799
+ get features(): GPUSupportedFeatures;
2800
+ get limits(): GPUSupportedLimits;
2531
2801
  }
2532
- declare interface gpuGPUDevice extends EventTarget {
2533
- createBuffer(param1: gpuGPUBufferDescriptor): gpuGPUBuffer;
2802
+ interface GPUDevice extends EventTarget {
2803
+ createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
2534
2804
  createBindGroupLayout(
2535
- descriptor: gpuGPUBindGroupLayoutDescriptor,
2536
- ): gpuGPUBindGroupLayout;
2537
- createBindGroup(descriptor: gpuGPUBindGroupDescriptor): gpuGPUBindGroup;
2538
- createSampler(descriptor: gpuGPUSamplerDescriptor): gpuGPUSampler;
2539
- createShaderModule(
2540
- descriptor: gpuGPUShaderModuleDescriptor,
2541
- ): gpuGPUShaderModule;
2805
+ descriptor: GPUBindGroupLayoutDescriptor,
2806
+ ): GPUBindGroupLayout;
2807
+ createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
2808
+ createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
2809
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
2542
2810
  createPipelineLayout(
2543
- descriptor: gpuGPUPipelineLayoutDescriptor,
2544
- ): gpuGPUPipelineLayout;
2811
+ descriptor: GPUPipelineLayoutDescriptor,
2812
+ ): GPUPipelineLayout;
2545
2813
  createComputePipeline(
2546
- descriptor: gpuGPUComputePipelineDescriptor,
2547
- ): gpuGPUComputePipeline;
2814
+ descriptor: GPUComputePipelineDescriptor,
2815
+ ): GPUComputePipeline;
2548
2816
  createRenderPipeline(
2549
- descriptor: gpuGPURenderPipelineDescriptor,
2550
- ): gpuGPURenderPipeline;
2817
+ descriptor: GPURenderPipelineDescriptor,
2818
+ ): GPURenderPipeline;
2551
2819
  createCommandEncoder(
2552
- descriptor?: gpuGPUCommandEncoderDescriptor,
2553
- ): gpuGPUCommandEncoder;
2554
- createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
2820
+ descriptor?: GPUCommandEncoderDescriptor,
2821
+ ): GPUCommandEncoder;
2822
+ createTexture(param1: GPUTextureDescriptor): GPUTexture;
2555
2823
  destroy(): void;
2556
- createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
2824
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
2557
2825
  pushErrorScope(filter: string): void;
2558
- popErrorScope(): Promise<gpuGPUError | null>;
2559
- get queue(): gpuGPUQueue;
2560
- get lost(): Promise<gpuGPUDeviceLostInfo>;
2561
- get features(): gpuGPUSupportedFeatures;
2562
- get limits(): gpuGPUSupportedLimits;
2826
+ popErrorScope(): Promise<GPUError | null>;
2827
+ get queue(): GPUQueue;
2828
+ get lost(): Promise<GPUDeviceLostInfo>;
2829
+ get features(): GPUSupportedFeatures;
2830
+ get limits(): GPUSupportedLimits;
2563
2831
  }
2564
- declare interface gpuGPUDeviceDescriptor {
2832
+ interface GPUDeviceDescriptor {
2565
2833
  label?: string;
2566
2834
  requiredFeatures?: string[];
2567
2835
  requiredLimits?: Record<string, number | bigint>;
2568
- defaultQueue?: gpuGPUQueueDescriptor;
2836
+ defaultQueue?: GPUQueueDescriptor;
2569
2837
  }
2570
- declare interface gpuGPUBufferDescriptor {
2838
+ interface GPUBufferDescriptor {
2571
2839
  label: string;
2572
2840
  size: number | bigint;
2573
2841
  usage: number;
2574
2842
  mappedAtCreation: boolean;
2575
2843
  }
2576
- declare interface gpuGPUQueueDescriptor {
2844
+ interface GPUQueueDescriptor {
2577
2845
  label?: string;
2578
2846
  }
2579
- declare abstract class gpuGPUBufferUsage {
2847
+ declare abstract class GPUBufferUsage {
2580
2848
  static readonly MAP_READ: number;
2581
2849
  static readonly MAP_WRITE: number;
2582
2850
  static readonly COPY_SRC: number;
@@ -2588,7 +2856,7 @@ declare abstract class gpuGPUBufferUsage {
2588
2856
  static readonly INDIRECT: number;
2589
2857
  static readonly QUERY_RESOLVE: number;
2590
2858
  }
2591
- declare interface gpuGPUBuffer {
2859
+ interface GPUBuffer {
2592
2860
  getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
2593
2861
  unmap(): void;
2594
2862
  destroy(): void;
@@ -2601,59 +2869,59 @@ declare interface gpuGPUBuffer {
2601
2869
  get usage(): number;
2602
2870
  get mapState(): string;
2603
2871
  }
2604
- declare abstract class gpuGPUShaderStage {
2872
+ declare abstract class GPUShaderStage {
2605
2873
  static readonly VERTEX: number;
2606
2874
  static readonly FRAGMENT: number;
2607
2875
  static readonly COMPUTE: number;
2608
2876
  }
2609
- declare interface gpuGPUBindGroupLayoutDescriptor {
2877
+ interface GPUBindGroupLayoutDescriptor {
2610
2878
  label?: string;
2611
- entries: gpuGPUBindGroupLayoutEntry[];
2879
+ entries: GPUBindGroupLayoutEntry[];
2612
2880
  }
2613
- declare interface gpuGPUBindGroupLayoutEntry {
2881
+ interface GPUBindGroupLayoutEntry {
2614
2882
  binding: number;
2615
2883
  visibility: number;
2616
- buffer?: gpuGPUBufferBindingLayout;
2617
- sampler?: gpuGPUSamplerBindingLayout;
2618
- texture?: gpuGPUTextureBindingLayout;
2619
- storageTexture?: gpuGPUStorageTextureBindingLayout;
2884
+ buffer?: GPUBufferBindingLayout;
2885
+ sampler?: GPUSamplerBindingLayout;
2886
+ texture?: GPUTextureBindingLayout;
2887
+ storageTexture?: GPUStorageTextureBindingLayout;
2620
2888
  }
2621
- declare interface gpuGPUStorageTextureBindingLayout {
2889
+ interface GPUStorageTextureBindingLayout {
2622
2890
  access?: string;
2623
2891
  format: string;
2624
2892
  viewDimension?: string;
2625
2893
  }
2626
- declare interface gpuGPUTextureBindingLayout {
2894
+ interface GPUTextureBindingLayout {
2627
2895
  sampleType?: string;
2628
2896
  viewDimension?: string;
2629
2897
  multisampled?: boolean;
2630
2898
  }
2631
- declare interface gpuGPUSamplerBindingLayout {
2899
+ interface GPUSamplerBindingLayout {
2632
2900
  type?: string;
2633
2901
  }
2634
- declare interface gpuGPUBufferBindingLayout {
2902
+ interface GPUBufferBindingLayout {
2635
2903
  type?: string;
2636
2904
  hasDynamicOffset?: boolean;
2637
2905
  minBindingSize?: number | bigint;
2638
2906
  }
2639
- declare interface gpuGPUBindGroupLayout {}
2640
- declare interface gpuGPUBindGroup {}
2641
- declare interface gpuGPUBindGroupDescriptor {
2907
+ interface GPUBindGroupLayout {}
2908
+ interface GPUBindGroup {}
2909
+ interface GPUBindGroupDescriptor {
2642
2910
  label?: string;
2643
- layout: gpuGPUBindGroupLayout;
2644
- entries: gpuGPUBindGroupEntry[];
2911
+ layout: GPUBindGroupLayout;
2912
+ entries: GPUBindGroupEntry[];
2645
2913
  }
2646
- declare interface gpuGPUBindGroupEntry {
2914
+ interface GPUBindGroupEntry {
2647
2915
  binding: number;
2648
- resource: gpuGPUBufferBinding | gpuGPUSampler;
2916
+ resource: GPUBufferBinding | GPUSampler;
2649
2917
  }
2650
- declare interface gpuGPUBufferBinding {
2651
- buffer: gpuGPUBuffer;
2918
+ interface GPUBufferBinding {
2919
+ buffer: GPUBuffer;
2652
2920
  offset?: number | bigint;
2653
2921
  size?: number | bigint;
2654
2922
  }
2655
- declare interface gpuGPUSampler {}
2656
- declare interface gpuGPUSamplerDescriptor {
2923
+ interface GPUSampler {}
2924
+ interface GPUSamplerDescriptor {
2657
2925
  label?: string;
2658
2926
  addressModeU?: string;
2659
2927
  addressModeV?: string;
@@ -2666,76 +2934,74 @@ declare interface gpuGPUSamplerDescriptor {
2666
2934
  compare: string;
2667
2935
  maxAnisotropy?: number;
2668
2936
  }
2669
- declare interface gpuGPUShaderModule {
2670
- getCompilationInfo(): Promise<gpuGPUCompilationInfo>;
2937
+ interface GPUShaderModule {
2938
+ getCompilationInfo(): Promise<GPUCompilationInfo>;
2671
2939
  }
2672
- declare interface gpuGPUShaderModuleDescriptor {
2940
+ interface GPUShaderModuleDescriptor {
2673
2941
  label?: string;
2674
2942
  code: string;
2675
2943
  }
2676
- declare interface gpuGPUPipelineLayout {}
2677
- declare interface gpuGPUPipelineLayoutDescriptor {
2944
+ interface GPUPipelineLayout {}
2945
+ interface GPUPipelineLayoutDescriptor {
2678
2946
  label?: string;
2679
- bindGroupLayouts: gpuGPUBindGroupLayout[];
2947
+ bindGroupLayouts: GPUBindGroupLayout[];
2680
2948
  }
2681
- declare interface gpuGPUComputePipeline {
2682
- getBindGroupLayout(index: number): gpuGPUBindGroupLayout;
2949
+ interface GPUComputePipeline {
2950
+ getBindGroupLayout(index: number): GPUBindGroupLayout;
2683
2951
  }
2684
- declare interface gpuGPUComputePipelineDescriptor {
2952
+ interface GPUComputePipelineDescriptor {
2685
2953
  label?: string;
2686
- compute: gpuGPUProgrammableStage;
2687
- layout: string | gpuGPUPipelineLayout;
2954
+ compute: GPUProgrammableStage;
2955
+ layout: string | GPUPipelineLayout;
2688
2956
  }
2689
- declare interface gpuGPUProgrammableStage {
2690
- module: gpuGPUShaderModule;
2957
+ interface GPUProgrammableStage {
2958
+ module: GPUShaderModule;
2691
2959
  entryPoint: string;
2692
2960
  constants?: Record<string, number>;
2693
2961
  }
2694
- declare interface gpuGPUCommandEncoder {
2962
+ interface GPUCommandEncoder {
2695
2963
  get label(): string;
2696
2964
  beginComputePass(
2697
- descriptor?: gpuGPUComputePassDescriptor,
2698
- ): gpuGPUComputePassEncoder;
2699
- beginRenderPass(
2700
- descriptor: gpuGPURenderPassDescriptor,
2701
- ): gpuGPURenderPassEncoder;
2965
+ descriptor?: GPUComputePassDescriptor,
2966
+ ): GPUComputePassEncoder;
2967
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
2702
2968
  copyBufferToBuffer(
2703
- source: gpuGPUBuffer,
2969
+ source: GPUBuffer,
2704
2970
  sourceOffset: number | bigint,
2705
- destination: gpuGPUBuffer,
2971
+ destination: GPUBuffer,
2706
2972
  destinationOffset: number | bigint,
2707
2973
  size: number | bigint,
2708
2974
  ): void;
2709
- finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
2975
+ finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
2710
2976
  copyTextureToBuffer(
2711
- source: gpuGPUImageCopyTexture,
2712
- destination: gpuGPUImageCopyBuffer,
2713
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2977
+ source: GPUImageCopyTexture,
2978
+ destination: GPUImageCopyBuffer,
2979
+ copySize: Iterable<number> | GPUExtent3DDict,
2714
2980
  ): void;
2715
2981
  copyBufferToTexture(
2716
- source: gpuGPUImageCopyBuffer,
2717
- destination: gpuGPUImageCopyTexture,
2718
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2982
+ source: GPUImageCopyBuffer,
2983
+ destination: GPUImageCopyTexture,
2984
+ copySize: Iterable<number> | GPUExtent3DDict,
2719
2985
  ): void;
2720
2986
  copyTextureToTexture(
2721
- source: gpuGPUImageCopyTexture,
2722
- destination: gpuGPUImageCopyTexture,
2723
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2987
+ source: GPUImageCopyTexture,
2988
+ destination: GPUImageCopyTexture,
2989
+ copySize: Iterable<number> | GPUExtent3DDict,
2724
2990
  ): void;
2725
2991
  clearBuffer(
2726
- buffer: gpuGPUBuffer,
2992
+ buffer: GPUBuffer,
2727
2993
  offset?: number | bigint,
2728
2994
  size?: number | bigint,
2729
2995
  ): void;
2730
2996
  }
2731
- declare interface gpuGPUCommandEncoderDescriptor {
2997
+ interface GPUCommandEncoderDescriptor {
2732
2998
  label?: string;
2733
2999
  }
2734
- declare interface gpuGPUComputePassEncoder {
2735
- setPipeline(pipeline: gpuGPUComputePipeline): void;
3000
+ interface GPUComputePassEncoder {
3001
+ setPipeline(pipeline: GPUComputePipeline): void;
2736
3002
  setBindGroup(
2737
3003
  index: number,
2738
- bindGroup: gpuGPUBindGroup | null,
3004
+ bindGroup: GPUBindGroup | null,
2739
3005
  dynamicOffsets?: Iterable<number>,
2740
3006
  ): void;
2741
3007
  dispatchWorkgroups(
@@ -2745,52 +3011,52 @@ declare interface gpuGPUComputePassEncoder {
2745
3011
  ): void;
2746
3012
  end(): void;
2747
3013
  }
2748
- declare interface gpuGPUComputePassDescriptor {
3014
+ interface GPUComputePassDescriptor {
2749
3015
  label?: string;
2750
- timestampWrites?: gpuGPUComputePassTimestampWrites;
3016
+ timestampWrites?: GPUComputePassTimestampWrites;
2751
3017
  }
2752
- declare interface gpuGPUQuerySet {}
2753
- declare interface gpuGPUQuerySetDescriptor {
3018
+ interface GPUQuerySet {}
3019
+ interface GPUQuerySetDescriptor {
2754
3020
  label?: string;
2755
3021
  }
2756
- declare interface gpuGPUComputePassTimestampWrites {
2757
- querySet: gpuGPUQuerySet;
3022
+ interface GPUComputePassTimestampWrites {
3023
+ querySet: GPUQuerySet;
2758
3024
  beginningOfPassWriteIndex?: number;
2759
3025
  endOfPassWriteIndex?: number;
2760
3026
  }
2761
- declare interface gpuGPUCommandBufferDescriptor {
3027
+ interface GPUCommandBufferDescriptor {
2762
3028
  label?: string;
2763
3029
  }
2764
- declare interface gpuGPUCommandBuffer {}
2765
- declare interface gpuGPUQueue {
2766
- submit(commandBuffers: gpuGPUCommandBuffer[]): void;
3030
+ interface GPUCommandBuffer {}
3031
+ interface GPUQueue {
3032
+ submit(commandBuffers: GPUCommandBuffer[]): void;
2767
3033
  writeBuffer(
2768
- buffer: gpuGPUBuffer,
3034
+ buffer: GPUBuffer,
2769
3035
  bufferOffset: number | bigint,
2770
3036
  data: ArrayBuffer | ArrayBufferView,
2771
3037
  dataOffset?: number | bigint,
2772
3038
  size?: number | bigint,
2773
3039
  ): void;
2774
3040
  }
2775
- declare abstract class gpuGPUMapMode {
3041
+ declare abstract class GPUMapMode {
2776
3042
  static readonly READ: number;
2777
3043
  static readonly WRITE: number;
2778
3044
  }
2779
- declare interface gpuGPURequestAdapterOptions {
3045
+ interface GPURequestAdapterOptions {
2780
3046
  powerPreference: string;
2781
3047
  forceFallbackAdapter?: boolean;
2782
3048
  }
2783
- declare interface gpuGPUAdapterInfo {
3049
+ interface GPUAdapterInfo {
2784
3050
  get vendor(): string;
2785
3051
  get architecture(): string;
2786
3052
  get device(): string;
2787
3053
  get description(): string;
2788
3054
  }
2789
- declare interface gpuGPUSupportedFeatures {
3055
+ interface GPUSupportedFeatures {
2790
3056
  has(name: string): boolean;
2791
3057
  keys(): string[];
2792
3058
  }
2793
- declare interface gpuGPUSupportedLimits {
3059
+ interface GPUSupportedLimits {
2794
3060
  get maxTextureDimension1D(): number;
2795
3061
  get maxTextureDimension2D(): number;
2796
3062
  get maxTextureDimension3D(): number;
@@ -2823,17 +3089,17 @@ declare interface gpuGPUSupportedLimits {
2823
3089
  get maxComputeWorkgroupSizeZ(): number;
2824
3090
  get maxComputeWorkgroupsPerDimension(): number;
2825
3091
  }
2826
- declare abstract class gpuGPUError {
3092
+ declare abstract class GPUError {
2827
3093
  get message(): string;
2828
3094
  }
2829
- declare abstract class gpuGPUOutOfMemoryError extends gpuGPUError {}
2830
- declare abstract class gpuGPUInternalError extends gpuGPUError {}
2831
- declare abstract class gpuGPUValidationError extends gpuGPUError {}
2832
- declare abstract class gpuGPUDeviceLostInfo {
3095
+ declare abstract class GPUOutOfMemoryError extends GPUError {}
3096
+ declare abstract class GPUInternalError extends GPUError {}
3097
+ declare abstract class GPUValidationError extends GPUError {}
3098
+ declare abstract class GPUDeviceLostInfo {
2833
3099
  get message(): string;
2834
3100
  get reason(): string;
2835
3101
  }
2836
- declare interface gpuGPUCompilationMessage {
3102
+ interface GPUCompilationMessage {
2837
3103
  get message(): string;
2838
3104
  get type(): string;
2839
3105
  get lineNum(): number;
@@ -2841,19 +3107,19 @@ declare interface gpuGPUCompilationMessage {
2841
3107
  get offset(): number;
2842
3108
  get length(): number;
2843
3109
  }
2844
- declare interface gpuGPUCompilationInfo {
2845
- get messages(): gpuGPUCompilationMessage[];
3110
+ interface GPUCompilationInfo {
3111
+ get messages(): GPUCompilationMessage[];
2846
3112
  }
2847
- declare abstract class gpuGPUTextureUsage {
3113
+ declare abstract class GPUTextureUsage {
2848
3114
  static readonly COPY_SRC: number;
2849
3115
  static readonly COPY_DST: number;
2850
3116
  static readonly TEXTURE_BINDING: number;
2851
3117
  static readonly STORAGE_BINDING: number;
2852
3118
  static readonly RENDER_ATTACHMENT: number;
2853
3119
  }
2854
- declare interface gpuGPUTextureDescriptor {
3120
+ interface GPUTextureDescriptor {
2855
3121
  label: string;
2856
- size: number[] | gpuGPUExtent3DDict;
3122
+ size: number[] | GPUExtent3DDict;
2857
3123
  mipLevelCount?: number;
2858
3124
  sampleCount?: number;
2859
3125
  dimension?: string;
@@ -2861,13 +3127,13 @@ declare interface gpuGPUTextureDescriptor {
2861
3127
  usage: number;
2862
3128
  viewFormats?: string[];
2863
3129
  }
2864
- declare interface gpuGPUExtent3DDict {
3130
+ interface GPUExtent3DDict {
2865
3131
  width: number;
2866
3132
  height?: number;
2867
3133
  depthOrArrayLayers?: number;
2868
3134
  }
2869
- declare interface gpuGPUTexture {
2870
- createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
3135
+ interface GPUTexture {
3136
+ createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
2871
3137
  destroy(): void;
2872
3138
  get width(): number;
2873
3139
  get height(): number;
@@ -2877,8 +3143,8 @@ declare interface gpuGPUTexture {
2877
3143
  get format(): string;
2878
3144
  get usage(): number;
2879
3145
  }
2880
- declare interface gpuGPUTextureView {}
2881
- declare interface gpuGPUTextureViewDescriptor {
3146
+ interface GPUTextureView {}
3147
+ interface GPUTextureViewDescriptor {
2882
3148
  label: string;
2883
3149
  format: string;
2884
3150
  dimension: string;
@@ -2888,91 +3154,91 @@ declare interface gpuGPUTextureViewDescriptor {
2888
3154
  baseArrayLayer?: number;
2889
3155
  arrayLayerCount: number;
2890
3156
  }
2891
- declare abstract class gpuGPUColorWrite {
3157
+ declare abstract class GPUColorWrite {
2892
3158
  static readonly RED: number;
2893
3159
  static readonly GREEN: number;
2894
3160
  static readonly BLUE: number;
2895
3161
  static readonly ALPHA: number;
2896
3162
  static readonly ALL: number;
2897
3163
  }
2898
- declare interface gpuGPURenderPipeline {}
2899
- declare interface gpuGPURenderPipelineDescriptor {
3164
+ interface GPURenderPipeline {}
3165
+ interface GPURenderPipelineDescriptor {
2900
3166
  label?: string;
2901
- layout: string | gpuGPUPipelineLayout;
2902
- vertex: gpuGPUVertexState;
2903
- primitive?: gpuGPUPrimitiveState;
2904
- depthStencil?: gpuGPUDepthStencilState;
2905
- multisample?: gpuGPUMultisampleState;
2906
- fragment?: gpuGPUFragmentState;
2907
- }
2908
- declare interface gpuGPUVertexState {
2909
- module: gpuGPUShaderModule;
3167
+ layout: string | GPUPipelineLayout;
3168
+ vertex: GPUVertexState;
3169
+ primitive?: GPUPrimitiveState;
3170
+ depthStencil?: GPUDepthStencilState;
3171
+ multisample?: GPUMultisampleState;
3172
+ fragment?: GPUFragmentState;
3173
+ }
3174
+ interface GPUVertexState {
3175
+ module: GPUShaderModule;
2910
3176
  entryPoint: string;
2911
3177
  constants?: Record<string, number>;
2912
- buffers?: gpuGPUVertexBufferLayout[];
3178
+ buffers?: GPUVertexBufferLayout[];
2913
3179
  }
2914
- declare interface gpuGPUVertexBufferLayout {
3180
+ interface GPUVertexBufferLayout {
2915
3181
  arrayStride: number | bigint;
2916
3182
  stepMode?: string;
2917
- attributes: gpuGPUVertexAttribute[];
3183
+ attributes: GPUVertexAttribute[];
2918
3184
  }
2919
- declare interface gpuGPUVertexAttribute {
3185
+ interface GPUVertexAttribute {
2920
3186
  format: string;
2921
3187
  offset: number | bigint;
2922
3188
  shaderLocation: number;
2923
3189
  }
2924
- declare interface gpuGPUPrimitiveState {
3190
+ interface GPUPrimitiveState {
2925
3191
  topology?: string;
2926
3192
  stripIndexFormat?: string;
2927
3193
  frontFace?: string;
2928
3194
  cullMode?: string;
2929
3195
  unclippedDepth?: boolean;
2930
3196
  }
2931
- declare interface gpuGPUStencilFaceState {
3197
+ interface GPUStencilFaceState {
2932
3198
  compare?: string;
2933
3199
  failOp?: string;
2934
3200
  depthFailOp?: string;
2935
3201
  passOp?: string;
2936
3202
  }
2937
- declare interface gpuGPUDepthStencilState {
3203
+ interface GPUDepthStencilState {
2938
3204
  format: string;
2939
3205
  depthWriteEnabled: boolean;
2940
3206
  depthCompare: string;
2941
- stencilFront?: gpuGPUStencilFaceState;
2942
- stencilBack?: gpuGPUStencilFaceState;
3207
+ stencilFront?: GPUStencilFaceState;
3208
+ stencilBack?: GPUStencilFaceState;
2943
3209
  stencilReadMask?: number;
2944
3210
  stencilWriteMask?: number;
2945
3211
  depthBias?: number;
2946
3212
  depthBiasSlopeScale?: number;
2947
3213
  depthBiasClamp?: number;
2948
3214
  }
2949
- declare interface gpuGPUMultisampleState {
3215
+ interface GPUMultisampleState {
2950
3216
  count?: number;
2951
3217
  mask?: number;
2952
3218
  alphaToCoverageEnabled?: boolean;
2953
3219
  }
2954
- declare interface gpuGPUFragmentState {
2955
- module: gpuGPUShaderModule;
3220
+ interface GPUFragmentState {
3221
+ module: GPUShaderModule;
2956
3222
  entryPoint: string;
2957
3223
  constants?: Record<string, number>;
2958
- targets: gpuGPUColorTargetState[];
3224
+ targets: GPUColorTargetState[];
2959
3225
  }
2960
- declare interface gpuGPUColorTargetState {
3226
+ interface GPUColorTargetState {
2961
3227
  format: string;
2962
- blend: gpuGPUBlendState;
3228
+ blend: GPUBlendState;
2963
3229
  writeMask?: number;
2964
3230
  }
2965
- declare interface gpuGPUBlendState {
2966
- color: gpuGPUBlendComponent;
2967
- alpha: gpuGPUBlendComponent;
3231
+ interface GPUBlendState {
3232
+ color: GPUBlendComponent;
3233
+ alpha: GPUBlendComponent;
2968
3234
  }
2969
- declare interface gpuGPUBlendComponent {
3235
+ interface GPUBlendComponent {
2970
3236
  operation?: string;
2971
3237
  srcFactor?: string;
2972
3238
  dstFactor?: string;
2973
3239
  }
2974
- declare interface gpuGPURenderPassEncoder {
2975
- setPipeline(pipeline: gpuGPURenderPipeline): void;
3240
+ interface GPURenderPassEncoder {
3241
+ setPipeline(pipeline: GPURenderPipeline): void;
2976
3242
  draw(
2977
3243
  vertexCount: number,
2978
3244
  instanceCount?: number,
@@ -2981,30 +3247,30 @@ declare interface gpuGPURenderPassEncoder {
2981
3247
  ): void;
2982
3248
  end(): void;
2983
3249
  }
2984
- declare interface gpuGPURenderPassDescriptor {
3250
+ interface GPURenderPassDescriptor {
2985
3251
  label?: string;
2986
- colorAttachments: gpuGPURenderPassColorAttachment[];
2987
- depthStencilAttachment?: gpuGPURenderPassDepthStencilAttachment;
2988
- occlusionQuerySet?: gpuGPUQuerySet;
2989
- timestampWrites?: gpuGPURenderPassTimestampWrites;
3252
+ colorAttachments: GPURenderPassColorAttachment[];
3253
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
3254
+ occlusionQuerySet?: GPUQuerySet;
3255
+ timestampWrites?: GPURenderPassTimestampWrites;
2990
3256
  maxDrawCount?: number | bigint;
2991
3257
  }
2992
- declare interface gpuGPURenderPassColorAttachment {
2993
- view: gpuGPUTextureView;
3258
+ interface GPURenderPassColorAttachment {
3259
+ view: GPUTextureView;
2994
3260
  depthSlice?: number;
2995
- resolveTarget?: gpuGPUTextureView;
2996
- clearValue?: number[] | gpuGPUColorDict;
3261
+ resolveTarget?: GPUTextureView;
3262
+ clearValue?: number[] | GPUColorDict;
2997
3263
  loadOp: string;
2998
3264
  storeOp: string;
2999
3265
  }
3000
- declare interface gpuGPUColorDict {
3266
+ interface GPUColorDict {
3001
3267
  r: number;
3002
3268
  g: number;
3003
3269
  b: number;
3004
3270
  a: number;
3005
3271
  }
3006
- declare interface gpuGPURenderPassDepthStencilAttachment {
3007
- view: gpuGPUTextureView;
3272
+ interface GPURenderPassDepthStencilAttachment {
3273
+ view: GPUTextureView;
3008
3274
  depthClearValue?: number;
3009
3275
  depthLoadOp?: string;
3010
3276
  depthStoreOp?: string;
@@ -3014,28 +3280,29 @@ declare interface gpuGPURenderPassDepthStencilAttachment {
3014
3280
  stencilStoreOp?: string;
3015
3281
  stencilReadOnly?: boolean;
3016
3282
  }
3017
- declare interface gpuGPURenderPassTimestampWrites {
3018
- querySet: gpuGPUQuerySet;
3283
+ interface GPURenderPassTimestampWrites {
3284
+ querySet: GPUQuerySet;
3019
3285
  beginningOfPassWriteIndex?: number;
3020
3286
  endOfPassWriteIndex?: number;
3021
3287
  }
3022
- declare interface gpuGPUImageCopyTexture {
3023
- texture: gpuGPUTexture;
3288
+ interface GPUImageCopyTexture {
3289
+ texture: GPUTexture;
3024
3290
  mipLevel?: number;
3025
- origin?: number[] | gpuGPUOrigin3DDict;
3291
+ origin?: number[] | GPUOrigin3DDict;
3026
3292
  aspect?: string;
3027
3293
  }
3028
- declare interface gpuGPUImageCopyBuffer {
3029
- buffer: gpuGPUBuffer;
3294
+ interface GPUImageCopyBuffer {
3295
+ buffer: GPUBuffer;
3030
3296
  offset?: number | bigint;
3031
3297
  bytesPerRow?: number;
3032
3298
  rowsPerImage?: number;
3033
3299
  }
3034
- declare interface gpuGPUOrigin3DDict {
3300
+ interface GPUOrigin3DDict {
3035
3301
  x?: number;
3036
3302
  y?: number;
3037
3303
  z?: number;
3038
3304
  }
3305
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
3039
3306
  declare class EventSource {
3040
3307
  constructor(url: string, init?: EventSourceEventSourceInit);
3041
3308
  /**
@@ -3062,31 +3329,31 @@ declare class EventSource {
3062
3329
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
3063
3330
  */
3064
3331
  get readyState(): number;
3065
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3332
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3066
3333
  get onopen(): any | null;
3067
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3334
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3068
3335
  set onopen(value: any | null);
3069
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3336
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3070
3337
  get onmessage(): any | null;
3071
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3338
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3072
3339
  set onmessage(value: any | null);
3073
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3340
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3074
3341
  get onerror(): any | null;
3075
- /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3342
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3076
3343
  set onerror(value: any | null);
3077
3344
  static readonly CONNECTING: number;
3078
3345
  static readonly OPEN: number;
3079
3346
  static readonly CLOSED: number;
3080
3347
  static from(stream: ReadableStream): EventSource;
3081
3348
  }
3082
- declare interface EventSourceEventSourceInit {
3349
+ interface EventSourceEventSourceInit {
3083
3350
  withCredentials?: boolean;
3084
3351
  fetcher?: Fetcher;
3085
3352
  }
3086
- declare type AiImageClassificationInput = {
3353
+ type AiImageClassificationInput = {
3087
3354
  image: number[];
3088
3355
  };
3089
- declare type AiImageClassificationOutput = {
3356
+ type AiImageClassificationOutput = {
3090
3357
  score?: number;
3091
3358
  label?: string;
3092
3359
  }[];
@@ -3094,7 +3361,7 @@ declare abstract class BaseAiImageClassification {
3094
3361
  inputs: AiImageClassificationInput;
3095
3362
  postProcessedOutputs: AiImageClassificationOutput;
3096
3363
  }
3097
- declare type AiImageToTextInput = {
3364
+ type AiImageToTextInput = {
3098
3365
  image: number[];
3099
3366
  prompt?: string;
3100
3367
  max_tokens?: number;
@@ -3108,17 +3375,17 @@ declare type AiImageToTextInput = {
3108
3375
  raw?: boolean;
3109
3376
  messages?: RoleScopedChatInput[];
3110
3377
  };
3111
- declare type AiImageToTextOutput = {
3378
+ type AiImageToTextOutput = {
3112
3379
  description: string;
3113
3380
  };
3114
3381
  declare abstract class BaseAiImageToText {
3115
3382
  inputs: AiImageToTextInput;
3116
3383
  postProcessedOutputs: AiImageToTextOutput;
3117
3384
  }
3118
- declare type AiObjectDetectionInput = {
3385
+ type AiObjectDetectionInput = {
3119
3386
  image: number[];
3120
3387
  };
3121
- declare type AiObjectDetectionOutput = {
3388
+ type AiObjectDetectionOutput = {
3122
3389
  score?: number;
3123
3390
  label?: string;
3124
3391
  }[];
@@ -3126,19 +3393,19 @@ declare abstract class BaseAiObjectDetection {
3126
3393
  inputs: AiObjectDetectionInput;
3127
3394
  postProcessedOutputs: AiObjectDetectionOutput;
3128
3395
  }
3129
- declare type AiSentenceSimilarityInput = {
3396
+ type AiSentenceSimilarityInput = {
3130
3397
  source: string;
3131
3398
  sentences: string[];
3132
3399
  };
3133
- declare type AiSentenceSimilarityOutput = number[];
3400
+ type AiSentenceSimilarityOutput = number[];
3134
3401
  declare abstract class BaseAiSentenceSimilarity {
3135
3402
  inputs: AiSentenceSimilarityInput;
3136
3403
  postProcessedOutputs: AiSentenceSimilarityOutput;
3137
3404
  }
3138
- declare type AiSpeechRecognitionInput = {
3405
+ type AiSpeechRecognitionInput = {
3139
3406
  audio: number[];
3140
3407
  };
3141
- declare type AiSpeechRecognitionOutput = {
3408
+ type AiSpeechRecognitionOutput = {
3142
3409
  text?: string;
3143
3410
  words?: {
3144
3411
  word: string;
@@ -3151,21 +3418,21 @@ declare abstract class BaseAiSpeechRecognition {
3151
3418
  inputs: AiSpeechRecognitionInput;
3152
3419
  postProcessedOutputs: AiSpeechRecognitionOutput;
3153
3420
  }
3154
- declare type AiSummarizationInput = {
3421
+ type AiSummarizationInput = {
3155
3422
  input_text: string;
3156
3423
  max_length?: number;
3157
3424
  };
3158
- declare type AiSummarizationOutput = {
3425
+ type AiSummarizationOutput = {
3159
3426
  summary: string;
3160
3427
  };
3161
3428
  declare abstract class BaseAiSummarization {
3162
3429
  inputs: AiSummarizationInput;
3163
3430
  postProcessedOutputs: AiSummarizationOutput;
3164
3431
  }
3165
- declare type AiTextClassificationInput = {
3432
+ type AiTextClassificationInput = {
3166
3433
  text: string;
3167
3434
  };
3168
- declare type AiTextClassificationOutput = {
3435
+ type AiTextClassificationOutput = {
3169
3436
  score?: number;
3170
3437
  label?: string;
3171
3438
  }[];
@@ -3173,10 +3440,10 @@ declare abstract class BaseAiTextClassification {
3173
3440
  inputs: AiTextClassificationInput;
3174
3441
  postProcessedOutputs: AiTextClassificationOutput;
3175
3442
  }
3176
- declare type AiTextEmbeddingsInput = {
3443
+ type AiTextEmbeddingsInput = {
3177
3444
  text: string | string[];
3178
3445
  };
3179
- declare type AiTextEmbeddingsOutput = {
3446
+ type AiTextEmbeddingsOutput = {
3180
3447
  shape: number[];
3181
3448
  data: number[][];
3182
3449
  };
@@ -3184,11 +3451,11 @@ declare abstract class BaseAiTextEmbeddings {
3184
3451
  inputs: AiTextEmbeddingsInput;
3185
3452
  postProcessedOutputs: AiTextEmbeddingsOutput;
3186
3453
  }
3187
- declare type RoleScopedChatInput = {
3454
+ type RoleScopedChatInput = {
3188
3455
  role: "user" | "assistant" | "system" | "tool";
3189
3456
  content: string;
3190
3457
  };
3191
- declare type AiTextGenerationToolInput = {
3458
+ type AiTextGenerationToolInput = {
3192
3459
  type: "function";
3193
3460
  function: {
3194
3461
  name: string;
@@ -3205,7 +3472,7 @@ declare type AiTextGenerationToolInput = {
3205
3472
  };
3206
3473
  };
3207
3474
  };
3208
- declare type AiTextGenerationInput = {
3475
+ type AiTextGenerationInput = {
3209
3476
  prompt?: string;
3210
3477
  raw?: boolean;
3211
3478
  stream?: boolean;
@@ -3220,7 +3487,7 @@ declare type AiTextGenerationInput = {
3220
3487
  messages?: RoleScopedChatInput[];
3221
3488
  tools?: AiTextGenerationToolInput[];
3222
3489
  };
3223
- declare type AiTextGenerationOutput =
3490
+ type AiTextGenerationOutput =
3224
3491
  | {
3225
3492
  response?: string;
3226
3493
  tool_calls?: {
@@ -3233,7 +3500,7 @@ declare abstract class BaseAiTextGeneration {
3233
3500
  inputs: AiTextGenerationInput;
3234
3501
  postProcessedOutputs: AiTextGenerationOutput;
3235
3502
  }
3236
- declare type AiTextToImageInput = {
3503
+ type AiTextToImageInput = {
3237
3504
  prompt: string;
3238
3505
  image?: number[];
3239
3506
  mask?: number[];
@@ -3241,53 +3508,52 @@ declare type AiTextToImageInput = {
3241
3508
  strength?: number;
3242
3509
  guidance?: number;
3243
3510
  };
3244
- declare type AiTextToImageOutput = Uint8Array;
3511
+ type AiTextToImageOutput = Uint8Array;
3245
3512
  declare abstract class BaseAiTextToImage {
3246
3513
  inputs: AiTextToImageInput;
3247
3514
  postProcessedOutputs: AiTextToImageOutput;
3248
3515
  }
3249
- declare type AiTranslationInput = {
3516
+ type AiTranslationInput = {
3250
3517
  text: string;
3251
3518
  target_lang: string;
3252
3519
  source_lang?: string;
3253
3520
  };
3254
- declare type AiTranslationOutput = {
3521
+ type AiTranslationOutput = {
3255
3522
  translated_text?: string;
3256
3523
  };
3257
3524
  declare abstract class BaseAiTranslation {
3258
3525
  inputs: AiTranslationInput;
3259
3526
  postProcessedOutputs: AiTranslationOutput;
3260
3527
  }
3261
- declare type GatewayOptions = {
3528
+ type GatewayOptions = {
3262
3529
  id: string;
3263
3530
  cacheTtl?: number;
3264
3531
  skipCache?: boolean;
3265
3532
  metadata?: Record<string, number | string | boolean | null | bigint>;
3266
3533
  };
3267
- declare type AiOptions = {
3534
+ type AiOptions = {
3268
3535
  gateway?: GatewayOptions;
3269
3536
  prefix?: string;
3270
3537
  extraHeaders?: object;
3271
3538
  };
3272
- declare type BaseAiTextClassificationModels =
3273
- "@cf/huggingface/distilbert-sst-2-int8";
3274
- declare type BaseAiTextToImageModels =
3539
+ type BaseAiTextClassificationModels = "@cf/huggingface/distilbert-sst-2-int8";
3540
+ type BaseAiTextToImageModels =
3275
3541
  | "@cf/stabilityai/stable-diffusion-xl-base-1.0"
3276
3542
  | "@cf/runwayml/stable-diffusion-v1-5-inpainting"
3277
3543
  | "@cf/runwayml/stable-diffusion-v1-5-img2img"
3278
3544
  | "@cf/lykon/dreamshaper-8-lcm"
3279
3545
  | "@cf/bytedance/stable-diffusion-xl-lightning";
3280
- declare type BaseAiTextEmbeddingsModels =
3546
+ type BaseAiTextEmbeddingsModels =
3281
3547
  | "@cf/baai/bge-small-en-v1.5"
3282
3548
  | "@cf/baai/bge-base-en-v1.5"
3283
3549
  | "@cf/baai/bge-large-en-v1.5";
3284
- declare type BaseAiSpeechRecognitionModels =
3550
+ type BaseAiSpeechRecognitionModels =
3285
3551
  | "@cf/openai/whisper"
3286
3552
  | "@cf/openai/whisper-tiny-en"
3287
3553
  | "@cf/openai/whisper-sherpa";
3288
- declare type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
3289
- declare type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
3290
- declare type BaseAiTextGenerationModels =
3554
+ type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
3555
+ type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
3556
+ type BaseAiTextGenerationModels =
3291
3557
  | "@cf/meta/llama-3-8b-instruct"
3292
3558
  | "@cf/meta/llama-3-8b-instruct-awq"
3293
3559
  | "@cf/meta/llama-2-7b-chat-int8"
@@ -3323,9 +3589,9 @@ declare type BaseAiTextGenerationModels =
3323
3589
  | "@cf/meta-llama/llama-2-7b-chat-hf-lora"
3324
3590
  | "@cf/fblgit/una-cybertron-7b-v2-bf16"
3325
3591
  | "@cf/fblgit/una-cybertron-7b-v2-awq";
3326
- declare type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
3327
- declare type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
3328
- declare type BaseAiImageToTextModels =
3592
+ type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
3593
+ type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
3594
+ type BaseAiImageToTextModels =
3329
3595
  | "@cf/unum/uform-gen2-qwen-500m"
3330
3596
  | "@cf/llava-hf/llava-1.5-7b-hf";
3331
3597
  declare abstract class Ai {
@@ -3380,7 +3646,7 @@ declare abstract class Ai {
3380
3646
  options?: AiOptions,
3381
3647
  ): Promise<BaseAiImageToText["postProcessedOutputs"]>;
3382
3648
  }
3383
- declare interface BasicImageTransformations {
3649
+ interface BasicImageTransformations {
3384
3650
  /**
3385
3651
  * Maximum width in image pixels. The value must be an integer.
3386
3652
  */
@@ -3446,7 +3712,7 @@ declare interface BasicImageTransformations {
3446
3712
  */
3447
3713
  rotate?: 0 | 90 | 180 | 270 | 360;
3448
3714
  }
3449
- declare interface BasicImageTransformationsGravityCoordinates {
3715
+ interface BasicImageTransformationsGravityCoordinates {
3450
3716
  x: number;
3451
3717
  y: number;
3452
3718
  }
@@ -3459,7 +3725,7 @@ declare interface BasicImageTransformationsGravityCoordinates {
3459
3725
  * Note: Currently, these properties cannot be tested in the
3460
3726
  * playground.
3461
3727
  */
3462
- declare interface RequestInitCfProperties extends Record<string, unknown> {
3728
+ interface RequestInitCfProperties extends Record<string, unknown> {
3463
3729
  cacheEverything?: boolean;
3464
3730
  /**
3465
3731
  * A request's cache key is what determines if two requests are
@@ -3510,8 +3776,7 @@ declare interface RequestInitCfProperties extends Record<string, unknown> {
3510
3776
  */
3511
3777
  resolveOverride?: string;
3512
3778
  }
3513
- declare interface RequestInitCfPropertiesImageDraw
3514
- extends BasicImageTransformations {
3779
+ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
3515
3780
  /**
3516
3781
  * Absolute URL of the image file to use for the drawing. It can be any of
3517
3782
  * the supported file formats. For drawing of watermarks or non-rectangular
@@ -3548,8 +3813,7 @@ declare interface RequestInitCfPropertiesImageDraw
3548
3813
  bottom?: number;
3549
3814
  right?: number;
3550
3815
  }
3551
- declare interface RequestInitCfPropertiesImage
3552
- extends BasicImageTransformations {
3816
+ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
3553
3817
  /**
3554
3818
  * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
3555
3819
  * easier to specify higher-DPI sizes in <img srcset>.
@@ -3674,12 +3938,12 @@ declare interface RequestInitCfPropertiesImage
3674
3938
  */
3675
3939
  compression?: "fast";
3676
3940
  }
3677
- declare interface RequestInitCfPropertiesImageMinify {
3941
+ interface RequestInitCfPropertiesImageMinify {
3678
3942
  javascript?: boolean;
3679
3943
  css?: boolean;
3680
3944
  html?: boolean;
3681
3945
  }
3682
- declare interface RequestInitCfPropertiesR2 {
3946
+ interface RequestInitCfPropertiesR2 {
3683
3947
  /**
3684
3948
  * Colo id of bucket that an object is stored in
3685
3949
  */
@@ -3688,14 +3952,13 @@ declare interface RequestInitCfPropertiesR2 {
3688
3952
  /**
3689
3953
  * Request metadata provided by Cloudflare's edge.
3690
3954
  */
3691
- declare type IncomingRequestCfProperties<HostMetadata = unknown> =
3955
+ type IncomingRequestCfProperties<HostMetadata = unknown> =
3692
3956
  IncomingRequestCfPropertiesBase &
3693
3957
  IncomingRequestCfPropertiesBotManagementEnterprise &
3694
3958
  IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
3695
3959
  IncomingRequestCfPropertiesGeographicInformation &
3696
3960
  IncomingRequestCfPropertiesCloudflareAccessOrApiShield;
3697
- declare interface IncomingRequestCfPropertiesBase
3698
- extends Record<string, unknown> {
3961
+ interface IncomingRequestCfPropertiesBase extends Record<string, unknown> {
3699
3962
  /**
3700
3963
  * [ASN](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) of the incoming request.
3701
3964
  *
@@ -3773,7 +4036,7 @@ declare interface IncomingRequestCfPropertiesBase
3773
4036
  */
3774
4037
  tlsExportedAuthenticator?: IncomingRequestCfPropertiesExportedAuthenticatorMetadata;
3775
4038
  }
3776
- declare interface IncomingRequestCfPropertiesBotManagementBase {
4039
+ interface IncomingRequestCfPropertiesBotManagementBase {
3777
4040
  /**
3778
4041
  * Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
3779
4042
  * represented as an integer percentage between `1` (almost certainly a bot) and `99` (almost certainly human).
@@ -3800,7 +4063,7 @@ declare interface IncomingRequestCfPropertiesBotManagementBase {
3800
4063
  */
3801
4064
  detectionIds: number[];
3802
4065
  }
3803
- declare interface IncomingRequestCfPropertiesBotManagement {
4066
+ interface IncomingRequestCfPropertiesBotManagement {
3804
4067
  /**
3805
4068
  * Results of Cloudflare's Bot Management analysis
3806
4069
  */
@@ -3812,7 +4075,7 @@ declare interface IncomingRequestCfPropertiesBotManagement {
3812
4075
  */
3813
4076
  clientTrustScore: number;
3814
4077
  }
3815
- declare interface IncomingRequestCfPropertiesBotManagementEnterprise
4078
+ interface IncomingRequestCfPropertiesBotManagementEnterprise
3816
4079
  extends IncomingRequestCfPropertiesBotManagement {
3817
4080
  /**
3818
4081
  * Results of Cloudflare's Bot Management analysis
@@ -3825,9 +4088,7 @@ declare interface IncomingRequestCfPropertiesBotManagementEnterprise
3825
4088
  ja3Hash: string;
3826
4089
  };
3827
4090
  }
3828
- declare interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<
3829
- HostMetadata,
3830
- > {
4091
+ interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> {
3831
4092
  /**
3832
4093
  * Custom metadata set per-host in [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/).
3833
4094
  *
@@ -3836,7 +4097,7 @@ declare interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<
3836
4097
  */
3837
4098
  hostMetadata: HostMetadata;
3838
4099
  }
3839
- declare interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
4100
+ interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
3840
4101
  /**
3841
4102
  * Information about the client certificate presented to Cloudflare.
3842
4103
  *
@@ -3858,7 +4119,7 @@ declare interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
3858
4119
  /**
3859
4120
  * Metadata about the request's TLS handshake
3860
4121
  */
3861
- declare interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
4122
+ interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
3862
4123
  /**
3863
4124
  * The client's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal
3864
4125
  *
@@ -3887,7 +4148,7 @@ declare interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
3887
4148
  /**
3888
4149
  * Geographic data about the request's origin.
3889
4150
  */
3890
- declare interface IncomingRequestCfPropertiesGeographicInformation {
4151
+ interface IncomingRequestCfPropertiesGeographicInformation {
3891
4152
  /**
3892
4153
  * The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from.
3893
4154
  *
@@ -3964,7 +4225,7 @@ declare interface IncomingRequestCfPropertiesGeographicInformation {
3964
4225
  metroCode?: string;
3965
4226
  }
3966
4227
  /** Data about the incoming request's TLS certificate */
3967
- declare interface IncomingRequestCfPropertiesTLSClientAuth {
4228
+ interface IncomingRequestCfPropertiesTLSClientAuth {
3968
4229
  /** Always `"1"`, indicating that the certificate was presented */
3969
4230
  certPresented: "1";
3970
4231
  /**
@@ -4057,7 +4318,7 @@ declare interface IncomingRequestCfPropertiesTLSClientAuth {
4057
4318
  certNotAfter: string;
4058
4319
  }
4059
4320
  /** Placeholder values for TLS Client Authorization */
4060
- declare interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
4321
+ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
4061
4322
  certPresented: "0";
4062
4323
  certVerified: "NONE";
4063
4324
  certRevoked: "0";
@@ -4355,10 +4616,10 @@ declare type Iso3166Alpha2Code =
4355
4616
  | "ZW";
4356
4617
  /** The 2-letter continent codes Cloudflare uses */
4357
4618
  declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
4358
- declare type CfProperties<HostMetadata = unknown> =
4619
+ type CfProperties<HostMetadata = unknown> =
4359
4620
  | IncomingRequestCfProperties<HostMetadata>
4360
4621
  | RequestInitCfProperties;
4361
- declare interface D1Meta {
4622
+ interface D1Meta {
4362
4623
  duration: number;
4363
4624
  size_after: number;
4364
4625
  rows_read: number;
@@ -4367,15 +4628,15 @@ declare interface D1Meta {
4367
4628
  changed_db: boolean;
4368
4629
  changes: number;
4369
4630
  }
4370
- declare interface D1Response {
4631
+ interface D1Response {
4371
4632
  success: true;
4372
4633
  meta: D1Meta & Record<string, unknown>;
4373
4634
  error?: never;
4374
4635
  }
4375
- declare type D1Result<T = unknown> = D1Response & {
4636
+ type D1Result<T = unknown> = D1Response & {
4376
4637
  results: T[];
4377
4638
  };
4378
- declare interface D1ExecResult {
4639
+ interface D1ExecResult {
4379
4640
  count: number;
4380
4641
  duration: number;
4381
4642
  }
@@ -4402,11 +4663,11 @@ declare abstract class D1PreparedStatement {
4402
4663
  // but this will ensure type checking on older versions still passes.
4403
4664
  // TypeScript's interface merging will ensure our empty interface is effectively
4404
4665
  // ignored when `Disposable` is included in the standard lib.
4405
- declare interface Disposable {}
4666
+ interface Disposable {}
4406
4667
  /**
4407
4668
  * An email message that can be sent from a Worker.
4408
4669
  */
4409
- declare interface EmailMessage {
4670
+ interface EmailMessage {
4410
4671
  /**
4411
4672
  * Envelope From attribute of the email message.
4412
4673
  */
@@ -4419,7 +4680,7 @@ declare interface EmailMessage {
4419
4680
  /**
4420
4681
  * An email message that is sent to a consumer Worker and can be rejected/forwarded.
4421
4682
  */
4422
- declare interface ForwardableEmailMessage extends EmailMessage {
4683
+ interface ForwardableEmailMessage extends EmailMessage {
4423
4684
  /**
4424
4685
  * Stream of the email message content.
4425
4686
  */
@@ -4449,7 +4710,7 @@ declare interface ForwardableEmailMessage extends EmailMessage {
4449
4710
  /**
4450
4711
  * A binding that allows a Worker to send email messages.
4451
4712
  */
4452
- declare interface SendEmail {
4713
+ interface SendEmail {
4453
4714
  send(message: EmailMessage): Promise<void>;
4454
4715
  }
4455
4716
  declare abstract class EmailEvent extends ExtendableEvent {
@@ -4467,7 +4728,7 @@ declare module "cloudflare:email" {
4467
4728
  };
4468
4729
  export { _EmailMessage as EmailMessage };
4469
4730
  }
4470
- declare interface Hyperdrive {
4731
+ interface Hyperdrive {
4471
4732
  /**
4472
4733
  * Connect directly to Hyperdrive as if it's your database, returning a TCP socket.
4473
4734
  *
@@ -4514,8 +4775,8 @@ declare interface Hyperdrive {
4514
4775
  */
4515
4776
  readonly database: string;
4516
4777
  }
4517
- declare type Params<P extends string = any> = Record<P, string | string[]>;
4518
- declare type EventContext<Env, P extends string, Data> = {
4778
+ type Params<P extends string = any> = Record<P, string | string[]>;
4779
+ type EventContext<Env, P extends string, Data> = {
4519
4780
  request: Request<unknown, IncomingRequestCfProperties<unknown>>;
4520
4781
  functionPath: string;
4521
4782
  waitUntil: (promise: Promise<any>) => void;
@@ -4529,12 +4790,12 @@ declare type EventContext<Env, P extends string, Data> = {
4529
4790
  params: Params<P>;
4530
4791
  data: Data;
4531
4792
  };
4532
- declare type PagesFunction<
4793
+ type PagesFunction<
4533
4794
  Env = unknown,
4534
4795
  Params extends string = any,
4535
4796
  Data extends Record<string, unknown> = Record<string, unknown>,
4536
4797
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
4537
- declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4798
+ type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4538
4799
  request: Request<unknown, IncomingRequestCfProperties<unknown>>;
4539
4800
  functionPath: string;
4540
4801
  waitUntil: (promise: Promise<any>) => void;
@@ -4549,7 +4810,7 @@ declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4549
4810
  data: Data;
4550
4811
  pluginArgs: PluginArgs;
4551
4812
  };
4552
- declare type PagesPluginFunction<
4813
+ type PagesPluginFunction<
4553
4814
  Env = unknown,
4554
4815
  Params extends string = any,
4555
4816
  Data extends Record<string, unknown> = Record<string, unknown>,
@@ -4564,7 +4825,7 @@ declare module "assets:*" {
4564
4825
  // The message includes metadata about the broker, the client, and the payload
4565
4826
  // itself.
4566
4827
  // https://developers.cloudflare.com/pub-sub/
4567
- declare interface PubSubMessage {
4828
+ interface PubSubMessage {
4568
4829
  // Message ID
4569
4830
  readonly mid: number;
4570
4831
  // MQTT broker FQDN in the form mqtts://BROKER.NAMESPACE.cloudflarepubsub.com:PORT
@@ -4590,10 +4851,24 @@ declare interface PubSubMessage {
4590
4851
  payload: string | Uint8Array;
4591
4852
  }
4592
4853
  // JsonWebKey extended by kid parameter
4593
- declare interface JsonWebKeyWithKid extends JsonWebKey {
4854
+ interface JsonWebKeyWithKid extends JsonWebKey {
4594
4855
  // Key Identifier of the JWK
4595
4856
  readonly kid: string;
4596
4857
  }
4858
+ interface RateLimitOptions {
4859
+ key: string;
4860
+ }
4861
+ interface RateLimitOutcome {
4862
+ success: boolean;
4863
+ }
4864
+ interface RateLimit {
4865
+ /**
4866
+ * Rate limit a request based on the provided options.
4867
+ * @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
4868
+ * @returns A promise that resolves with the outcome of the rate limit.
4869
+ */
4870
+ limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
4871
+ }
4597
4872
  // Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
4598
4873
  // to referenced by `Fetcher`. This is included in the "importable" version of the types which
4599
4874
  // strips all `module` blocks.
@@ -4801,19 +5076,15 @@ declare module "cloudflare:sockets" {
4801
5076
  /**
4802
5077
  * Data types supported for holding vector metadata.
4803
5078
  */
4804
- declare type VectorizeVectorMetadataValue =
4805
- | string
4806
- | number
4807
- | boolean
4808
- | string[];
5079
+ type VectorizeVectorMetadataValue = string | number | boolean | string[];
4809
5080
  /**
4810
5081
  * Additional information to associate with a vector.
4811
5082
  */
4812
- declare type VectorizeVectorMetadata =
5083
+ type VectorizeVectorMetadata =
4813
5084
  | VectorizeVectorMetadataValue
4814
5085
  | Record<string, VectorizeVectorMetadataValue>;
4815
- declare type VectorFloatArray = Float32Array | Float64Array;
4816
- declare interface VectorizeError {
5086
+ type VectorFloatArray = Float32Array | Float64Array;
5087
+ interface VectorizeError {
4817
5088
  code?: number;
4818
5089
  error: string;
4819
5090
  }
@@ -4822,11 +5093,11 @@ declare interface VectorizeError {
4822
5093
  *
4823
5094
  * This list is expected to grow as support for more operations are released.
4824
5095
  */
4825
- declare type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
5096
+ type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
4826
5097
  /**
4827
5098
  * Filter criteria for vector metadata used to limit the retrieved query result set.
4828
5099
  */
4829
- declare type VectorizeVectorMetadataFilter = {
5100
+ type VectorizeVectorMetadataFilter = {
4830
5101
  [field: string]:
4831
5102
  | Exclude<VectorizeVectorMetadataValue, string[]>
4832
5103
  | null
@@ -4841,8 +5112,8 @@ declare type VectorizeVectorMetadataFilter = {
4841
5112
  * Supported distance metrics for an index.
4842
5113
  * Distance metrics determine how other "similar" vectors are determined.
4843
5114
  */
4844
- declare type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
4845
- declare interface VectorizeQueryOptions {
5115
+ type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
5116
+ interface VectorizeQueryOptions {
4846
5117
  topK?: number;
4847
5118
  namespace?: string;
4848
5119
  returnValues?: boolean;
@@ -4852,7 +5123,7 @@ declare interface VectorizeQueryOptions {
4852
5123
  /**
4853
5124
  * Information about the configuration of an index.
4854
5125
  */
4855
- declare type VectorizeIndexConfig =
5126
+ type VectorizeIndexConfig =
4856
5127
  | {
4857
5128
  dimensions: number;
4858
5129
  metric: VectorizeDistanceMetric;
@@ -4863,7 +5134,7 @@ declare type VectorizeIndexConfig =
4863
5134
  /**
4864
5135
  * Metadata about an existing index.
4865
5136
  */
4866
- declare interface VectorizeIndexDetails {
5137
+ interface VectorizeIndexDetails {
4867
5138
  /** The unique ID of the index */
4868
5139
  readonly id: string;
4869
5140
  /** The name of the index. */
@@ -4878,7 +5149,7 @@ declare interface VectorizeIndexDetails {
4878
5149
  /**
4879
5150
  * Represents a single vector value set along with its associated metadata.
4880
5151
  */
4881
- declare interface VectorizeVector {
5152
+ interface VectorizeVector {
4882
5153
  /** 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. */
4883
5154
  id: string;
4884
5155
  /** The vector values */
@@ -4891,7 +5162,7 @@ declare interface VectorizeVector {
4891
5162
  /**
4892
5163
  * Represents a matched vector for a query along with its score and (if specified) the matching vector information.
4893
5164
  */
4894
- declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
5165
+ type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
4895
5166
  Omit<VectorizeVector, "values"> & {
4896
5167
  /** The score or rank for similarity, when returned as a result */
4897
5168
  score: number;
@@ -4899,7 +5170,7 @@ declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
4899
5170
  /**
4900
5171
  * A set of vector {@link VectorizeMatch} for a particular query.
4901
5172
  */
4902
- declare interface VectorizeMatches {
5173
+ interface VectorizeMatches {
4903
5174
  matches: VectorizeMatch[];
4904
5175
  count: number;
4905
5176
  }
@@ -4907,7 +5178,7 @@ declare interface VectorizeMatches {
4907
5178
  * Results of an operation that performed a mutation on a set of vectors.
4908
5179
  * Here, `ids` is a list of vectors that were successfully processed.
4909
5180
  */
4910
- declare interface VectorizeVectorMutation {
5181
+ interface VectorizeVectorMutation {
4911
5182
  /* List of ids of vectors that were successfully processed. */
4912
5183
  ids: string[];
4913
5184
  /* Total count of the number of processed vectors. */
@@ -4918,7 +5189,7 @@ declare interface VectorizeVectorMutation {
4918
5189
  * with the v2 version of Vectorize.
4919
5190
  * Here, `mutationId` is the identifier for the last mutation processed by Vectorize.
4920
5191
  */
4921
- declare interface VectorizeVectorMutationV2 {
5192
+ interface VectorizeVectorMutationV2 {
4922
5193
  /* The identifier for the last mutation processed by Vectorize. */
4923
5194
  mutationId: string;
4924
5195
  }
@@ -4967,7 +5238,7 @@ declare abstract class VectorizeIndex {
4967
5238
  * The interface for "version_metadata" binding
4968
5239
  * providing metadata about the Worker Version using this binding.
4969
5240
  */
4970
- declare type WorkerVersionMetadata = {
5241
+ type WorkerVersionMetadata = {
4971
5242
  /** The ID of the Worker Version using this binding */
4972
5243
  id: string;
4973
5244
  /** The tag of the Worker Version using this binding */
@@ -4975,7 +5246,7 @@ declare type WorkerVersionMetadata = {
4975
5246
  /** The timestamp of when the Worker Version was uploaded */
4976
5247
  timestamp: string;
4977
5248
  };
4978
- declare interface DynamicDispatchLimits {
5249
+ interface DynamicDispatchLimits {
4979
5250
  /**
4980
5251
  * Limit CPU time in milliseconds.
4981
5252
  */
@@ -4985,7 +5256,7 @@ declare interface DynamicDispatchLimits {
4985
5256
  */
4986
5257
  subRequests?: number;
4987
5258
  }
4988
- declare interface DynamicDispatchOptions {
5259
+ interface DynamicDispatchOptions {
4989
5260
  /**
4990
5261
  * Limit resources of invoked Worker script.
4991
5262
  */
@@ -4997,7 +5268,7 @@ declare interface DynamicDispatchOptions {
4997
5268
  [key: string]: any;
4998
5269
  };
4999
5270
  }
5000
- declare interface DispatchNamespace {
5271
+ interface DispatchNamespace {
5001
5272
  /**
5002
5273
  * @param name Name of the Worker script.
5003
5274
  * @param args Arguments to Worker script.