@cloudflare/workers-types 4.20240620.0 → 4.20240712.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,7 +54,7 @@ declare class DOMException extends Error {
54
54
  get stack(): any;
55
55
  set stack(value: any);
56
56
  }
57
- declare type WorkerGlobalScopeEventMap = {
57
+ type WorkerGlobalScopeEventMap = {
58
58
  fetch: FetchEvent;
59
59
  scheduled: ScheduledEvent;
60
60
  queue: QueueEvent;
@@ -65,7 +65,7 @@ declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEv
65
65
  EventTarget: typeof EventTarget;
66
66
  }
67
67
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
68
- declare interface Console {
68
+ interface Console {
69
69
  "assert"(condition?: boolean, ...data: any[]): void;
70
70
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
71
71
  clear(): void;
@@ -106,8 +106,8 @@ declare interface Console {
106
106
  warn(...data: any[]): void;
107
107
  }
108
108
  declare const console: Console;
109
- declare type BufferSource = ArrayBufferView | ArrayBuffer;
110
- declare type TypedArray =
109
+ type BufferSource = ArrayBufferView | ArrayBuffer;
110
+ type TypedArray =
111
111
  | Int8Array
112
112
  | Uint8Array
113
113
  | Uint8ClampedArray
@@ -198,7 +198,7 @@ declare namespace WebAssembly {
198
198
  *
199
199
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
200
200
  */
201
- declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
201
+ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
202
202
  DOMException: typeof DOMException;
203
203
  WorkerGlobalScope: typeof WorkerGlobalScope;
204
204
  btoa(data: string): string;
@@ -249,6 +249,7 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
249
249
  ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
250
250
  CountQueuingStrategy: typeof CountQueuingStrategy;
251
251
  ErrorEvent: typeof ErrorEvent;
252
+ EventSource: typeof EventSource;
252
253
  CompressionStream: typeof CompressionStream;
253
254
  DecompressionStream: typeof DecompressionStream;
254
255
  TextEncoderStream: typeof TextEncoderStream;
@@ -278,16 +279,16 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
278
279
  FixedLengthStream: typeof FixedLengthStream;
279
280
  IdentityTransformStream: typeof IdentityTransformStream;
280
281
  HTMLRewriter: typeof HTMLRewriter;
281
- GPUAdapter: typeof gpuGPUAdapter;
282
- GPUOutOfMemoryError: typeof gpuGPUOutOfMemoryError;
283
- GPUValidationError: typeof gpuGPUValidationError;
284
- GPUInternalError: typeof gpuGPUInternalError;
285
- GPUDeviceLostInfo: typeof gpuGPUDeviceLostInfo;
286
- GPUBufferUsage: typeof gpuGPUBufferUsage;
287
- GPUShaderStage: typeof gpuGPUShaderStage;
288
- GPUMapMode: typeof gpuGPUMapMode;
289
- GPUTextureUsage: typeof gpuGPUTextureUsage;
290
- GPUColorWrite: typeof gpuGPUColorWrite;
282
+ GPUAdapter: typeof GPUAdapter;
283
+ GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
284
+ GPUValidationError: typeof GPUValidationError;
285
+ GPUInternalError: typeof GPUInternalError;
286
+ GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
287
+ GPUBufferUsage: typeof GPUBufferUsage;
288
+ GPUShaderStage: typeof GPUShaderStage;
289
+ GPUMapMode: typeof GPUMapMode;
290
+ GPUTextureUsage: typeof GPUTextureUsage;
291
+ GPUColorWrite: typeof GPUColorWrite;
291
292
  }
292
293
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
293
294
  type: Type,
@@ -359,45 +360,42 @@ declare const caches: CacheStorage;
359
360
  declare const scheduler: Scheduler;
360
361
  declare const performance: Performance;
361
362
  declare const origin: string;
362
- declare interface TestController {}
363
- declare interface ExecutionContext {
363
+ interface TestController {}
364
+ interface ExecutionContext {
364
365
  waitUntil(promise: Promise<any>): void;
365
366
  passThroughOnException(): void;
366
367
  }
367
- declare type ExportedHandlerFetchHandler<
368
- Env = unknown,
369
- CfHostMetadata = unknown,
370
- > = (
368
+ type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (
371
369
  request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>,
372
370
  env: Env,
373
371
  ctx: ExecutionContext,
374
372
  ) => Response | Promise<Response>;
375
- declare type ExportedHandlerTailHandler<Env = unknown> = (
373
+ type ExportedHandlerTailHandler<Env = unknown> = (
376
374
  events: TraceItem[],
377
375
  env: Env,
378
376
  ctx: ExecutionContext,
379
377
  ) => void | Promise<void>;
380
- declare type ExportedHandlerTraceHandler<Env = unknown> = (
378
+ type ExportedHandlerTraceHandler<Env = unknown> = (
381
379
  traces: TraceItem[],
382
380
  env: Env,
383
381
  ctx: ExecutionContext,
384
382
  ) => void | Promise<void>;
385
- declare type ExportedHandlerScheduledHandler<Env = unknown> = (
383
+ type ExportedHandlerScheduledHandler<Env = unknown> = (
386
384
  controller: ScheduledController,
387
385
  env: Env,
388
386
  ctx: ExecutionContext,
389
387
  ) => void | Promise<void>;
390
- declare type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (
388
+ type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (
391
389
  batch: MessageBatch<Message>,
392
390
  env: Env,
393
391
  ctx: ExecutionContext,
394
392
  ) => void | Promise<void>;
395
- declare type ExportedHandlerTestHandler<Env = unknown> = (
393
+ type ExportedHandlerTestHandler<Env = unknown> = (
396
394
  controller: TestController,
397
395
  env: Env,
398
396
  ctx: ExecutionContext,
399
397
  ) => void | Promise<void>;
400
- declare interface ExportedHandler<
398
+ interface ExportedHandler<
401
399
  Env = unknown,
402
400
  QueueHandlerMessage = unknown,
403
401
  CfHostMetadata = unknown,
@@ -410,7 +408,7 @@ declare interface ExportedHandler<
410
408
  email?: EmailExportedHandler<Env>;
411
409
  queue?: ExportedHandlerQueueHandler<Env, QueueHandlerMessage>;
412
410
  }
413
- declare interface StructuredSerializeOptions {
411
+ interface StructuredSerializeOptions {
414
412
  transfer?: any[];
415
413
  }
416
414
  declare abstract class PromiseRejectionEvent extends Event {
@@ -424,17 +422,17 @@ declare abstract class PromiseRejectionEvent extends Event {
424
422
  *
425
423
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance)
426
424
  */
427
- declare interface Performance {
425
+ interface Performance {
428
426
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin) */
429
427
  readonly timeOrigin: number;
430
428
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/now) */
431
429
  now(): number;
432
430
  }
433
- declare interface AlarmInvocationInfo {
431
+ interface AlarmInvocationInfo {
434
432
  readonly isRetry: boolean;
435
433
  readonly retryCount: number;
436
434
  }
437
- declare interface DurableObject {
435
+ interface DurableObject {
438
436
  fetch(request: Request): Response | Promise<Response>;
439
437
  alarm?(): void | Promise<void>;
440
438
  webSocketMessage?(
@@ -449,7 +447,7 @@ declare interface DurableObject {
449
447
  ): void | Promise<void>;
450
448
  webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
451
449
  }
452
- declare type DurableObjectStub<
450
+ type DurableObjectStub<
453
451
  T extends Rpc.DurableObjectBranded | undefined = undefined,
454
452
  > = Fetcher<
455
453
  T,
@@ -458,12 +456,12 @@ declare type DurableObjectStub<
458
456
  readonly id: DurableObjectId;
459
457
  readonly name?: string;
460
458
  };
461
- declare interface DurableObjectId {
459
+ interface DurableObjectId {
462
460
  toString(): string;
463
461
  equals(other: DurableObjectId): boolean;
464
462
  readonly name?: string;
465
463
  }
466
- declare interface DurableObjectNamespace<
464
+ interface DurableObjectNamespace<
467
465
  T extends Rpc.DurableObjectBranded | undefined = undefined,
468
466
  > {
469
467
  newUniqueId(
@@ -479,11 +477,11 @@ declare interface DurableObjectNamespace<
479
477
  jurisdiction: DurableObjectJurisdiction,
480
478
  ): DurableObjectNamespace<T>;
481
479
  }
482
- declare type DurableObjectJurisdiction = "eu" | "fedramp";
483
- declare interface DurableObjectNamespaceNewUniqueIdOptions {
480
+ type DurableObjectJurisdiction = "eu" | "fedramp";
481
+ interface DurableObjectNamespaceNewUniqueIdOptions {
484
482
  jurisdiction?: DurableObjectJurisdiction;
485
483
  }
486
- declare type DurableObjectLocationHint =
484
+ type DurableObjectLocationHint =
487
485
  | "wnam"
488
486
  | "enam"
489
487
  | "sam"
@@ -493,10 +491,10 @@ declare type DurableObjectLocationHint =
493
491
  | "oc"
494
492
  | "afr"
495
493
  | "me";
496
- declare interface DurableObjectNamespaceGetDurableObjectOptions {
494
+ interface DurableObjectNamespaceGetDurableObjectOptions {
497
495
  locationHint?: DurableObjectLocationHint;
498
496
  }
499
- declare interface DurableObjectState {
497
+ interface DurableObjectState {
500
498
  waitUntil(promise: Promise<any>): void;
501
499
  readonly id: DurableObjectId;
502
500
  readonly storage: DurableObjectStorage;
@@ -510,7 +508,7 @@ declare interface DurableObjectState {
510
508
  getHibernatableWebSocketEventTimeout(): number | null;
511
509
  getTags(ws: WebSocket): string[];
512
510
  }
513
- declare interface DurableObjectTransaction {
511
+ interface DurableObjectTransaction {
514
512
  get<T = unknown>(
515
513
  key: string,
516
514
  options?: DurableObjectGetOptions,
@@ -541,7 +539,7 @@ declare interface DurableObjectTransaction {
541
539
  ): Promise<void>;
542
540
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
543
541
  }
544
- declare interface DurableObjectStorage {
542
+ interface DurableObjectStorage {
545
543
  get<T = unknown>(
546
544
  key: string,
547
545
  options?: DurableObjectGetOptions,
@@ -577,7 +575,7 @@ declare interface DurableObjectStorage {
577
575
  sync(): Promise<void>;
578
576
  transactionSync<T>(closure: () => T): T;
579
577
  }
580
- declare interface DurableObjectListOptions {
578
+ interface DurableObjectListOptions {
581
579
  start?: string;
582
580
  startAfter?: string;
583
581
  end?: string;
@@ -587,19 +585,19 @@ declare interface DurableObjectListOptions {
587
585
  allowConcurrency?: boolean;
588
586
  noCache?: boolean;
589
587
  }
590
- declare interface DurableObjectGetOptions {
588
+ interface DurableObjectGetOptions {
591
589
  allowConcurrency?: boolean;
592
590
  noCache?: boolean;
593
591
  }
594
- declare interface DurableObjectGetAlarmOptions {
592
+ interface DurableObjectGetAlarmOptions {
595
593
  allowConcurrency?: boolean;
596
594
  }
597
- declare interface DurableObjectPutOptions {
595
+ interface DurableObjectPutOptions {
598
596
  allowConcurrency?: boolean;
599
597
  allowUnconfirmed?: boolean;
600
598
  noCache?: boolean;
601
599
  }
602
- declare interface DurableObjectSetAlarmOptions {
600
+ interface DurableObjectSetAlarmOptions {
603
601
  allowConcurrency?: boolean;
604
602
  allowUnconfirmed?: boolean;
605
603
  }
@@ -608,10 +606,10 @@ declare class WebSocketRequestResponsePair {
608
606
  get request(): string;
609
607
  get response(): string;
610
608
  }
611
- declare interface AnalyticsEngineDataset {
609
+ interface AnalyticsEngineDataset {
612
610
  writeDataPoint(event?: AnalyticsEngineDataPoint): void;
613
611
  }
614
- declare interface AnalyticsEngineDataPoint {
612
+ interface AnalyticsEngineDataPoint {
615
613
  indexes?: ((ArrayBuffer | string) | null)[];
616
614
  doubles?: number[];
617
615
  blobs?: ((ArrayBuffer | string) | null)[];
@@ -719,20 +717,20 @@ declare class Event {
719
717
  static readonly AT_TARGET: number;
720
718
  static readonly BUBBLING_PHASE: number;
721
719
  }
722
- declare interface EventInit {
720
+ interface EventInit {
723
721
  bubbles?: boolean;
724
722
  cancelable?: boolean;
725
723
  composed?: boolean;
726
724
  }
727
- declare type EventListener<EventType extends Event = Event> = (
725
+ type EventListener<EventType extends Event = Event> = (
728
726
  event: EventType,
729
727
  ) => void;
730
- declare interface EventListenerObject<EventType extends Event = Event> {
728
+ interface EventListenerObject<EventType extends Event = Event> {
731
729
  handleEvent(event: EventType): void;
732
730
  }
733
- declare type EventListenerOrEventListenerObject<
734
- EventType extends Event = Event,
735
- > = EventListener<EventType> | EventListenerObject<EventType>;
731
+ type EventListenerOrEventListenerObject<EventType extends Event = Event> =
732
+ | EventListener<EventType>
733
+ | EventListenerObject<EventType>;
736
734
  declare class EventTarget<
737
735
  EventMap extends Record<string, Event> = Record<string, Event>,
738
736
  > {
@@ -776,16 +774,16 @@ declare class EventTarget<
776
774
  */
777
775
  dispatchEvent(event: EventMap[keyof EventMap]): boolean;
778
776
  }
779
- declare interface EventTargetEventListenerOptions {
777
+ interface EventTargetEventListenerOptions {
780
778
  capture?: boolean;
781
779
  }
782
- declare interface EventTargetAddEventListenerOptions {
780
+ interface EventTargetAddEventListenerOptions {
783
781
  capture?: boolean;
784
782
  passive?: boolean;
785
783
  once?: boolean;
786
784
  signal?: AbortSignal;
787
785
  }
788
- declare interface EventTargetHandlerObject {
786
+ interface EventTargetHandlerObject {
789
787
  handleEvent: (event: Event) => any | undefined;
790
788
  }
791
789
  declare class AbortController {
@@ -824,10 +822,10 @@ declare abstract class AbortSignal extends EventTarget {
824
822
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
825
823
  throwIfAborted(): void;
826
824
  }
827
- declare interface Scheduler {
825
+ interface Scheduler {
828
826
  wait(delay: number, maybeOptions?: SchedulerWaitOptions): Promise<void>;
829
827
  }
830
- declare interface SchedulerWaitOptions {
828
+ interface SchedulerWaitOptions {
831
829
  signal?: AbortSignal;
832
830
  }
833
831
  declare abstract class ExtendableEvent extends Event {
@@ -843,7 +841,7 @@ declare class CustomEvent<T = any> extends Event {
843
841
  */
844
842
  get detail(): T;
845
843
  }
846
- declare interface CustomEventCustomEventInit {
844
+ interface CustomEventCustomEventInit {
847
845
  bubbles?: boolean;
848
846
  cancelable?: boolean;
849
847
  composed?: boolean;
@@ -868,7 +866,7 @@ declare class Blob {
868
866
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
869
867
  stream(): ReadableStream;
870
868
  }
871
- declare interface BlobOptions {
869
+ interface BlobOptions {
872
870
  type?: string;
873
871
  }
874
872
  declare class File extends Blob {
@@ -882,7 +880,7 @@ declare class File extends Blob {
882
880
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
883
881
  readonly lastModified: number;
884
882
  }
885
- declare interface FileOptions {
883
+ interface FileOptions {
886
884
  type?: string;
887
885
  lastModified?: number;
888
886
  }
@@ -899,7 +897,7 @@ declare abstract class Cache {
899
897
  ): Promise<Response | undefined>;
900
898
  put(request: RequestInfo, response: Response): Promise<void>;
901
899
  }
902
- declare interface CacheQueryOptions {
900
+ interface CacheQueryOptions {
903
901
  ignoreMethod?: boolean;
904
902
  }
905
903
  declare abstract class Crypto {
@@ -1020,11 +1018,11 @@ declare abstract class CryptoKey {
1020
1018
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
1021
1019
  readonly usages: string[];
1022
1020
  }
1023
- declare interface CryptoKeyPair {
1021
+ interface CryptoKeyPair {
1024
1022
  publicKey: CryptoKey;
1025
1023
  privateKey: CryptoKey;
1026
1024
  }
1027
- declare interface JsonWebKey {
1025
+ interface JsonWebKey {
1028
1026
  kty: string;
1029
1027
  use?: string;
1030
1028
  key_ops?: string[];
@@ -1044,12 +1042,12 @@ declare interface JsonWebKey {
1044
1042
  oth?: RsaOtherPrimesInfo[];
1045
1043
  k?: string;
1046
1044
  }
1047
- declare interface RsaOtherPrimesInfo {
1045
+ interface RsaOtherPrimesInfo {
1048
1046
  r?: string;
1049
1047
  d?: string;
1050
1048
  t?: string;
1051
1049
  }
1052
- declare interface SubtleCryptoDeriveKeyAlgorithm {
1050
+ interface SubtleCryptoDeriveKeyAlgorithm {
1053
1051
  name: string;
1054
1052
  salt?: ArrayBuffer;
1055
1053
  iterations?: number;
@@ -1057,7 +1055,7 @@ declare interface SubtleCryptoDeriveKeyAlgorithm {
1057
1055
  $public?: CryptoKey;
1058
1056
  info?: ArrayBuffer;
1059
1057
  }
1060
- declare interface SubtleCryptoEncryptAlgorithm {
1058
+ interface SubtleCryptoEncryptAlgorithm {
1061
1059
  name: string;
1062
1060
  iv?: ArrayBuffer;
1063
1061
  additionalData?: ArrayBuffer;
@@ -1066,7 +1064,7 @@ declare interface SubtleCryptoEncryptAlgorithm {
1066
1064
  length?: number;
1067
1065
  label?: ArrayBuffer;
1068
1066
  }
1069
- declare interface SubtleCryptoGenerateKeyAlgorithm {
1067
+ interface SubtleCryptoGenerateKeyAlgorithm {
1070
1068
  name: string;
1071
1069
  hash?: string | SubtleCryptoHashAlgorithm;
1072
1070
  modulusLength?: number;
@@ -1074,45 +1072,45 @@ declare interface SubtleCryptoGenerateKeyAlgorithm {
1074
1072
  length?: number;
1075
1073
  namedCurve?: string;
1076
1074
  }
1077
- declare interface SubtleCryptoHashAlgorithm {
1075
+ interface SubtleCryptoHashAlgorithm {
1078
1076
  name: string;
1079
1077
  }
1080
- declare interface SubtleCryptoImportKeyAlgorithm {
1078
+ interface SubtleCryptoImportKeyAlgorithm {
1081
1079
  name: string;
1082
1080
  hash?: string | SubtleCryptoHashAlgorithm;
1083
1081
  length?: number;
1084
1082
  namedCurve?: string;
1085
1083
  compressed?: boolean;
1086
1084
  }
1087
- declare interface SubtleCryptoSignAlgorithm {
1085
+ interface SubtleCryptoSignAlgorithm {
1088
1086
  name: string;
1089
1087
  hash?: string | SubtleCryptoHashAlgorithm;
1090
1088
  dataLength?: number;
1091
1089
  saltLength?: number;
1092
1090
  }
1093
- declare interface CryptoKeyKeyAlgorithm {
1091
+ interface CryptoKeyKeyAlgorithm {
1094
1092
  name: string;
1095
1093
  }
1096
- declare interface CryptoKeyAesKeyAlgorithm {
1094
+ interface CryptoKeyAesKeyAlgorithm {
1097
1095
  name: string;
1098
1096
  length: number;
1099
1097
  }
1100
- declare interface CryptoKeyHmacKeyAlgorithm {
1098
+ interface CryptoKeyHmacKeyAlgorithm {
1101
1099
  name: string;
1102
1100
  hash: CryptoKeyKeyAlgorithm;
1103
1101
  length: number;
1104
1102
  }
1105
- declare interface CryptoKeyRsaKeyAlgorithm {
1103
+ interface CryptoKeyRsaKeyAlgorithm {
1106
1104
  name: string;
1107
1105
  modulusLength: number;
1108
1106
  publicExponent: ArrayBuffer | (ArrayBuffer | ArrayBufferView);
1109
1107
  hash?: CryptoKeyKeyAlgorithm;
1110
1108
  }
1111
- declare interface CryptoKeyEllipticKeyAlgorithm {
1109
+ interface CryptoKeyEllipticKeyAlgorithm {
1112
1110
  name: string;
1113
1111
  namedCurve: string;
1114
1112
  }
1115
- declare interface CryptoKeyArbitraryKeyAlgorithm {
1113
+ interface CryptoKeyArbitraryKeyAlgorithm {
1116
1114
  name: string;
1117
1115
  hash?: CryptoKeyKeyAlgorithm;
1118
1116
  namedCurve?: string;
@@ -1169,14 +1167,14 @@ declare class TextEncoder {
1169
1167
  ): TextEncoderEncodeIntoResult;
1170
1168
  readonly encoding: string;
1171
1169
  }
1172
- declare interface TextDecoderConstructorOptions {
1170
+ interface TextDecoderConstructorOptions {
1173
1171
  fatal: boolean;
1174
1172
  ignoreBOM: boolean;
1175
1173
  }
1176
- declare interface TextDecoderDecodeOptions {
1174
+ interface TextDecoderDecodeOptions {
1177
1175
  stream: boolean;
1178
1176
  }
1179
- declare interface TextEncoderEncodeIntoResult {
1177
+ interface TextEncoderEncodeIntoResult {
1180
1178
  read: number;
1181
1179
  written: number;
1182
1180
  }
@@ -1193,7 +1191,7 @@ declare class ErrorEvent extends Event {
1193
1191
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
1194
1192
  get error(): any;
1195
1193
  }
1196
- declare interface ErrorEventErrorEventInit {
1194
+ interface ErrorEventErrorEventInit {
1197
1195
  message?: string;
1198
1196
  filename?: string;
1199
1197
  lineno?: number;
@@ -1227,7 +1225,7 @@ declare class FormData {
1227
1225
  ): void;
1228
1226
  [Symbol.iterator](): IterableIterator<[key: string, value: File | string]>;
1229
1227
  }
1230
- declare interface ContentOptions {
1228
+ interface ContentOptions {
1231
1229
  html?: boolean;
1232
1230
  }
1233
1231
  declare class HTMLRewriter {
@@ -1239,23 +1237,23 @@ declare class HTMLRewriter {
1239
1237
  onDocument(handlers: HTMLRewriterDocumentContentHandlers): HTMLRewriter;
1240
1238
  transform(response: Response): Response;
1241
1239
  }
1242
- declare interface HTMLRewriterElementContentHandlers {
1240
+ interface HTMLRewriterElementContentHandlers {
1243
1241
  element?(element: Element): void | Promise<void>;
1244
1242
  comments?(comment: Comment): void | Promise<void>;
1245
1243
  text?(element: Text): void | Promise<void>;
1246
1244
  }
1247
- declare interface HTMLRewriterDocumentContentHandlers {
1245
+ interface HTMLRewriterDocumentContentHandlers {
1248
1246
  doctype?(doctype: Doctype): void | Promise<void>;
1249
1247
  comments?(comment: Comment): void | Promise<void>;
1250
1248
  text?(text: Text): void | Promise<void>;
1251
1249
  end?(end: DocumentEnd): void | Promise<void>;
1252
1250
  }
1253
- declare interface Doctype {
1251
+ interface Doctype {
1254
1252
  readonly name: string | null;
1255
1253
  readonly publicId: string | null;
1256
1254
  readonly systemId: string | null;
1257
1255
  }
1258
- declare interface Element {
1256
+ interface Element {
1259
1257
  tagName: string;
1260
1258
  readonly attributes: IterableIterator<string[]>;
1261
1259
  readonly removed: boolean;
@@ -1274,13 +1272,13 @@ declare interface Element {
1274
1272
  setInnerContent(content: string, options?: ContentOptions): Element;
1275
1273
  onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
1276
1274
  }
1277
- declare interface EndTag {
1275
+ interface EndTag {
1278
1276
  name: string;
1279
1277
  before(content: string, options?: ContentOptions): EndTag;
1280
1278
  after(content: string, options?: ContentOptions): EndTag;
1281
1279
  remove(): EndTag;
1282
1280
  }
1283
- declare interface Comment {
1281
+ interface Comment {
1284
1282
  text: string;
1285
1283
  readonly removed: boolean;
1286
1284
  before(content: string, options?: ContentOptions): Comment;
@@ -1288,7 +1286,7 @@ declare interface Comment {
1288
1286
  replace(content: string, options?: ContentOptions): Comment;
1289
1287
  remove(): Comment;
1290
1288
  }
1291
- declare interface Text {
1289
+ interface Text {
1292
1290
  readonly text: string;
1293
1291
  readonly lastInTextNode: boolean;
1294
1292
  readonly removed: boolean;
@@ -1297,7 +1295,7 @@ declare interface Text {
1297
1295
  replace(content: string, options?: ContentOptions): Text;
1298
1296
  remove(): Text;
1299
1297
  }
1300
- declare interface DocumentEnd {
1298
+ interface DocumentEnd {
1301
1299
  append(content: string, options?: ContentOptions): DocumentEnd;
1302
1300
  }
1303
1301
  declare abstract class FetchEvent extends ExtendableEvent {
@@ -1307,7 +1305,7 @@ declare abstract class FetchEvent extends ExtendableEvent {
1307
1305
  respondWith(promise: Response | Promise<Response>): void;
1308
1306
  passThroughOnException(): void;
1309
1307
  }
1310
- declare type HeadersInit =
1308
+ type HeadersInit =
1311
1309
  | Headers
1312
1310
  | Iterable<Iterable<string>>
1313
1311
  | Record<string, string>;
@@ -1331,7 +1329,7 @@ declare class Headers {
1331
1329
  values(): IterableIterator<string>;
1332
1330
  [Symbol.iterator](): IterableIterator<[key: string, value: string]>;
1333
1331
  }
1334
- declare type BodyInit =
1332
+ type BodyInit =
1335
1333
  | ReadableStream<Uint8Array>
1336
1334
  | string
1337
1335
  | ArrayBuffer
@@ -1372,7 +1370,7 @@ declare class Response extends Body {
1372
1370
  readonly webSocket: WebSocket | null;
1373
1371
  readonly cf?: any;
1374
1372
  }
1375
- declare interface ResponseInit {
1373
+ interface ResponseInit {
1376
1374
  status?: number;
1377
1375
  statusText?: string;
1378
1376
  headers?: HeadersInit;
@@ -1380,10 +1378,10 @@ declare interface ResponseInit {
1380
1378
  webSocket?: WebSocket | null;
1381
1379
  encodeBody?: "automatic" | "manual";
1382
1380
  }
1383
- declare type RequestInfo<
1384
- CfHostMetadata = unknown,
1385
- Cf = CfProperties<CfHostMetadata>,
1386
- > = Request<CfHostMetadata, Cf> | string | URL;
1381
+ type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
1382
+ | Request<CfHostMetadata, Cf>
1383
+ | string
1384
+ | URL;
1387
1385
  declare class Request<
1388
1386
  CfHostMetadata = unknown,
1389
1387
  Cf = CfProperties<CfHostMetadata>,
@@ -1436,7 +1434,7 @@ declare class Request<
1436
1434
  */
1437
1435
  readonly keepalive: boolean;
1438
1436
  }
1439
- declare interface RequestInit<Cf = CfProperties> {
1437
+ interface RequestInit<Cf = CfProperties> {
1440
1438
  /** A string to set request's method. */
1441
1439
  method?: string;
1442
1440
  /** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
@@ -1452,10 +1450,9 @@ declare interface RequestInit<Cf = CfProperties> {
1452
1450
  /** An AbortSignal to set request's signal. */
1453
1451
  signal?: AbortSignal | null;
1454
1452
  }
1455
- declare type Service<
1456
- T extends Rpc.WorkerEntrypointBranded | undefined = undefined,
1457
- > = Fetcher<T>;
1458
- declare type Fetcher<
1453
+ type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
1454
+ Fetcher<T>;
1455
+ type Fetcher<
1459
1456
  T extends Rpc.EntrypointBranded | undefined = undefined,
1460
1457
  Reserved extends string = never,
1461
1458
  > = (T extends Rpc.EntrypointBranded
@@ -1464,16 +1461,16 @@ declare type Fetcher<
1464
1461
  fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
1465
1462
  connect(address: SocketAddress | string, options?: SocketOptions): Socket;
1466
1463
  };
1467
- declare interface FetcherPutOptions {
1464
+ interface FetcherPutOptions {
1468
1465
  expiration?: number;
1469
1466
  expirationTtl?: number;
1470
1467
  }
1471
- declare interface KVNamespaceListKey<Metadata, Key extends string = string> {
1468
+ interface KVNamespaceListKey<Metadata, Key extends string = string> {
1472
1469
  name: Key;
1473
1470
  expiration?: number;
1474
1471
  metadata?: Metadata;
1475
1472
  }
1476
- declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1473
+ type KVNamespaceListResult<Metadata, Key extends string = string> =
1477
1474
  | {
1478
1475
  list_complete: false;
1479
1476
  keys: KVNamespaceListKey<Metadata, Key>[];
@@ -1485,7 +1482,7 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1485
1482
  keys: KVNamespaceListKey<Metadata, Key>[];
1486
1483
  cacheStatus: string | null;
1487
1484
  };
1488
- declare interface KVNamespace<Key extends string = string> {
1485
+ interface KVNamespace<Key extends string = string> {
1489
1486
  get(
1490
1487
  key: Key,
1491
1488
  options?: Partial<KVNamespaceGetOptions<undefined>>,
@@ -1559,49 +1556,49 @@ declare interface KVNamespace<Key extends string = string> {
1559
1556
  ): Promise<KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>>;
1560
1557
  delete(key: Key): Promise<void>;
1561
1558
  }
1562
- declare interface KVNamespaceListOptions {
1559
+ interface KVNamespaceListOptions {
1563
1560
  limit?: number;
1564
1561
  prefix?: string | null;
1565
1562
  cursor?: string | null;
1566
1563
  }
1567
- declare interface KVNamespaceGetOptions<Type> {
1564
+ interface KVNamespaceGetOptions<Type> {
1568
1565
  type: Type;
1569
1566
  cacheTtl?: number;
1570
1567
  }
1571
- declare interface KVNamespacePutOptions {
1568
+ interface KVNamespacePutOptions {
1572
1569
  expiration?: number;
1573
1570
  expirationTtl?: number;
1574
1571
  metadata?: any | null;
1575
1572
  }
1576
- declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1573
+ interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1577
1574
  value: Value | null;
1578
1575
  metadata: Metadata | null;
1579
1576
  cacheStatus: string | null;
1580
1577
  }
1581
- declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1582
- declare interface Queue<Body = unknown> {
1578
+ type QueueContentType = "text" | "bytes" | "json" | "v8";
1579
+ interface Queue<Body = unknown> {
1583
1580
  send(message: Body, options?: QueueSendOptions): Promise<void>;
1584
1581
  sendBatch(
1585
1582
  messages: Iterable<MessageSendRequest<Body>>,
1586
1583
  options?: QueueSendBatchOptions,
1587
1584
  ): Promise<void>;
1588
1585
  }
1589
- declare interface QueueSendOptions {
1586
+ interface QueueSendOptions {
1590
1587
  contentType?: QueueContentType;
1591
1588
  delaySeconds?: number;
1592
1589
  }
1593
- declare interface QueueSendBatchOptions {
1590
+ interface QueueSendBatchOptions {
1594
1591
  delaySeconds?: number;
1595
1592
  }
1596
- declare interface MessageSendRequest<Body = unknown> {
1593
+ interface MessageSendRequest<Body = unknown> {
1597
1594
  body: Body;
1598
1595
  contentType?: QueueContentType;
1599
1596
  delaySeconds?: number;
1600
1597
  }
1601
- declare interface QueueRetryOptions {
1598
+ interface QueueRetryOptions {
1602
1599
  delaySeconds?: number;
1603
1600
  }
1604
- declare interface Message<Body = unknown> {
1601
+ interface Message<Body = unknown> {
1605
1602
  readonly id: string;
1606
1603
  readonly timestamp: Date;
1607
1604
  readonly body: Body;
@@ -1609,26 +1606,26 @@ declare interface Message<Body = unknown> {
1609
1606
  retry(options?: QueueRetryOptions): void;
1610
1607
  ack(): void;
1611
1608
  }
1612
- declare interface QueueEvent<Body = unknown> extends ExtendableEvent {
1609
+ interface QueueEvent<Body = unknown> extends ExtendableEvent {
1613
1610
  readonly messages: readonly Message<Body>[];
1614
1611
  readonly queue: string;
1615
1612
  retryAll(options?: QueueRetryOptions): void;
1616
1613
  ackAll(): void;
1617
1614
  }
1618
- declare interface MessageBatch<Body = unknown> {
1615
+ interface MessageBatch<Body = unknown> {
1619
1616
  readonly messages: readonly Message<Body>[];
1620
1617
  readonly queue: string;
1621
1618
  retryAll(options?: QueueRetryOptions): void;
1622
1619
  ackAll(): void;
1623
1620
  }
1624
- declare interface R2Error extends Error {
1621
+ interface R2Error extends Error {
1625
1622
  readonly name: string;
1626
1623
  readonly code: number;
1627
1624
  readonly message: string;
1628
1625
  readonly action: string;
1629
1626
  readonly stack: any;
1630
1627
  }
1631
- declare interface R2ListOptions {
1628
+ interface R2ListOptions {
1632
1629
  limit?: number;
1633
1630
  prefix?: string;
1634
1631
  cursor?: string;
@@ -1676,7 +1673,7 @@ declare abstract class R2Bucket {
1676
1673
  delete(keys: string | string[]): Promise<void>;
1677
1674
  list(options?: R2ListOptions): Promise<R2Objects>;
1678
1675
  }
1679
- declare interface R2MultipartUpload {
1676
+ interface R2MultipartUpload {
1680
1677
  readonly key: string;
1681
1678
  readonly uploadId: string;
1682
1679
  uploadPart(
@@ -1686,7 +1683,7 @@ declare interface R2MultipartUpload {
1686
1683
  abort(): Promise<void>;
1687
1684
  complete(uploadedParts: R2UploadedPart[]): Promise<R2Object>;
1688
1685
  }
1689
- declare interface R2UploadedPart {
1686
+ interface R2UploadedPart {
1690
1687
  partNumber: number;
1691
1688
  etag: string;
1692
1689
  }
@@ -1704,7 +1701,7 @@ declare abstract class R2Object {
1704
1701
  readonly storageClass: string;
1705
1702
  writeHttpMetadata(headers: Headers): void;
1706
1703
  }
1707
- declare interface R2ObjectBody extends R2Object {
1704
+ interface R2ObjectBody extends R2Object {
1708
1705
  get body(): ReadableStream;
1709
1706
  get bodyUsed(): boolean;
1710
1707
  arrayBuffer(): Promise<ArrayBuffer>;
@@ -1712,7 +1709,7 @@ declare interface R2ObjectBody extends R2Object {
1712
1709
  json<T>(): Promise<T>;
1713
1710
  blob(): Promise<Blob>;
1714
1711
  }
1715
- declare type R2Range =
1712
+ type R2Range =
1716
1713
  | {
1717
1714
  offset: number;
1718
1715
  length?: number;
@@ -1724,18 +1721,18 @@ declare type R2Range =
1724
1721
  | {
1725
1722
  suffix: number;
1726
1723
  };
1727
- declare interface R2Conditional {
1724
+ interface R2Conditional {
1728
1725
  etagMatches?: string;
1729
1726
  etagDoesNotMatch?: string;
1730
1727
  uploadedBefore?: Date;
1731
1728
  uploadedAfter?: Date;
1732
1729
  secondsGranularity?: boolean;
1733
1730
  }
1734
- declare interface R2GetOptions {
1731
+ interface R2GetOptions {
1735
1732
  onlyIf?: R2Conditional | Headers;
1736
1733
  range?: R2Range | Headers;
1737
1734
  }
1738
- declare interface R2PutOptions {
1735
+ interface R2PutOptions {
1739
1736
  onlyIf?: R2Conditional | Headers;
1740
1737
  httpMetadata?: R2HTTPMetadata | Headers;
1741
1738
  customMetadata?: Record<string, string>;
@@ -1746,12 +1743,12 @@ declare interface R2PutOptions {
1746
1743
  sha512?: ArrayBuffer | string;
1747
1744
  storageClass?: string;
1748
1745
  }
1749
- declare interface R2MultipartOptions {
1746
+ interface R2MultipartOptions {
1750
1747
  httpMetadata?: R2HTTPMetadata | Headers;
1751
1748
  customMetadata?: Record<string, string>;
1752
1749
  storageClass?: string;
1753
1750
  }
1754
- declare interface R2Checksums {
1751
+ interface R2Checksums {
1755
1752
  readonly md5?: ArrayBuffer;
1756
1753
  readonly sha1?: ArrayBuffer;
1757
1754
  readonly sha256?: ArrayBuffer;
@@ -1759,14 +1756,14 @@ declare interface R2Checksums {
1759
1756
  readonly sha512?: ArrayBuffer;
1760
1757
  toJSON(): R2StringChecksums;
1761
1758
  }
1762
- declare interface R2StringChecksums {
1759
+ interface R2StringChecksums {
1763
1760
  md5?: string;
1764
1761
  sha1?: string;
1765
1762
  sha256?: string;
1766
1763
  sha384?: string;
1767
1764
  sha512?: string;
1768
1765
  }
1769
- declare interface R2HTTPMetadata {
1766
+ interface R2HTTPMetadata {
1770
1767
  contentType?: string;
1771
1768
  contentLanguage?: string;
1772
1769
  contentDisposition?: string;
@@ -1774,7 +1771,7 @@ declare interface R2HTTPMetadata {
1774
1771
  cacheControl?: string;
1775
1772
  cacheExpiry?: Date;
1776
1773
  }
1777
- declare type R2Objects = {
1774
+ type R2Objects = {
1778
1775
  objects: R2Object[];
1779
1776
  delimitedPrefixes: string[];
1780
1777
  } & (
@@ -1791,16 +1788,16 @@ declare abstract class ScheduledEvent extends ExtendableEvent {
1791
1788
  readonly cron: string;
1792
1789
  noRetry(): void;
1793
1790
  }
1794
- declare interface ScheduledController {
1791
+ interface ScheduledController {
1795
1792
  readonly scheduledTime: number;
1796
1793
  readonly cron: string;
1797
1794
  noRetry(): void;
1798
1795
  }
1799
- declare interface QueuingStrategy<T = any> {
1796
+ interface QueuingStrategy<T = any> {
1800
1797
  highWaterMark?: number | bigint;
1801
1798
  size?: (chunk: T) => number | bigint;
1802
1799
  }
1803
- declare interface UnderlyingSink<W = any> {
1800
+ interface UnderlyingSink<W = any> {
1804
1801
  type?: string;
1805
1802
  start?: (controller: WritableStreamDefaultController) => void | Promise<void>;
1806
1803
  write?: (
@@ -1810,14 +1807,14 @@ declare interface UnderlyingSink<W = any> {
1810
1807
  abort?: (reason: any) => void | Promise<void>;
1811
1808
  close?: () => void | Promise<void>;
1812
1809
  }
1813
- declare interface UnderlyingByteSource {
1810
+ interface UnderlyingByteSource {
1814
1811
  type: "bytes";
1815
1812
  autoAllocateChunkSize?: number;
1816
1813
  start?: (controller: ReadableByteStreamController) => void | Promise<void>;
1817
1814
  pull?: (controller: ReadableByteStreamController) => void | Promise<void>;
1818
1815
  cancel?: (reason: any) => void | Promise<void>;
1819
1816
  }
1820
- declare interface UnderlyingSource<R = any> {
1817
+ interface UnderlyingSource<R = any> {
1821
1818
  type?: "" | undefined;
1822
1819
  start?: (
1823
1820
  controller: ReadableStreamDefaultController<R>,
@@ -1828,7 +1825,7 @@ declare interface UnderlyingSource<R = any> {
1828
1825
  cancel?: (reason: any) => void | Promise<void>;
1829
1826
  expectedLength?: number | bigint;
1830
1827
  }
1831
- declare interface Transformer<I = any, O = any> {
1828
+ interface Transformer<I = any, O = any> {
1832
1829
  readableType?: string;
1833
1830
  writableType?: string;
1834
1831
  start?: (
@@ -1844,7 +1841,7 @@ declare interface Transformer<I = any, O = any> {
1844
1841
  cancel?: (reason: any) => void | Promise<void>;
1845
1842
  expectedLength?: number;
1846
1843
  }
1847
- declare interface StreamPipeOptions {
1844
+ interface StreamPipeOptions {
1848
1845
  /**
1849
1846
  * 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.
1850
1847
  *
@@ -1867,7 +1864,7 @@ declare interface StreamPipeOptions {
1867
1864
  preventCancel?: boolean;
1868
1865
  signal?: AbortSignal;
1869
1866
  }
1870
- declare type ReadableStreamReadResult<R = any> =
1867
+ type ReadableStreamReadResult<R = any> =
1871
1868
  | {
1872
1869
  done: false;
1873
1870
  value: R;
@@ -1881,7 +1878,7 @@ declare type ReadableStreamReadResult<R = any> =
1881
1878
  *
1882
1879
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
1883
1880
  */
1884
- declare interface ReadableStream<R = any> {
1881
+ interface ReadableStream<R = any> {
1885
1882
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
1886
1883
  readonly locked: boolean;
1887
1884
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
@@ -1942,10 +1939,10 @@ declare class ReadableStreamBYOBReader {
1942
1939
  view: T,
1943
1940
  ): Promise<ReadableStreamReadResult<T>>;
1944
1941
  }
1945
- declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1942
+ interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
1946
1943
  min?: number;
1947
1944
  }
1948
- declare interface ReadableStreamGetReaderOptions {
1945
+ interface ReadableStreamGetReaderOptions {
1949
1946
  /**
1950
1947
  * Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
1951
1948
  *
@@ -1954,7 +1951,7 @@ declare interface ReadableStreamGetReaderOptions {
1954
1951
  mode: "byob";
1955
1952
  }
1956
1953
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
1957
- declare interface ReadableStreamBYOBRequest {
1954
+ interface ReadableStreamBYOBRequest {
1958
1955
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
1959
1956
  get view(): Uint8Array | null;
1960
1957
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
@@ -1964,7 +1961,7 @@ declare interface ReadableStreamBYOBRequest {
1964
1961
  get atLeast(): number | null;
1965
1962
  }
1966
1963
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
1967
- declare interface ReadableStreamDefaultController<R = any> {
1964
+ interface ReadableStreamDefaultController<R = any> {
1968
1965
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
1969
1966
  get desiredSize(): number | null;
1970
1967
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
@@ -1975,7 +1972,7 @@ declare interface ReadableStreamDefaultController<R = any> {
1975
1972
  error(reason: any): void;
1976
1973
  }
1977
1974
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
1978
- declare interface ReadableByteStreamController {
1975
+ interface ReadableByteStreamController {
1979
1976
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
1980
1977
  get byobRequest(): ReadableStreamBYOBRequest | null;
1981
1978
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
@@ -1992,14 +1989,14 @@ declare interface ReadableByteStreamController {
1992
1989
  *
1993
1990
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
1994
1991
  */
1995
- declare interface WritableStreamDefaultController {
1992
+ interface WritableStreamDefaultController {
1996
1993
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
1997
1994
  get signal(): AbortSignal;
1998
1995
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
1999
1996
  error(reason?: any): void;
2000
1997
  }
2001
1998
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
2002
- declare interface TransformStreamDefaultController<O = any> {
1999
+ interface TransformStreamDefaultController<O = any> {
2003
2000
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
2004
2001
  get desiredSize(): number | null;
2005
2002
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
@@ -2009,7 +2006,7 @@ declare interface TransformStreamDefaultController<O = any> {
2009
2006
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
2010
2007
  terminate(): void;
2011
2008
  }
2012
- declare interface ReadableWritablePair<R = any, W = any> {
2009
+ interface ReadableWritablePair<R = any, W = any> {
2013
2010
  /**
2014
2011
  * 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.
2015
2012
  *
@@ -2072,10 +2069,10 @@ declare class IdentityTransformStream extends TransformStream<
2072
2069
  > {
2073
2070
  constructor(queuingStrategy?: IdentityTransformStreamQueuingStrategy);
2074
2071
  }
2075
- declare interface IdentityTransformStreamQueuingStrategy {
2072
+ interface IdentityTransformStreamQueuingStrategy {
2076
2073
  highWaterMark?: number | bigint;
2077
2074
  }
2078
- declare interface ReadableStreamValuesOptions {
2075
+ interface ReadableStreamValuesOptions {
2079
2076
  preventCancel?: boolean;
2080
2077
  }
2081
2078
  declare class CompressionStream extends TransformStream<
@@ -2103,7 +2100,7 @@ declare class TextDecoderStream extends TransformStream<
2103
2100
  get fatal(): boolean;
2104
2101
  get ignoreBOM(): boolean;
2105
2102
  }
2106
- declare interface TextDecoderStreamTextDecoderStreamInit {
2103
+ interface TextDecoderStreamTextDecoderStreamInit {
2107
2104
  fatal?: boolean;
2108
2105
  ignoreBOM?: boolean;
2109
2106
  }
@@ -2123,7 +2120,7 @@ declare class CountQueuingStrategy implements QueuingStrategy {
2123
2120
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
2124
2121
  get size(): (chunk?: any) => number;
2125
2122
  }
2126
- declare interface QueuingStrategyInit {
2123
+ interface QueuingStrategyInit {
2127
2124
  /**
2128
2125
  * Creates a new ByteLengthQueuingStrategy with the provided high water mark.
2129
2126
  *
@@ -2131,7 +2128,7 @@ declare interface QueuingStrategyInit {
2131
2128
  */
2132
2129
  highWaterMark: number;
2133
2130
  }
2134
- declare interface ScriptVersion {
2131
+ interface ScriptVersion {
2135
2132
  id?: string;
2136
2133
  tag?: string;
2137
2134
  message?: string;
@@ -2140,7 +2137,7 @@ declare abstract class TailEvent extends ExtendableEvent {
2140
2137
  readonly events: TraceItem[];
2141
2138
  readonly traces: TraceItem[];
2142
2139
  }
2143
- declare interface TraceItem {
2140
+ interface TraceItem {
2144
2141
  readonly event:
2145
2142
  | (
2146
2143
  | TraceItemFetchEventInfo
@@ -2165,84 +2162,84 @@ declare interface TraceItem {
2165
2162
  readonly scriptTags?: string[];
2166
2163
  readonly outcome: string;
2167
2164
  }
2168
- declare interface TraceItemAlarmEventInfo {
2165
+ interface TraceItemAlarmEventInfo {
2169
2166
  readonly scheduledTime: Date;
2170
2167
  }
2171
- declare interface TraceItemCustomEventInfo {}
2172
- declare interface TraceItemScheduledEventInfo {
2168
+ interface TraceItemCustomEventInfo {}
2169
+ interface TraceItemScheduledEventInfo {
2173
2170
  readonly scheduledTime: number;
2174
2171
  readonly cron: string;
2175
2172
  }
2176
- declare interface TraceItemQueueEventInfo {
2173
+ interface TraceItemQueueEventInfo {
2177
2174
  readonly queue: string;
2178
2175
  readonly batchSize: number;
2179
2176
  }
2180
- declare interface TraceItemEmailEventInfo {
2177
+ interface TraceItemEmailEventInfo {
2181
2178
  readonly mailFrom: string;
2182
2179
  readonly rcptTo: string;
2183
2180
  readonly rawSize: number;
2184
2181
  }
2185
- declare interface TraceItemTailEventInfo {
2182
+ interface TraceItemTailEventInfo {
2186
2183
  readonly consumedEvents: TraceItemTailEventInfoTailItem[];
2187
2184
  }
2188
- declare interface TraceItemTailEventInfoTailItem {
2185
+ interface TraceItemTailEventInfoTailItem {
2189
2186
  readonly scriptName: string | null;
2190
2187
  }
2191
- declare interface TraceItemFetchEventInfo {
2188
+ interface TraceItemFetchEventInfo {
2192
2189
  readonly response?: TraceItemFetchEventInfoResponse;
2193
2190
  readonly request: TraceItemFetchEventInfoRequest;
2194
2191
  }
2195
- declare interface TraceItemFetchEventInfoRequest {
2192
+ interface TraceItemFetchEventInfoRequest {
2196
2193
  readonly cf?: any;
2197
2194
  readonly headers: Record<string, string>;
2198
2195
  readonly method: string;
2199
2196
  readonly url: string;
2200
2197
  getUnredacted(): TraceItemFetchEventInfoRequest;
2201
2198
  }
2202
- declare interface TraceItemFetchEventInfoResponse {
2199
+ interface TraceItemFetchEventInfoResponse {
2203
2200
  readonly status: number;
2204
2201
  }
2205
- declare interface TraceItemJsRpcEventInfo {
2202
+ interface TraceItemJsRpcEventInfo {
2206
2203
  readonly rpcMethod: string;
2207
2204
  }
2208
- declare interface TraceItemHibernatableWebSocketEventInfo {
2205
+ interface TraceItemHibernatableWebSocketEventInfo {
2209
2206
  readonly getWebSocketEvent:
2210
2207
  | TraceItemHibernatableWebSocketEventInfoMessage
2211
2208
  | TraceItemHibernatableWebSocketEventInfoClose
2212
2209
  | TraceItemHibernatableWebSocketEventInfoError;
2213
2210
  }
2214
- declare interface TraceItemHibernatableWebSocketEventInfoMessage {
2211
+ interface TraceItemHibernatableWebSocketEventInfoMessage {
2215
2212
  readonly webSocketEventType: string;
2216
2213
  }
2217
- declare interface TraceItemHibernatableWebSocketEventInfoClose {
2214
+ interface TraceItemHibernatableWebSocketEventInfoClose {
2218
2215
  readonly webSocketEventType: string;
2219
2216
  readonly code: number;
2220
2217
  readonly wasClean: boolean;
2221
2218
  }
2222
- declare interface TraceItemHibernatableWebSocketEventInfoError {
2219
+ interface TraceItemHibernatableWebSocketEventInfoError {
2223
2220
  readonly webSocketEventType: string;
2224
2221
  }
2225
- declare interface TraceLog {
2222
+ interface TraceLog {
2226
2223
  readonly timestamp: number;
2227
2224
  readonly level: string;
2228
2225
  readonly message: any;
2229
2226
  }
2230
- declare interface TraceException {
2227
+ interface TraceException {
2231
2228
  readonly timestamp: number;
2232
2229
  readonly message: string;
2233
2230
  readonly name: string;
2234
2231
  readonly stack?: string;
2235
2232
  }
2236
- declare interface TraceDiagnosticChannelEvent {
2233
+ interface TraceDiagnosticChannelEvent {
2237
2234
  readonly timestamp: number;
2238
2235
  readonly channel: string;
2239
2236
  readonly message: any;
2240
2237
  }
2241
- declare interface TraceMetrics {
2238
+ interface TraceMetrics {
2242
2239
  readonly cpuTime: number;
2243
2240
  readonly wallTime: number;
2244
2241
  }
2245
- declare interface UnsafeTraceMetrics {
2242
+ interface UnsafeTraceMetrics {
2246
2243
  fromTrace(item: TraceItem): TraceMetrics;
2247
2244
  }
2248
2245
  declare class URL {
@@ -2329,7 +2326,7 @@ declare class URLPattern {
2329
2326
  baseURL?: string,
2330
2327
  ): URLPatternURLPatternResult | null;
2331
2328
  }
2332
- declare interface URLPatternURLPatternInit {
2329
+ interface URLPatternURLPatternInit {
2333
2330
  protocol?: string;
2334
2331
  username?: string;
2335
2332
  password?: string;
@@ -2340,11 +2337,11 @@ declare interface URLPatternURLPatternInit {
2340
2337
  hash?: string;
2341
2338
  baseURL?: string;
2342
2339
  }
2343
- declare interface URLPatternURLPatternComponentResult {
2340
+ interface URLPatternURLPatternComponentResult {
2344
2341
  input: string;
2345
2342
  groups: Record<string, string>;
2346
2343
  }
2347
- declare interface URLPatternURLPatternResult {
2344
+ interface URLPatternURLPatternResult {
2348
2345
  inputs: (string | URLPatternURLPatternInit)[];
2349
2346
  protocol: URLPatternURLPatternComponentResult;
2350
2347
  username: URLPatternURLPatternComponentResult;
@@ -2355,7 +2352,7 @@ declare interface URLPatternURLPatternResult {
2355
2352
  search: URLPatternURLPatternComponentResult;
2356
2353
  hash: URLPatternURLPatternComponentResult;
2357
2354
  }
2358
- declare interface URLPatternURLPatternOptions {
2355
+ interface URLPatternURLPatternOptions {
2359
2356
  ignoreCase?: boolean;
2360
2357
  }
2361
2358
  declare class CloseEvent extends Event {
@@ -2379,7 +2376,7 @@ declare class CloseEvent extends Event {
2379
2376
  */
2380
2377
  readonly wasClean: boolean;
2381
2378
  }
2382
- declare interface CloseEventInit {
2379
+ interface CloseEventInit {
2383
2380
  code?: number;
2384
2381
  reason?: string;
2385
2382
  wasClean?: boolean;
@@ -2388,10 +2385,10 @@ declare class MessageEvent extends Event {
2388
2385
  constructor(type: string, initializer: MessageEventInit);
2389
2386
  readonly data: ArrayBuffer | string;
2390
2387
  }
2391
- declare interface MessageEventInit {
2388
+ interface MessageEventInit {
2392
2389
  data: ArrayBuffer | string;
2393
2390
  }
2394
- declare type WebSocketEventMap = {
2391
+ type WebSocketEventMap = {
2395
2392
  close: CloseEvent;
2396
2393
  message: MessageEvent;
2397
2394
  open: Event;
@@ -2453,7 +2450,7 @@ declare const WebSocketPair: {
2453
2450
  1: WebSocket;
2454
2451
  };
2455
2452
  };
2456
- declare interface Socket {
2453
+ interface Socket {
2457
2454
  get readable(): ReadableStream;
2458
2455
  get writable(): WritableStream;
2459
2456
  get closed(): Promise<void>;
@@ -2461,76 +2458,74 @@ declare interface Socket {
2461
2458
  close(): Promise<void>;
2462
2459
  startTls(options?: TlsOptions): Socket;
2463
2460
  }
2464
- declare interface SocketOptions {
2461
+ interface SocketOptions {
2465
2462
  secureTransport?: string;
2466
2463
  allowHalfOpen: boolean;
2467
2464
  highWaterMark?: number | bigint;
2468
2465
  }
2469
- declare interface SocketAddress {
2466
+ interface SocketAddress {
2470
2467
  hostname: string;
2471
2468
  port: number;
2472
2469
  }
2473
- declare interface TlsOptions {
2470
+ interface TlsOptions {
2474
2471
  expectedServerHostname?: string;
2475
2472
  }
2476
- declare interface SocketInfo {
2473
+ interface SocketInfo {
2477
2474
  remoteAddress?: string;
2478
2475
  localAddress?: string;
2479
2476
  }
2480
- declare abstract class gpuGPUAdapter {
2481
- requestDevice(param1?: gpuGPUDeviceDescriptor): Promise<gpuGPUDevice>;
2482
- requestAdapterInfo(unmaskHints?: string[]): Promise<gpuGPUAdapterInfo>;
2483
- get features(): gpuGPUSupportedFeatures;
2484
- get limits(): gpuGPUSupportedLimits;
2477
+ declare abstract class GPUAdapter {
2478
+ requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
2479
+ requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
2480
+ get features(): GPUSupportedFeatures;
2481
+ get limits(): GPUSupportedLimits;
2485
2482
  }
2486
- declare interface gpuGPUDevice extends EventTarget {
2487
- createBuffer(param1: gpuGPUBufferDescriptor): gpuGPUBuffer;
2483
+ interface GPUDevice extends EventTarget {
2484
+ createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
2488
2485
  createBindGroupLayout(
2489
- descriptor: gpuGPUBindGroupLayoutDescriptor,
2490
- ): gpuGPUBindGroupLayout;
2491
- createBindGroup(descriptor: gpuGPUBindGroupDescriptor): gpuGPUBindGroup;
2492
- createSampler(descriptor: gpuGPUSamplerDescriptor): gpuGPUSampler;
2493
- createShaderModule(
2494
- descriptor: gpuGPUShaderModuleDescriptor,
2495
- ): gpuGPUShaderModule;
2486
+ descriptor: GPUBindGroupLayoutDescriptor,
2487
+ ): GPUBindGroupLayout;
2488
+ createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
2489
+ createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
2490
+ createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
2496
2491
  createPipelineLayout(
2497
- descriptor: gpuGPUPipelineLayoutDescriptor,
2498
- ): gpuGPUPipelineLayout;
2492
+ descriptor: GPUPipelineLayoutDescriptor,
2493
+ ): GPUPipelineLayout;
2499
2494
  createComputePipeline(
2500
- descriptor: gpuGPUComputePipelineDescriptor,
2501
- ): gpuGPUComputePipeline;
2495
+ descriptor: GPUComputePipelineDescriptor,
2496
+ ): GPUComputePipeline;
2502
2497
  createRenderPipeline(
2503
- descriptor: gpuGPURenderPipelineDescriptor,
2504
- ): gpuGPURenderPipeline;
2498
+ descriptor: GPURenderPipelineDescriptor,
2499
+ ): GPURenderPipeline;
2505
2500
  createCommandEncoder(
2506
- descriptor?: gpuGPUCommandEncoderDescriptor,
2507
- ): gpuGPUCommandEncoder;
2508
- createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
2501
+ descriptor?: GPUCommandEncoderDescriptor,
2502
+ ): GPUCommandEncoder;
2503
+ createTexture(param1: GPUTextureDescriptor): GPUTexture;
2509
2504
  destroy(): void;
2510
- createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
2505
+ createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
2511
2506
  pushErrorScope(filter: string): void;
2512
- popErrorScope(): Promise<gpuGPUError | null>;
2513
- get queue(): gpuGPUQueue;
2514
- get lost(): Promise<gpuGPUDeviceLostInfo>;
2515
- get features(): gpuGPUSupportedFeatures;
2516
- get limits(): gpuGPUSupportedLimits;
2507
+ popErrorScope(): Promise<GPUError | null>;
2508
+ get queue(): GPUQueue;
2509
+ get lost(): Promise<GPUDeviceLostInfo>;
2510
+ get features(): GPUSupportedFeatures;
2511
+ get limits(): GPUSupportedLimits;
2517
2512
  }
2518
- declare interface gpuGPUDeviceDescriptor {
2513
+ interface GPUDeviceDescriptor {
2519
2514
  label?: string;
2520
2515
  requiredFeatures?: string[];
2521
2516
  requiredLimits?: Record<string, number | bigint>;
2522
- defaultQueue?: gpuGPUQueueDescriptor;
2517
+ defaultQueue?: GPUQueueDescriptor;
2523
2518
  }
2524
- declare interface gpuGPUBufferDescriptor {
2519
+ interface GPUBufferDescriptor {
2525
2520
  label: string;
2526
2521
  size: number | bigint;
2527
2522
  usage: number;
2528
2523
  mappedAtCreation: boolean;
2529
2524
  }
2530
- declare interface gpuGPUQueueDescriptor {
2525
+ interface GPUQueueDescriptor {
2531
2526
  label?: string;
2532
2527
  }
2533
- declare abstract class gpuGPUBufferUsage {
2528
+ declare abstract class GPUBufferUsage {
2534
2529
  static readonly MAP_READ: number;
2535
2530
  static readonly MAP_WRITE: number;
2536
2531
  static readonly COPY_SRC: number;
@@ -2542,7 +2537,7 @@ declare abstract class gpuGPUBufferUsage {
2542
2537
  static readonly INDIRECT: number;
2543
2538
  static readonly QUERY_RESOLVE: number;
2544
2539
  }
2545
- declare interface gpuGPUBuffer {
2540
+ interface GPUBuffer {
2546
2541
  getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
2547
2542
  unmap(): void;
2548
2543
  destroy(): void;
@@ -2555,59 +2550,59 @@ declare interface gpuGPUBuffer {
2555
2550
  get usage(): number;
2556
2551
  get mapState(): string;
2557
2552
  }
2558
- declare abstract class gpuGPUShaderStage {
2553
+ declare abstract class GPUShaderStage {
2559
2554
  static readonly VERTEX: number;
2560
2555
  static readonly FRAGMENT: number;
2561
2556
  static readonly COMPUTE: number;
2562
2557
  }
2563
- declare interface gpuGPUBindGroupLayoutDescriptor {
2558
+ interface GPUBindGroupLayoutDescriptor {
2564
2559
  label?: string;
2565
- entries: gpuGPUBindGroupLayoutEntry[];
2560
+ entries: GPUBindGroupLayoutEntry[];
2566
2561
  }
2567
- declare interface gpuGPUBindGroupLayoutEntry {
2562
+ interface GPUBindGroupLayoutEntry {
2568
2563
  binding: number;
2569
2564
  visibility: number;
2570
- buffer?: gpuGPUBufferBindingLayout;
2571
- sampler?: gpuGPUSamplerBindingLayout;
2572
- texture?: gpuGPUTextureBindingLayout;
2573
- storageTexture?: gpuGPUStorageTextureBindingLayout;
2565
+ buffer?: GPUBufferBindingLayout;
2566
+ sampler?: GPUSamplerBindingLayout;
2567
+ texture?: GPUTextureBindingLayout;
2568
+ storageTexture?: GPUStorageTextureBindingLayout;
2574
2569
  }
2575
- declare interface gpuGPUStorageTextureBindingLayout {
2570
+ interface GPUStorageTextureBindingLayout {
2576
2571
  access?: string;
2577
2572
  format: string;
2578
2573
  viewDimension?: string;
2579
2574
  }
2580
- declare interface gpuGPUTextureBindingLayout {
2575
+ interface GPUTextureBindingLayout {
2581
2576
  sampleType?: string;
2582
2577
  viewDimension?: string;
2583
2578
  multisampled?: boolean;
2584
2579
  }
2585
- declare interface gpuGPUSamplerBindingLayout {
2580
+ interface GPUSamplerBindingLayout {
2586
2581
  type?: string;
2587
2582
  }
2588
- declare interface gpuGPUBufferBindingLayout {
2583
+ interface GPUBufferBindingLayout {
2589
2584
  type?: string;
2590
2585
  hasDynamicOffset?: boolean;
2591
2586
  minBindingSize?: number | bigint;
2592
2587
  }
2593
- declare interface gpuGPUBindGroupLayout {}
2594
- declare interface gpuGPUBindGroup {}
2595
- declare interface gpuGPUBindGroupDescriptor {
2588
+ interface GPUBindGroupLayout {}
2589
+ interface GPUBindGroup {}
2590
+ interface GPUBindGroupDescriptor {
2596
2591
  label?: string;
2597
- layout: gpuGPUBindGroupLayout;
2598
- entries: gpuGPUBindGroupEntry[];
2592
+ layout: GPUBindGroupLayout;
2593
+ entries: GPUBindGroupEntry[];
2599
2594
  }
2600
- declare interface gpuGPUBindGroupEntry {
2595
+ interface GPUBindGroupEntry {
2601
2596
  binding: number;
2602
- resource: gpuGPUBufferBinding | gpuGPUSampler;
2597
+ resource: GPUBufferBinding | GPUSampler;
2603
2598
  }
2604
- declare interface gpuGPUBufferBinding {
2605
- buffer: gpuGPUBuffer;
2599
+ interface GPUBufferBinding {
2600
+ buffer: GPUBuffer;
2606
2601
  offset?: number | bigint;
2607
2602
  size?: number | bigint;
2608
2603
  }
2609
- declare interface gpuGPUSampler {}
2610
- declare interface gpuGPUSamplerDescriptor {
2604
+ interface GPUSampler {}
2605
+ interface GPUSamplerDescriptor {
2611
2606
  label?: string;
2612
2607
  addressModeU?: string;
2613
2608
  addressModeV?: string;
@@ -2620,76 +2615,74 @@ declare interface gpuGPUSamplerDescriptor {
2620
2615
  compare: string;
2621
2616
  maxAnisotropy?: number;
2622
2617
  }
2623
- declare interface gpuGPUShaderModule {
2624
- getCompilationInfo(): Promise<gpuGPUCompilationInfo>;
2618
+ interface GPUShaderModule {
2619
+ getCompilationInfo(): Promise<GPUCompilationInfo>;
2625
2620
  }
2626
- declare interface gpuGPUShaderModuleDescriptor {
2621
+ interface GPUShaderModuleDescriptor {
2627
2622
  label?: string;
2628
2623
  code: string;
2629
2624
  }
2630
- declare interface gpuGPUPipelineLayout {}
2631
- declare interface gpuGPUPipelineLayoutDescriptor {
2625
+ interface GPUPipelineLayout {}
2626
+ interface GPUPipelineLayoutDescriptor {
2632
2627
  label?: string;
2633
- bindGroupLayouts: gpuGPUBindGroupLayout[];
2628
+ bindGroupLayouts: GPUBindGroupLayout[];
2634
2629
  }
2635
- declare interface gpuGPUComputePipeline {
2636
- getBindGroupLayout(index: number): gpuGPUBindGroupLayout;
2630
+ interface GPUComputePipeline {
2631
+ getBindGroupLayout(index: number): GPUBindGroupLayout;
2637
2632
  }
2638
- declare interface gpuGPUComputePipelineDescriptor {
2633
+ interface GPUComputePipelineDescriptor {
2639
2634
  label?: string;
2640
- compute: gpuGPUProgrammableStage;
2641
- layout: string | gpuGPUPipelineLayout;
2635
+ compute: GPUProgrammableStage;
2636
+ layout: string | GPUPipelineLayout;
2642
2637
  }
2643
- declare interface gpuGPUProgrammableStage {
2644
- module: gpuGPUShaderModule;
2638
+ interface GPUProgrammableStage {
2639
+ module: GPUShaderModule;
2645
2640
  entryPoint: string;
2646
2641
  constants?: Record<string, number>;
2647
2642
  }
2648
- declare interface gpuGPUCommandEncoder {
2643
+ interface GPUCommandEncoder {
2649
2644
  get label(): string;
2650
2645
  beginComputePass(
2651
- descriptor?: gpuGPUComputePassDescriptor,
2652
- ): gpuGPUComputePassEncoder;
2653
- beginRenderPass(
2654
- descriptor: gpuGPURenderPassDescriptor,
2655
- ): gpuGPURenderPassEncoder;
2646
+ descriptor?: GPUComputePassDescriptor,
2647
+ ): GPUComputePassEncoder;
2648
+ beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
2656
2649
  copyBufferToBuffer(
2657
- source: gpuGPUBuffer,
2650
+ source: GPUBuffer,
2658
2651
  sourceOffset: number | bigint,
2659
- destination: gpuGPUBuffer,
2652
+ destination: GPUBuffer,
2660
2653
  destinationOffset: number | bigint,
2661
2654
  size: number | bigint,
2662
2655
  ): void;
2663
- finish(param0?: gpuGPUCommandBufferDescriptor): gpuGPUCommandBuffer;
2656
+ finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
2664
2657
  copyTextureToBuffer(
2665
- source: gpuGPUImageCopyTexture,
2666
- destination: gpuGPUImageCopyBuffer,
2667
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2658
+ source: GPUImageCopyTexture,
2659
+ destination: GPUImageCopyBuffer,
2660
+ copySize: Iterable<number> | GPUExtent3DDict,
2668
2661
  ): void;
2669
2662
  copyBufferToTexture(
2670
- source: gpuGPUImageCopyBuffer,
2671
- destination: gpuGPUImageCopyTexture,
2672
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2663
+ source: GPUImageCopyBuffer,
2664
+ destination: GPUImageCopyTexture,
2665
+ copySize: Iterable<number> | GPUExtent3DDict,
2673
2666
  ): void;
2674
2667
  copyTextureToTexture(
2675
- source: gpuGPUImageCopyTexture,
2676
- destination: gpuGPUImageCopyTexture,
2677
- copySize: Iterable<number> | gpuGPUExtent3DDict,
2668
+ source: GPUImageCopyTexture,
2669
+ destination: GPUImageCopyTexture,
2670
+ copySize: Iterable<number> | GPUExtent3DDict,
2678
2671
  ): void;
2679
2672
  clearBuffer(
2680
- buffer: gpuGPUBuffer,
2673
+ buffer: GPUBuffer,
2681
2674
  offset?: number | bigint,
2682
2675
  size?: number | bigint,
2683
2676
  ): void;
2684
2677
  }
2685
- declare interface gpuGPUCommandEncoderDescriptor {
2678
+ interface GPUCommandEncoderDescriptor {
2686
2679
  label?: string;
2687
2680
  }
2688
- declare interface gpuGPUComputePassEncoder {
2689
- setPipeline(pipeline: gpuGPUComputePipeline): void;
2681
+ interface GPUComputePassEncoder {
2682
+ setPipeline(pipeline: GPUComputePipeline): void;
2690
2683
  setBindGroup(
2691
2684
  index: number,
2692
- bindGroup: gpuGPUBindGroup | null,
2685
+ bindGroup: GPUBindGroup | null,
2693
2686
  dynamicOffsets?: Iterable<number>,
2694
2687
  ): void;
2695
2688
  dispatchWorkgroups(
@@ -2699,48 +2692,48 @@ declare interface gpuGPUComputePassEncoder {
2699
2692
  ): void;
2700
2693
  end(): void;
2701
2694
  }
2702
- declare interface gpuGPUComputePassDescriptor {
2695
+ interface GPUComputePassDescriptor {
2703
2696
  label?: string;
2704
- timestampWrites?: gpuGPUComputePassTimestampWrites;
2697
+ timestampWrites?: GPUComputePassTimestampWrites;
2705
2698
  }
2706
- declare interface gpuGPUQuerySet {}
2707
- declare interface gpuGPUQuerySetDescriptor {
2699
+ interface GPUQuerySet {}
2700
+ interface GPUQuerySetDescriptor {
2708
2701
  label?: string;
2709
2702
  }
2710
- declare interface gpuGPUComputePassTimestampWrites {
2711
- querySet: gpuGPUQuerySet;
2703
+ interface GPUComputePassTimestampWrites {
2704
+ querySet: GPUQuerySet;
2712
2705
  beginningOfPassWriteIndex?: number;
2713
2706
  endOfPassWriteIndex?: number;
2714
2707
  }
2715
- declare interface gpuGPUCommandBufferDescriptor {
2708
+ interface GPUCommandBufferDescriptor {
2716
2709
  label?: string;
2717
2710
  }
2718
- declare interface gpuGPUCommandBuffer {}
2719
- declare interface gpuGPUQueue {
2720
- submit(commandBuffers: gpuGPUCommandBuffer[]): void;
2711
+ interface GPUCommandBuffer {}
2712
+ interface GPUQueue {
2713
+ submit(commandBuffers: GPUCommandBuffer[]): void;
2721
2714
  writeBuffer(
2722
- buffer: gpuGPUBuffer,
2715
+ buffer: GPUBuffer,
2723
2716
  bufferOffset: number | bigint,
2724
2717
  data: ArrayBuffer | ArrayBufferView,
2725
2718
  dataOffset?: number | bigint,
2726
2719
  size?: number | bigint,
2727
2720
  ): void;
2728
2721
  }
2729
- declare abstract class gpuGPUMapMode {
2722
+ declare abstract class GPUMapMode {
2730
2723
  static readonly READ: number;
2731
2724
  static readonly WRITE: number;
2732
2725
  }
2733
- declare interface gpuGPUAdapterInfo {
2726
+ interface GPUAdapterInfo {
2734
2727
  get vendor(): string;
2735
2728
  get architecture(): string;
2736
2729
  get device(): string;
2737
2730
  get description(): string;
2738
2731
  }
2739
- declare interface gpuGPUSupportedFeatures {
2732
+ interface GPUSupportedFeatures {
2740
2733
  has(name: string): boolean;
2741
2734
  keys(): string[];
2742
2735
  }
2743
- declare interface gpuGPUSupportedLimits {
2736
+ interface GPUSupportedLimits {
2744
2737
  get maxTextureDimension1D(): number;
2745
2738
  get maxTextureDimension2D(): number;
2746
2739
  get maxTextureDimension3D(): number;
@@ -2773,17 +2766,17 @@ declare interface gpuGPUSupportedLimits {
2773
2766
  get maxComputeWorkgroupSizeZ(): number;
2774
2767
  get maxComputeWorkgroupsPerDimension(): number;
2775
2768
  }
2776
- declare abstract class gpuGPUError {
2769
+ declare abstract class GPUError {
2777
2770
  get message(): string;
2778
2771
  }
2779
- declare abstract class gpuGPUOutOfMemoryError extends gpuGPUError {}
2780
- declare abstract class gpuGPUInternalError extends gpuGPUError {}
2781
- declare abstract class gpuGPUValidationError extends gpuGPUError {}
2782
- declare abstract class gpuGPUDeviceLostInfo {
2772
+ declare abstract class GPUOutOfMemoryError extends GPUError {}
2773
+ declare abstract class GPUInternalError extends GPUError {}
2774
+ declare abstract class GPUValidationError extends GPUError {}
2775
+ declare abstract class GPUDeviceLostInfo {
2783
2776
  get message(): string;
2784
2777
  get reason(): string;
2785
2778
  }
2786
- declare interface gpuGPUCompilationMessage {
2779
+ interface GPUCompilationMessage {
2787
2780
  get message(): string;
2788
2781
  get type(): string;
2789
2782
  get lineNum(): number;
@@ -2791,19 +2784,19 @@ declare interface gpuGPUCompilationMessage {
2791
2784
  get offset(): number;
2792
2785
  get length(): number;
2793
2786
  }
2794
- declare interface gpuGPUCompilationInfo {
2795
- get messages(): gpuGPUCompilationMessage[];
2787
+ interface GPUCompilationInfo {
2788
+ get messages(): GPUCompilationMessage[];
2796
2789
  }
2797
- declare abstract class gpuGPUTextureUsage {
2790
+ declare abstract class GPUTextureUsage {
2798
2791
  static readonly COPY_SRC: number;
2799
2792
  static readonly COPY_DST: number;
2800
2793
  static readonly TEXTURE_BINDING: number;
2801
2794
  static readonly STORAGE_BINDING: number;
2802
2795
  static readonly RENDER_ATTACHMENT: number;
2803
2796
  }
2804
- declare interface gpuGPUTextureDescriptor {
2797
+ interface GPUTextureDescriptor {
2805
2798
  label: string;
2806
- size: number[] | gpuGPUExtent3DDict;
2799
+ size: number[] | GPUExtent3DDict;
2807
2800
  mipLevelCount?: number;
2808
2801
  sampleCount?: number;
2809
2802
  dimension?: string;
@@ -2811,13 +2804,13 @@ declare interface gpuGPUTextureDescriptor {
2811
2804
  usage: number;
2812
2805
  viewFormats?: string[];
2813
2806
  }
2814
- declare interface gpuGPUExtent3DDict {
2807
+ interface GPUExtent3DDict {
2815
2808
  width: number;
2816
2809
  height?: number;
2817
2810
  depthOrArrayLayers?: number;
2818
2811
  }
2819
- declare interface gpuGPUTexture {
2820
- createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
2812
+ interface GPUTexture {
2813
+ createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
2821
2814
  destroy(): void;
2822
2815
  get width(): number;
2823
2816
  get height(): number;
@@ -2827,8 +2820,8 @@ declare interface gpuGPUTexture {
2827
2820
  get format(): string;
2828
2821
  get usage(): number;
2829
2822
  }
2830
- declare interface gpuGPUTextureView {}
2831
- declare interface gpuGPUTextureViewDescriptor {
2823
+ interface GPUTextureView {}
2824
+ interface GPUTextureViewDescriptor {
2832
2825
  label: string;
2833
2826
  format: string;
2834
2827
  dimension: string;
@@ -2838,91 +2831,91 @@ declare interface gpuGPUTextureViewDescriptor {
2838
2831
  baseArrayLayer?: number;
2839
2832
  arrayLayerCount: number;
2840
2833
  }
2841
- declare abstract class gpuGPUColorWrite {
2834
+ declare abstract class GPUColorWrite {
2842
2835
  static readonly RED: number;
2843
2836
  static readonly GREEN: number;
2844
2837
  static readonly BLUE: number;
2845
2838
  static readonly ALPHA: number;
2846
2839
  static readonly ALL: number;
2847
2840
  }
2848
- declare interface gpuGPURenderPipeline {}
2849
- declare interface gpuGPURenderPipelineDescriptor {
2841
+ interface GPURenderPipeline {}
2842
+ interface GPURenderPipelineDescriptor {
2850
2843
  label?: string;
2851
- layout: string | gpuGPUPipelineLayout;
2852
- vertex: gpuGPUVertexState;
2853
- primitive?: gpuGPUPrimitiveState;
2854
- depthStencil?: gpuGPUDepthStencilState;
2855
- multisample?: gpuGPUMultisampleState;
2856
- fragment?: gpuGPUFragmentState;
2857
- }
2858
- declare interface gpuGPUVertexState {
2859
- module: gpuGPUShaderModule;
2844
+ layout: string | GPUPipelineLayout;
2845
+ vertex: GPUVertexState;
2846
+ primitive?: GPUPrimitiveState;
2847
+ depthStencil?: GPUDepthStencilState;
2848
+ multisample?: GPUMultisampleState;
2849
+ fragment?: GPUFragmentState;
2850
+ }
2851
+ interface GPUVertexState {
2852
+ module: GPUShaderModule;
2860
2853
  entryPoint: string;
2861
2854
  constants?: Record<string, number>;
2862
- buffers?: gpuGPUVertexBufferLayout[];
2855
+ buffers?: GPUVertexBufferLayout[];
2863
2856
  }
2864
- declare interface gpuGPUVertexBufferLayout {
2857
+ interface GPUVertexBufferLayout {
2865
2858
  arrayStride: number | bigint;
2866
2859
  stepMode?: string;
2867
- attributes: gpuGPUVertexAttribute[];
2860
+ attributes: GPUVertexAttribute[];
2868
2861
  }
2869
- declare interface gpuGPUVertexAttribute {
2862
+ interface GPUVertexAttribute {
2870
2863
  format: string;
2871
2864
  offset: number | bigint;
2872
2865
  shaderLocation: number;
2873
2866
  }
2874
- declare interface gpuGPUPrimitiveState {
2867
+ interface GPUPrimitiveState {
2875
2868
  topology?: string;
2876
2869
  stripIndexFormat?: string;
2877
2870
  frontFace?: string;
2878
2871
  cullMode?: string;
2879
2872
  unclippedDepth?: boolean;
2880
2873
  }
2881
- declare interface gpuGPUStencilFaceState {
2874
+ interface GPUStencilFaceState {
2882
2875
  compare?: string;
2883
2876
  failOp?: string;
2884
2877
  depthFailOp?: string;
2885
2878
  passOp?: string;
2886
2879
  }
2887
- declare interface gpuGPUDepthStencilState {
2880
+ interface GPUDepthStencilState {
2888
2881
  format: string;
2889
2882
  depthWriteEnabled: boolean;
2890
2883
  depthCompare: string;
2891
- stencilFront?: gpuGPUStencilFaceState;
2892
- stencilBack?: gpuGPUStencilFaceState;
2884
+ stencilFront?: GPUStencilFaceState;
2885
+ stencilBack?: GPUStencilFaceState;
2893
2886
  stencilReadMask?: number;
2894
2887
  stencilWriteMask?: number;
2895
2888
  depthBias?: number;
2896
2889
  depthBiasSlopeScale?: number;
2897
2890
  depthBiasClamp?: number;
2898
2891
  }
2899
- declare interface gpuGPUMultisampleState {
2892
+ interface GPUMultisampleState {
2900
2893
  count?: number;
2901
2894
  mask?: number;
2902
2895
  alphaToCoverageEnabled?: boolean;
2903
2896
  }
2904
- declare interface gpuGPUFragmentState {
2905
- module: gpuGPUShaderModule;
2897
+ interface GPUFragmentState {
2898
+ module: GPUShaderModule;
2906
2899
  entryPoint: string;
2907
2900
  constants?: Record<string, number>;
2908
- targets: gpuGPUColorTargetState[];
2901
+ targets: GPUColorTargetState[];
2909
2902
  }
2910
- declare interface gpuGPUColorTargetState {
2903
+ interface GPUColorTargetState {
2911
2904
  format: string;
2912
- blend: gpuGPUBlendState;
2905
+ blend: GPUBlendState;
2913
2906
  writeMask?: number;
2914
2907
  }
2915
- declare interface gpuGPUBlendState {
2916
- color: gpuGPUBlendComponent;
2917
- alpha: gpuGPUBlendComponent;
2908
+ interface GPUBlendState {
2909
+ color: GPUBlendComponent;
2910
+ alpha: GPUBlendComponent;
2918
2911
  }
2919
- declare interface gpuGPUBlendComponent {
2912
+ interface GPUBlendComponent {
2920
2913
  operation?: string;
2921
2914
  srcFactor?: string;
2922
2915
  dstFactor?: string;
2923
2916
  }
2924
- declare interface gpuGPURenderPassEncoder {
2925
- setPipeline(pipeline: gpuGPURenderPipeline): void;
2917
+ interface GPURenderPassEncoder {
2918
+ setPipeline(pipeline: GPURenderPipeline): void;
2926
2919
  draw(
2927
2920
  vertexCount: number,
2928
2921
  instanceCount?: number,
@@ -2931,30 +2924,30 @@ declare interface gpuGPURenderPassEncoder {
2931
2924
  ): void;
2932
2925
  end(): void;
2933
2926
  }
2934
- declare interface gpuGPURenderPassDescriptor {
2927
+ interface GPURenderPassDescriptor {
2935
2928
  label?: string;
2936
- colorAttachments: gpuGPURenderPassColorAttachment[];
2937
- depthStencilAttachment?: gpuGPURenderPassDepthStencilAttachment;
2938
- occlusionQuerySet?: gpuGPUQuerySet;
2939
- timestampWrites?: gpuGPURenderPassTimestampWrites;
2929
+ colorAttachments: GPURenderPassColorAttachment[];
2930
+ depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
2931
+ occlusionQuerySet?: GPUQuerySet;
2932
+ timestampWrites?: GPURenderPassTimestampWrites;
2940
2933
  maxDrawCount?: number | bigint;
2941
2934
  }
2942
- declare interface gpuGPURenderPassColorAttachment {
2943
- view: gpuGPUTextureView;
2935
+ interface GPURenderPassColorAttachment {
2936
+ view: GPUTextureView;
2944
2937
  depthSlice?: number;
2945
- resolveTarget?: gpuGPUTextureView;
2946
- clearValue?: number[] | gpuGPUColorDict;
2938
+ resolveTarget?: GPUTextureView;
2939
+ clearValue?: number[] | GPUColorDict;
2947
2940
  loadOp: string;
2948
2941
  storeOp: string;
2949
2942
  }
2950
- declare interface gpuGPUColorDict {
2943
+ interface GPUColorDict {
2951
2944
  r: number;
2952
2945
  g: number;
2953
2946
  b: number;
2954
2947
  a: number;
2955
2948
  }
2956
- declare interface gpuGPURenderPassDepthStencilAttachment {
2957
- view: gpuGPUTextureView;
2949
+ interface GPURenderPassDepthStencilAttachment {
2950
+ view: GPUTextureView;
2958
2951
  depthClearValue?: number;
2959
2952
  depthLoadOp?: string;
2960
2953
  depthStoreOp?: string;
@@ -2964,32 +2957,79 @@ declare interface gpuGPURenderPassDepthStencilAttachment {
2964
2957
  stencilStoreOp?: string;
2965
2958
  stencilReadOnly?: boolean;
2966
2959
  }
2967
- declare interface gpuGPURenderPassTimestampWrites {
2968
- querySet: gpuGPUQuerySet;
2960
+ interface GPURenderPassTimestampWrites {
2961
+ querySet: GPUQuerySet;
2969
2962
  beginningOfPassWriteIndex?: number;
2970
2963
  endOfPassWriteIndex?: number;
2971
2964
  }
2972
- declare interface gpuGPUImageCopyTexture {
2973
- texture: gpuGPUTexture;
2965
+ interface GPUImageCopyTexture {
2966
+ texture: GPUTexture;
2974
2967
  mipLevel?: number;
2975
- origin?: number[] | gpuGPUOrigin3DDict;
2968
+ origin?: number[] | GPUOrigin3DDict;
2976
2969
  aspect?: string;
2977
2970
  }
2978
- declare interface gpuGPUImageCopyBuffer {
2979
- buffer: gpuGPUBuffer;
2971
+ interface GPUImageCopyBuffer {
2972
+ buffer: GPUBuffer;
2980
2973
  offset?: number | bigint;
2981
2974
  bytesPerRow?: number;
2982
2975
  rowsPerImage?: number;
2983
2976
  }
2984
- declare interface gpuGPUOrigin3DDict {
2977
+ interface GPUOrigin3DDict {
2985
2978
  x?: number;
2986
2979
  y?: number;
2987
2980
  z?: number;
2988
2981
  }
2989
- declare type AiImageClassificationInput = {
2982
+ declare class EventSource {
2983
+ constructor(url: string, init?: EventSourceEventSourceInit);
2984
+ /**
2985
+ * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
2986
+ *
2987
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
2988
+ */
2989
+ close(): void;
2990
+ /**
2991
+ * Returns the URL providing the event stream.
2992
+ *
2993
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
2994
+ */
2995
+ get url(): string;
2996
+ /**
2997
+ * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
2998
+ *
2999
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
3000
+ */
3001
+ get withCredentials(): boolean;
3002
+ /**
3003
+ * Returns the state of this EventSource object's connection. It can have the values described below.
3004
+ *
3005
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
3006
+ */
3007
+ get readyState(): number;
3008
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3009
+ get onopen(): any | null;
3010
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/open_event) */
3011
+ set onopen(value: any | null);
3012
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3013
+ get onmessage(): any | null;
3014
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/message_event) */
3015
+ set onmessage(value: any | null);
3016
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3017
+ get onerror(): any | null;
3018
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/error_event) */
3019
+ set onerror(value: any | null);
3020
+ static readonly CONNECTING: number;
3021
+ static readonly OPEN: number;
3022
+ static readonly CLOSED: number;
3023
+ static from(stream: ReadableStream): EventSource;
3024
+ }
3025
+ interface EventSourceEventSourceInit {
3026
+ withCredentials?: boolean;
3027
+ fetcher?: Fetcher;
3028
+ }
3029
+ type AiImageClassificationInput = {
2990
3030
  image: number[];
2991
3031
  };
2992
- declare type AiImageClassificationOutput = {
3032
+ type AiImageClassificationOutput = {
2993
3033
  score?: number;
2994
3034
  label?: string;
2995
3035
  }[];
@@ -2997,7 +3037,7 @@ declare abstract class BaseAiImageClassification {
2997
3037
  inputs: AiImageClassificationInput;
2998
3038
  postProcessedOutputs: AiImageClassificationOutput;
2999
3039
  }
3000
- declare type AiImageToTextInput = {
3040
+ type AiImageToTextInput = {
3001
3041
  image: number[];
3002
3042
  prompt?: string;
3003
3043
  max_tokens?: number;
@@ -3011,17 +3051,17 @@ declare type AiImageToTextInput = {
3011
3051
  raw?: boolean;
3012
3052
  messages?: RoleScopedChatInput[];
3013
3053
  };
3014
- declare type AiImageToTextOutput = {
3054
+ type AiImageToTextOutput = {
3015
3055
  description: string;
3016
3056
  };
3017
3057
  declare abstract class BaseAiImageToText {
3018
3058
  inputs: AiImageToTextInput;
3019
3059
  postProcessedOutputs: AiImageToTextOutput;
3020
3060
  }
3021
- declare type AiObjectDetectionInput = {
3061
+ type AiObjectDetectionInput = {
3022
3062
  image: number[];
3023
3063
  };
3024
- declare type AiObjectDetectionOutput = {
3064
+ type AiObjectDetectionOutput = {
3025
3065
  score?: number;
3026
3066
  label?: string;
3027
3067
  }[];
@@ -3029,19 +3069,19 @@ declare abstract class BaseAiObjectDetection {
3029
3069
  inputs: AiObjectDetectionInput;
3030
3070
  postProcessedOutputs: AiObjectDetectionOutput;
3031
3071
  }
3032
- declare type AiSentenceSimilarityInput = {
3072
+ type AiSentenceSimilarityInput = {
3033
3073
  source: string;
3034
3074
  sentences: string[];
3035
3075
  };
3036
- declare type AiSentenceSimilarityOutput = number[];
3076
+ type AiSentenceSimilarityOutput = number[];
3037
3077
  declare abstract class BaseAiSentenceSimilarity {
3038
3078
  inputs: AiSentenceSimilarityInput;
3039
3079
  postProcessedOutputs: AiSentenceSimilarityOutput;
3040
3080
  }
3041
- declare type AiSpeechRecognitionInput = {
3081
+ type AiSpeechRecognitionInput = {
3042
3082
  audio: number[];
3043
3083
  };
3044
- declare type AiSpeechRecognitionOutput = {
3084
+ type AiSpeechRecognitionOutput = {
3045
3085
  text?: string;
3046
3086
  words?: {
3047
3087
  word: string;
@@ -3054,21 +3094,21 @@ declare abstract class BaseAiSpeechRecognition {
3054
3094
  inputs: AiSpeechRecognitionInput;
3055
3095
  postProcessedOutputs: AiSpeechRecognitionOutput;
3056
3096
  }
3057
- declare type AiSummarizationInput = {
3097
+ type AiSummarizationInput = {
3058
3098
  input_text: string;
3059
3099
  max_length?: number;
3060
3100
  };
3061
- declare type AiSummarizationOutput = {
3101
+ type AiSummarizationOutput = {
3062
3102
  summary: string;
3063
3103
  };
3064
3104
  declare abstract class BaseAiSummarization {
3065
3105
  inputs: AiSummarizationInput;
3066
3106
  postProcessedOutputs: AiSummarizationOutput;
3067
3107
  }
3068
- declare type AiTextClassificationInput = {
3108
+ type AiTextClassificationInput = {
3069
3109
  text: string;
3070
3110
  };
3071
- declare type AiTextClassificationOutput = {
3111
+ type AiTextClassificationOutput = {
3072
3112
  score?: number;
3073
3113
  label?: string;
3074
3114
  }[];
@@ -3076,10 +3116,10 @@ declare abstract class BaseAiTextClassification {
3076
3116
  inputs: AiTextClassificationInput;
3077
3117
  postProcessedOutputs: AiTextClassificationOutput;
3078
3118
  }
3079
- declare type AiTextEmbeddingsInput = {
3119
+ type AiTextEmbeddingsInput = {
3080
3120
  text: string | string[];
3081
3121
  };
3082
- declare type AiTextEmbeddingsOutput = {
3122
+ type AiTextEmbeddingsOutput = {
3083
3123
  shape: number[];
3084
3124
  data: number[][];
3085
3125
  };
@@ -3087,11 +3127,11 @@ declare abstract class BaseAiTextEmbeddings {
3087
3127
  inputs: AiTextEmbeddingsInput;
3088
3128
  postProcessedOutputs: AiTextEmbeddingsOutput;
3089
3129
  }
3090
- declare type RoleScopedChatInput = {
3130
+ type RoleScopedChatInput = {
3091
3131
  role: "user" | "assistant" | "system" | "tool";
3092
3132
  content: string;
3093
3133
  };
3094
- declare type AiTextGenerationToolInput = {
3134
+ type AiTextGenerationToolInput = {
3095
3135
  type: "function";
3096
3136
  function: {
3097
3137
  name: string;
@@ -3108,7 +3148,7 @@ declare type AiTextGenerationToolInput = {
3108
3148
  };
3109
3149
  };
3110
3150
  };
3111
- declare type AiTextGenerationInput = {
3151
+ type AiTextGenerationInput = {
3112
3152
  prompt?: string;
3113
3153
  raw?: boolean;
3114
3154
  stream?: boolean;
@@ -3123,7 +3163,7 @@ declare type AiTextGenerationInput = {
3123
3163
  messages?: RoleScopedChatInput[];
3124
3164
  tools?: AiTextGenerationToolInput[];
3125
3165
  };
3126
- declare type AiTextGenerationOutput =
3166
+ type AiTextGenerationOutput =
3127
3167
  | {
3128
3168
  response?: string;
3129
3169
  tool_calls?: {
@@ -3136,7 +3176,7 @@ declare abstract class BaseAiTextGeneration {
3136
3176
  inputs: AiTextGenerationInput;
3137
3177
  postProcessedOutputs: AiTextGenerationOutput;
3138
3178
  }
3139
- declare type AiTextToImageInput = {
3179
+ type AiTextToImageInput = {
3140
3180
  prompt: string;
3141
3181
  image?: number[];
3142
3182
  mask?: number[];
@@ -3144,53 +3184,52 @@ declare type AiTextToImageInput = {
3144
3184
  strength?: number;
3145
3185
  guidance?: number;
3146
3186
  };
3147
- declare type AiTextToImageOutput = Uint8Array;
3187
+ type AiTextToImageOutput = Uint8Array;
3148
3188
  declare abstract class BaseAiTextToImage {
3149
3189
  inputs: AiTextToImageInput;
3150
3190
  postProcessedOutputs: AiTextToImageOutput;
3151
3191
  }
3152
- declare type AiTranslationInput = {
3192
+ type AiTranslationInput = {
3153
3193
  text: string;
3154
3194
  target_lang: string;
3155
3195
  source_lang?: string;
3156
3196
  };
3157
- declare type AiTranslationOutput = {
3197
+ type AiTranslationOutput = {
3158
3198
  translated_text?: string;
3159
3199
  };
3160
3200
  declare abstract class BaseAiTranslation {
3161
3201
  inputs: AiTranslationInput;
3162
3202
  postProcessedOutputs: AiTranslationOutput;
3163
3203
  }
3164
- declare type GatewayOptions = {
3204
+ type GatewayOptions = {
3165
3205
  id: string;
3166
3206
  cacheTtl?: number;
3167
3207
  skipCache?: boolean;
3168
3208
  metadata?: Record<string, number | string | boolean | null | bigint>;
3169
3209
  };
3170
- declare type AiOptions = {
3210
+ type AiOptions = {
3171
3211
  gateway?: GatewayOptions;
3172
3212
  prefix?: string;
3173
3213
  extraHeaders?: object;
3174
3214
  };
3175
- declare type BaseAiTextClassificationModels =
3176
- "@cf/huggingface/distilbert-sst-2-int8";
3177
- declare type BaseAiTextToImageModels =
3215
+ type BaseAiTextClassificationModels = "@cf/huggingface/distilbert-sst-2-int8";
3216
+ type BaseAiTextToImageModels =
3178
3217
  | "@cf/stabilityai/stable-diffusion-xl-base-1.0"
3179
3218
  | "@cf/runwayml/stable-diffusion-v1-5-inpainting"
3180
3219
  | "@cf/runwayml/stable-diffusion-v1-5-img2img"
3181
3220
  | "@cf/lykon/dreamshaper-8-lcm"
3182
3221
  | "@cf/bytedance/stable-diffusion-xl-lightning";
3183
- declare type BaseAiTextEmbeddingsModels =
3222
+ type BaseAiTextEmbeddingsModels =
3184
3223
  | "@cf/baai/bge-small-en-v1.5"
3185
3224
  | "@cf/baai/bge-base-en-v1.5"
3186
3225
  | "@cf/baai/bge-large-en-v1.5";
3187
- declare type BaseAiSpeechRecognitionModels =
3226
+ type BaseAiSpeechRecognitionModels =
3188
3227
  | "@cf/openai/whisper"
3189
3228
  | "@cf/openai/whisper-tiny-en"
3190
3229
  | "@cf/openai/whisper-sherpa";
3191
- declare type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
3192
- declare type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
3193
- declare type BaseAiTextGenerationModels =
3230
+ type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
3231
+ type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
3232
+ type BaseAiTextGenerationModels =
3194
3233
  | "@cf/meta/llama-3-8b-instruct"
3195
3234
  | "@cf/meta/llama-3-8b-instruct-awq"
3196
3235
  | "@cf/meta/llama-2-7b-chat-int8"
@@ -3226,9 +3265,9 @@ declare type BaseAiTextGenerationModels =
3226
3265
  | "@cf/meta-llama/llama-2-7b-chat-hf-lora"
3227
3266
  | "@cf/fblgit/una-cybertron-7b-v2-bf16"
3228
3267
  | "@cf/fblgit/una-cybertron-7b-v2-awq";
3229
- declare type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
3230
- declare type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
3231
- declare type BaseAiImageToTextModels =
3268
+ type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
3269
+ type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
3270
+ type BaseAiImageToTextModels =
3232
3271
  | "@cf/unum/uform-gen2-qwen-500m"
3233
3272
  | "@cf/llava-hf/llava-1.5-7b-hf";
3234
3273
  declare abstract class Ai {
@@ -3283,7 +3322,7 @@ declare abstract class Ai {
3283
3322
  options?: AiOptions,
3284
3323
  ): Promise<BaseAiImageToText["postProcessedOutputs"]>;
3285
3324
  }
3286
- declare interface BasicImageTransformations {
3325
+ interface BasicImageTransformations {
3287
3326
  /**
3288
3327
  * Maximum width in image pixels. The value must be an integer.
3289
3328
  */
@@ -3349,7 +3388,7 @@ declare interface BasicImageTransformations {
3349
3388
  */
3350
3389
  rotate?: 0 | 90 | 180 | 270 | 360;
3351
3390
  }
3352
- declare interface BasicImageTransformationsGravityCoordinates {
3391
+ interface BasicImageTransformationsGravityCoordinates {
3353
3392
  x: number;
3354
3393
  y: number;
3355
3394
  }
@@ -3362,7 +3401,7 @@ declare interface BasicImageTransformationsGravityCoordinates {
3362
3401
  * Note: Currently, these properties cannot be tested in the
3363
3402
  * playground.
3364
3403
  */
3365
- declare interface RequestInitCfProperties extends Record<string, unknown> {
3404
+ interface RequestInitCfProperties extends Record<string, unknown> {
3366
3405
  cacheEverything?: boolean;
3367
3406
  /**
3368
3407
  * A request's cache key is what determines if two requests are
@@ -3413,8 +3452,7 @@ declare interface RequestInitCfProperties extends Record<string, unknown> {
3413
3452
  */
3414
3453
  resolveOverride?: string;
3415
3454
  }
3416
- declare interface RequestInitCfPropertiesImageDraw
3417
- extends BasicImageTransformations {
3455
+ interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
3418
3456
  /**
3419
3457
  * Absolute URL of the image file to use for the drawing. It can be any of
3420
3458
  * the supported file formats. For drawing of watermarks or non-rectangular
@@ -3451,8 +3489,7 @@ declare interface RequestInitCfPropertiesImageDraw
3451
3489
  bottom?: number;
3452
3490
  right?: number;
3453
3491
  }
3454
- declare interface RequestInitCfPropertiesImage
3455
- extends BasicImageTransformations {
3492
+ interface RequestInitCfPropertiesImage extends BasicImageTransformations {
3456
3493
  /**
3457
3494
  * Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
3458
3495
  * easier to specify higher-DPI sizes in <img srcset>.
@@ -3577,12 +3614,12 @@ declare interface RequestInitCfPropertiesImage
3577
3614
  */
3578
3615
  compression?: "fast";
3579
3616
  }
3580
- declare interface RequestInitCfPropertiesImageMinify {
3617
+ interface RequestInitCfPropertiesImageMinify {
3581
3618
  javascript?: boolean;
3582
3619
  css?: boolean;
3583
3620
  html?: boolean;
3584
3621
  }
3585
- declare interface RequestInitCfPropertiesR2 {
3622
+ interface RequestInitCfPropertiesR2 {
3586
3623
  /**
3587
3624
  * Colo id of bucket that an object is stored in
3588
3625
  */
@@ -3591,14 +3628,13 @@ declare interface RequestInitCfPropertiesR2 {
3591
3628
  /**
3592
3629
  * Request metadata provided by Cloudflare's edge.
3593
3630
  */
3594
- declare type IncomingRequestCfProperties<HostMetadata = unknown> =
3631
+ type IncomingRequestCfProperties<HostMetadata = unknown> =
3595
3632
  IncomingRequestCfPropertiesBase &
3596
3633
  IncomingRequestCfPropertiesBotManagementEnterprise &
3597
3634
  IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
3598
3635
  IncomingRequestCfPropertiesGeographicInformation &
3599
3636
  IncomingRequestCfPropertiesCloudflareAccessOrApiShield;
3600
- declare interface IncomingRequestCfPropertiesBase
3601
- extends Record<string, unknown> {
3637
+ interface IncomingRequestCfPropertiesBase extends Record<string, unknown> {
3602
3638
  /**
3603
3639
  * [ASN](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) of the incoming request.
3604
3640
  *
@@ -3676,7 +3712,7 @@ declare interface IncomingRequestCfPropertiesBase
3676
3712
  */
3677
3713
  tlsExportedAuthenticator?: IncomingRequestCfPropertiesExportedAuthenticatorMetadata;
3678
3714
  }
3679
- declare interface IncomingRequestCfPropertiesBotManagementBase {
3715
+ interface IncomingRequestCfPropertiesBotManagementBase {
3680
3716
  /**
3681
3717
  * Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
3682
3718
  * represented as an integer percentage between `1` (almost certainly a bot) and `99` (almost certainly human).
@@ -3703,7 +3739,7 @@ declare interface IncomingRequestCfPropertiesBotManagementBase {
3703
3739
  */
3704
3740
  detectionIds: number[];
3705
3741
  }
3706
- declare interface IncomingRequestCfPropertiesBotManagement {
3742
+ interface IncomingRequestCfPropertiesBotManagement {
3707
3743
  /**
3708
3744
  * Results of Cloudflare's Bot Management analysis
3709
3745
  */
@@ -3715,7 +3751,7 @@ declare interface IncomingRequestCfPropertiesBotManagement {
3715
3751
  */
3716
3752
  clientTrustScore: number;
3717
3753
  }
3718
- declare interface IncomingRequestCfPropertiesBotManagementEnterprise
3754
+ interface IncomingRequestCfPropertiesBotManagementEnterprise
3719
3755
  extends IncomingRequestCfPropertiesBotManagement {
3720
3756
  /**
3721
3757
  * Results of Cloudflare's Bot Management analysis
@@ -3728,9 +3764,7 @@ declare interface IncomingRequestCfPropertiesBotManagementEnterprise
3728
3764
  ja3Hash: string;
3729
3765
  };
3730
3766
  }
3731
- declare interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<
3732
- HostMetadata,
3733
- > {
3767
+ interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> {
3734
3768
  /**
3735
3769
  * Custom metadata set per-host in [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/).
3736
3770
  *
@@ -3739,7 +3773,7 @@ declare interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<
3739
3773
  */
3740
3774
  hostMetadata: HostMetadata;
3741
3775
  }
3742
- declare interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
3776
+ interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
3743
3777
  /**
3744
3778
  * Information about the client certificate presented to Cloudflare.
3745
3779
  *
@@ -3761,7 +3795,7 @@ declare interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
3761
3795
  /**
3762
3796
  * Metadata about the request's TLS handshake
3763
3797
  */
3764
- declare interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
3798
+ interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
3765
3799
  /**
3766
3800
  * The client's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal
3767
3801
  *
@@ -3790,7 +3824,7 @@ declare interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
3790
3824
  /**
3791
3825
  * Geographic data about the request's origin.
3792
3826
  */
3793
- declare interface IncomingRequestCfPropertiesGeographicInformation {
3827
+ interface IncomingRequestCfPropertiesGeographicInformation {
3794
3828
  /**
3795
3829
  * The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from.
3796
3830
  *
@@ -3867,7 +3901,7 @@ declare interface IncomingRequestCfPropertiesGeographicInformation {
3867
3901
  metroCode?: string;
3868
3902
  }
3869
3903
  /** Data about the incoming request's TLS certificate */
3870
- declare interface IncomingRequestCfPropertiesTLSClientAuth {
3904
+ interface IncomingRequestCfPropertiesTLSClientAuth {
3871
3905
  /** Always `"1"`, indicating that the certificate was presented */
3872
3906
  certPresented: "1";
3873
3907
  /**
@@ -3960,7 +3994,7 @@ declare interface IncomingRequestCfPropertiesTLSClientAuth {
3960
3994
  certNotAfter: string;
3961
3995
  }
3962
3996
  /** Placeholder values for TLS Client Authorization */
3963
- declare interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
3997
+ interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
3964
3998
  certPresented: "0";
3965
3999
  certVerified: "NONE";
3966
4000
  certRevoked: "0";
@@ -4258,10 +4292,10 @@ declare type Iso3166Alpha2Code =
4258
4292
  | "ZW";
4259
4293
  /** The 2-letter continent codes Cloudflare uses */
4260
4294
  declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
4261
- declare type CfProperties<HostMetadata = unknown> =
4295
+ type CfProperties<HostMetadata = unknown> =
4262
4296
  | IncomingRequestCfProperties<HostMetadata>
4263
4297
  | RequestInitCfProperties;
4264
- declare interface D1Meta {
4298
+ interface D1Meta {
4265
4299
  duration: number;
4266
4300
  size_after: number;
4267
4301
  rows_read: number;
@@ -4270,15 +4304,15 @@ declare interface D1Meta {
4270
4304
  changed_db: boolean;
4271
4305
  changes: number;
4272
4306
  }
4273
- declare interface D1Response {
4307
+ interface D1Response {
4274
4308
  success: true;
4275
4309
  meta: D1Meta & Record<string, unknown>;
4276
4310
  error?: never;
4277
4311
  }
4278
- declare type D1Result<T = unknown> = D1Response & {
4312
+ type D1Result<T = unknown> = D1Response & {
4279
4313
  results: T[];
4280
4314
  };
4281
- declare interface D1ExecResult {
4315
+ interface D1ExecResult {
4282
4316
  count: number;
4283
4317
  duration: number;
4284
4318
  }
@@ -4305,11 +4339,11 @@ declare abstract class D1PreparedStatement {
4305
4339
  // but this will ensure type checking on older versions still passes.
4306
4340
  // TypeScript's interface merging will ensure our empty interface is effectively
4307
4341
  // ignored when `Disposable` is included in the standard lib.
4308
- declare interface Disposable {}
4342
+ interface Disposable {}
4309
4343
  /**
4310
4344
  * An email message that can be sent from a Worker.
4311
4345
  */
4312
- declare interface EmailMessage {
4346
+ interface EmailMessage {
4313
4347
  /**
4314
4348
  * Envelope From attribute of the email message.
4315
4349
  */
@@ -4322,7 +4356,7 @@ declare interface EmailMessage {
4322
4356
  /**
4323
4357
  * An email message that is sent to a consumer Worker and can be rejected/forwarded.
4324
4358
  */
4325
- declare interface ForwardableEmailMessage extends EmailMessage {
4359
+ interface ForwardableEmailMessage extends EmailMessage {
4326
4360
  /**
4327
4361
  * Stream of the email message content.
4328
4362
  */
@@ -4352,7 +4386,7 @@ declare interface ForwardableEmailMessage extends EmailMessage {
4352
4386
  /**
4353
4387
  * A binding that allows a Worker to send email messages.
4354
4388
  */
4355
- declare interface SendEmail {
4389
+ interface SendEmail {
4356
4390
  send(message: EmailMessage): Promise<void>;
4357
4391
  }
4358
4392
  declare abstract class EmailEvent extends ExtendableEvent {
@@ -4370,7 +4404,7 @@ declare module "cloudflare:email" {
4370
4404
  };
4371
4405
  export { _EmailMessage as EmailMessage };
4372
4406
  }
4373
- declare interface Hyperdrive {
4407
+ interface Hyperdrive {
4374
4408
  /**
4375
4409
  * Connect directly to Hyperdrive as if it's your database, returning a TCP socket.
4376
4410
  *
@@ -4417,8 +4451,8 @@ declare interface Hyperdrive {
4417
4451
  */
4418
4452
  readonly database: string;
4419
4453
  }
4420
- declare type Params<P extends string = any> = Record<P, string | string[]>;
4421
- declare type EventContext<Env, P extends string, Data> = {
4454
+ type Params<P extends string = any> = Record<P, string | string[]>;
4455
+ type EventContext<Env, P extends string, Data> = {
4422
4456
  request: Request<unknown, IncomingRequestCfProperties<unknown>>;
4423
4457
  functionPath: string;
4424
4458
  waitUntil: (promise: Promise<any>) => void;
@@ -4432,12 +4466,12 @@ declare type EventContext<Env, P extends string, Data> = {
4432
4466
  params: Params<P>;
4433
4467
  data: Data;
4434
4468
  };
4435
- declare type PagesFunction<
4469
+ type PagesFunction<
4436
4470
  Env = unknown,
4437
4471
  Params extends string = any,
4438
4472
  Data extends Record<string, unknown> = Record<string, unknown>,
4439
4473
  > = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
4440
- declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4474
+ type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4441
4475
  request: Request<unknown, IncomingRequestCfProperties<unknown>>;
4442
4476
  functionPath: string;
4443
4477
  waitUntil: (promise: Promise<any>) => void;
@@ -4452,7 +4486,7 @@ declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
4452
4486
  data: Data;
4453
4487
  pluginArgs: PluginArgs;
4454
4488
  };
4455
- declare type PagesPluginFunction<
4489
+ type PagesPluginFunction<
4456
4490
  Env = unknown,
4457
4491
  Params extends string = any,
4458
4492
  Data extends Record<string, unknown> = Record<string, unknown>,
@@ -4467,7 +4501,7 @@ declare module "assets:*" {
4467
4501
  // The message includes metadata about the broker, the client, and the payload
4468
4502
  // itself.
4469
4503
  // https://developers.cloudflare.com/pub-sub/
4470
- declare interface PubSubMessage {
4504
+ interface PubSubMessage {
4471
4505
  // Message ID
4472
4506
  readonly mid: number;
4473
4507
  // MQTT broker FQDN in the form mqtts://BROKER.NAMESPACE.cloudflarepubsub.com:PORT
@@ -4493,10 +4527,24 @@ declare interface PubSubMessage {
4493
4527
  payload: string | Uint8Array;
4494
4528
  }
4495
4529
  // JsonWebKey extended by kid parameter
4496
- declare interface JsonWebKeyWithKid extends JsonWebKey {
4530
+ interface JsonWebKeyWithKid extends JsonWebKey {
4497
4531
  // Key Identifier of the JWK
4498
4532
  readonly kid: string;
4499
4533
  }
4534
+ interface RateLimitOptions {
4535
+ key: string;
4536
+ }
4537
+ interface RateLimitOutcome {
4538
+ success: boolean;
4539
+ }
4540
+ interface RateLimit {
4541
+ /**
4542
+ * Rate limit a request based on the provided options.
4543
+ * @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
4544
+ * @returns A promise that resolves with the outcome of the rate limit.
4545
+ */
4546
+ limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
4547
+ }
4500
4548
  // Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
4501
4549
  // to referenced by `Fetcher`. This is included in the "importable" version of the types which
4502
4550
  // strips all `module` blocks.
@@ -4704,19 +4752,15 @@ declare module "cloudflare:sockets" {
4704
4752
  /**
4705
4753
  * Data types supported for holding vector metadata.
4706
4754
  */
4707
- declare type VectorizeVectorMetadataValue =
4708
- | string
4709
- | number
4710
- | boolean
4711
- | string[];
4755
+ type VectorizeVectorMetadataValue = string | number | boolean | string[];
4712
4756
  /**
4713
4757
  * Additional information to associate with a vector.
4714
4758
  */
4715
- declare type VectorizeVectorMetadata =
4759
+ type VectorizeVectorMetadata =
4716
4760
  | VectorizeVectorMetadataValue
4717
4761
  | Record<string, VectorizeVectorMetadataValue>;
4718
- declare type VectorFloatArray = Float32Array | Float64Array;
4719
- declare interface VectorizeError {
4762
+ type VectorFloatArray = Float32Array | Float64Array;
4763
+ interface VectorizeError {
4720
4764
  code?: number;
4721
4765
  error: string;
4722
4766
  }
@@ -4725,11 +4769,11 @@ declare interface VectorizeError {
4725
4769
  *
4726
4770
  * This list is expected to grow as support for more operations are released.
4727
4771
  */
4728
- declare type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
4772
+ type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
4729
4773
  /**
4730
4774
  * Filter criteria for vector metadata used to limit the retrieved query result set.
4731
4775
  */
4732
- declare type VectorizeVectorMetadataFilter = {
4776
+ type VectorizeVectorMetadataFilter = {
4733
4777
  [field: string]:
4734
4778
  | Exclude<VectorizeVectorMetadataValue, string[]>
4735
4779
  | null
@@ -4744,8 +4788,8 @@ declare type VectorizeVectorMetadataFilter = {
4744
4788
  * Supported distance metrics for an index.
4745
4789
  * Distance metrics determine how other "similar" vectors are determined.
4746
4790
  */
4747
- declare type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
4748
- declare interface VectorizeQueryOptions {
4791
+ type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
4792
+ interface VectorizeQueryOptions {
4749
4793
  topK?: number;
4750
4794
  namespace?: string;
4751
4795
  returnValues?: boolean;
@@ -4755,7 +4799,7 @@ declare interface VectorizeQueryOptions {
4755
4799
  /**
4756
4800
  * Information about the configuration of an index.
4757
4801
  */
4758
- declare type VectorizeIndexConfig =
4802
+ type VectorizeIndexConfig =
4759
4803
  | {
4760
4804
  dimensions: number;
4761
4805
  metric: VectorizeDistanceMetric;
@@ -4766,7 +4810,7 @@ declare type VectorizeIndexConfig =
4766
4810
  /**
4767
4811
  * Metadata about an existing index.
4768
4812
  */
4769
- declare interface VectorizeIndexDetails {
4813
+ interface VectorizeIndexDetails {
4770
4814
  /** The unique ID of the index */
4771
4815
  readonly id: string;
4772
4816
  /** The name of the index. */
@@ -4781,7 +4825,7 @@ declare interface VectorizeIndexDetails {
4781
4825
  /**
4782
4826
  * Represents a single vector value set along with its associated metadata.
4783
4827
  */
4784
- declare interface VectorizeVector {
4828
+ interface VectorizeVector {
4785
4829
  /** 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. */
4786
4830
  id: string;
4787
4831
  /** The vector values */
@@ -4794,7 +4838,7 @@ declare interface VectorizeVector {
4794
4838
  /**
4795
4839
  * Represents a matched vector for a query along with its score and (if specified) the matching vector information.
4796
4840
  */
4797
- declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
4841
+ type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
4798
4842
  Omit<VectorizeVector, "values"> & {
4799
4843
  /** The score or rank for similarity, when returned as a result */
4800
4844
  score: number;
@@ -4802,7 +4846,7 @@ declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
4802
4846
  /**
4803
4847
  * A set of vector {@link VectorizeMatch} for a particular query.
4804
4848
  */
4805
- declare interface VectorizeMatches {
4849
+ interface VectorizeMatches {
4806
4850
  matches: VectorizeMatch[];
4807
4851
  count: number;
4808
4852
  }
@@ -4810,7 +4854,7 @@ declare interface VectorizeMatches {
4810
4854
  * Results of an operation that performed a mutation on a set of vectors.
4811
4855
  * Here, `ids` is a list of vectors that were successfully processed.
4812
4856
  */
4813
- declare interface VectorizeVectorMutation {
4857
+ interface VectorizeVectorMutation {
4814
4858
  /* List of ids of vectors that were successfully processed. */
4815
4859
  ids: string[];
4816
4860
  /* Total count of the number of processed vectors. */
@@ -4821,7 +4865,7 @@ declare interface VectorizeVectorMutation {
4821
4865
  * with the v2 version of Vectorize.
4822
4866
  * Here, `mutationId` is the identifier for the last mutation processed by Vectorize.
4823
4867
  */
4824
- declare interface VectorizeVectorMutationV2 {
4868
+ interface VectorizeVectorMutationV2 {
4825
4869
  /* The identifier for the last mutation processed by Vectorize. */
4826
4870
  mutationId: string;
4827
4871
  }
@@ -4870,7 +4914,7 @@ declare abstract class VectorizeIndex {
4870
4914
  * The interface for "version_metadata" binding
4871
4915
  * providing metadata about the Worker Version using this binding.
4872
4916
  */
4873
- declare type WorkerVersionMetadata = {
4917
+ type WorkerVersionMetadata = {
4874
4918
  /** The ID of the Worker Version using this binding */
4875
4919
  id: string;
4876
4920
  /** The tag of the Worker Version using this binding */
@@ -4878,7 +4922,7 @@ declare type WorkerVersionMetadata = {
4878
4922
  /** The timestamp of when the Worker Version was uploaded */
4879
4923
  timestamp: string;
4880
4924
  };
4881
- declare interface DynamicDispatchLimits {
4925
+ interface DynamicDispatchLimits {
4882
4926
  /**
4883
4927
  * Limit CPU time in milliseconds.
4884
4928
  */
@@ -4888,7 +4932,7 @@ declare interface DynamicDispatchLimits {
4888
4932
  */
4889
4933
  subRequests?: number;
4890
4934
  }
4891
- declare interface DynamicDispatchOptions {
4935
+ interface DynamicDispatchOptions {
4892
4936
  /**
4893
4937
  * Limit resources of invoked Worker script.
4894
4938
  */
@@ -4900,7 +4944,7 @@ declare interface DynamicDispatchOptions {
4900
4944
  [key: string]: any;
4901
4945
  };
4902
4946
  }
4903
- declare interface DispatchNamespace {
4947
+ interface DispatchNamespace {
4904
4948
  /**
4905
4949
  * @param name Name of the Worker script.
4906
4950
  * @param args Arguments to Worker script.