@cloudflare/workers-types 4.20250403.0 → 4.20250404.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.
@@ -1253,7 +1253,7 @@ declare class DigestStream extends WritableStream<
1253
1253
  ArrayBuffer | ArrayBufferView
1254
1254
  > {
1255
1255
  constructor(algorithm: string | SubtleCryptoHashAlgorithm);
1256
- readonly digest: Promise<ArrayBuffer | ArrayBufferView>;
1256
+ readonly digest: Promise<ArrayBuffer>;
1257
1257
  get bytesWritten(): number | bigint;
1258
1258
  }
1259
1259
  /**
@@ -1262,7 +1262,7 @@ declare class DigestStream extends WritableStream<
1262
1262
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1263
1263
  */
1264
1264
  declare class TextDecoder {
1265
- constructor(decoder?: string, options?: TextDecoderConstructorOptions);
1265
+ constructor(label?: string, options?: TextDecoderConstructorOptions);
1266
1266
  /**
1267
1267
  * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
1268
1268
  *
@@ -3072,7 +3072,7 @@ interface GPUCommandEncoder {
3072
3072
  destinationOffset: number | bigint,
3073
3073
  size: number | bigint,
3074
3074
  ): void;
3075
- finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3075
+ finish(param1?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3076
3076
  copyTextureToBuffer(
3077
3077
  source: GPUImageCopyTexture,
3078
3078
  destination: GPUImageCopyBuffer,
@@ -6147,19 +6147,7 @@ declare namespace Rpc {
6147
6147
  // serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
6148
6148
  type Serializable<T> =
6149
6149
  // Structured cloneables
6150
- | void
6151
- | undefined
6152
- | null
6153
- | boolean
6154
- | number
6155
- | bigint
6156
- | string
6157
- | TypedArray
6158
- | ArrayBuffer
6159
- | DataView
6160
- | Date
6161
- | Error
6162
- | RegExp
6150
+ | BaseType
6163
6151
  // Structured cloneable composites
6164
6152
  | Map<
6165
6153
  T extends Map<infer U, unknown> ? Serializable<U> : never,
@@ -6171,11 +6159,6 @@ declare namespace Rpc {
6171
6159
  [K in keyof T]: K extends number | string ? Serializable<T[K]> : never;
6172
6160
  }
6173
6161
  // Special types
6174
- | ReadableStream<Uint8Array>
6175
- | WritableStream<Uint8Array>
6176
- | Request
6177
- | Response
6178
- | Headers
6179
6162
  | Stub<Stubable>
6180
6163
  // Serialized as stubs, see `Stubify`
6181
6164
  | Stubable;
@@ -6186,6 +6169,26 @@ declare namespace Rpc {
6186
6169
  dup(): this;
6187
6170
  }
6188
6171
  export type Stub<T extends Stubable> = Provider<T> & StubBase<T>;
6172
+ // This represents all the types that can be sent as-is over an RPC boundary
6173
+ type BaseType =
6174
+ | void
6175
+ | undefined
6176
+ | null
6177
+ | boolean
6178
+ | number
6179
+ | bigint
6180
+ | string
6181
+ | TypedArray
6182
+ | ArrayBuffer
6183
+ | DataView
6184
+ | Date
6185
+ | Error
6186
+ | RegExp
6187
+ | ReadableStream<Uint8Array>
6188
+ | WritableStream<Uint8Array>
6189
+ | Request
6190
+ | Response
6191
+ | Headers;
6189
6192
  // Recursively rewrite all `Stubable` types with `Stub`s
6190
6193
  type Stubify<T> = T extends Stubable
6191
6194
  ? Stub<T>
@@ -6197,13 +6200,15 @@ declare namespace Rpc {
6197
6200
  ? Array<Stubify<V>>
6198
6201
  : T extends ReadonlyArray<infer V>
6199
6202
  ? ReadonlyArray<Stubify<V>>
6200
- : T extends {
6201
- [key: string | number]: any;
6202
- }
6203
- ? {
6204
- [K in keyof T]: Stubify<T[K]>;
6205
- }
6206
- : T;
6203
+ : T extends BaseType
6204
+ ? T
6205
+ : T extends {
6206
+ [key: string | number]: any;
6207
+ }
6208
+ ? {
6209
+ [K in keyof T]: Stubify<T[K]>;
6210
+ }
6211
+ : T;
6207
6212
  // Recursively rewrite all `Stub<T>`s with the corresponding `T`s.
6208
6213
  // Note we use `StubBase` instead of `Stub` here to avoid circular dependencies:
6209
6214
  // `Stub` depends on `Provider`, which depends on `Unstubify`, which would depend on `Stub`.
@@ -6218,13 +6223,15 @@ declare namespace Rpc {
6218
6223
  ? Array<Unstubify<V>>
6219
6224
  : T extends ReadonlyArray<infer V>
6220
6225
  ? ReadonlyArray<Unstubify<V>>
6221
- : T extends {
6222
- [key: string | number]: unknown;
6223
- }
6224
- ? {
6225
- [K in keyof T]: Unstubify<T[K]>;
6226
- }
6227
- : T;
6226
+ : T extends BaseType
6227
+ ? T
6228
+ : T extends {
6229
+ [key: string | number]: unknown;
6230
+ }
6231
+ ? {
6232
+ [K in keyof T]: Unstubify<T[K]>;
6233
+ }
6234
+ : T;
6228
6235
  type UnstubifyAll<A extends any[]> = {
6229
6236
  [I in keyof A]: Unstubify<A[I]>;
6230
6237
  };
@@ -1258,7 +1258,7 @@ export declare class DigestStream extends WritableStream<
1258
1258
  ArrayBuffer | ArrayBufferView
1259
1259
  > {
1260
1260
  constructor(algorithm: string | SubtleCryptoHashAlgorithm);
1261
- readonly digest: Promise<ArrayBuffer | ArrayBufferView>;
1261
+ readonly digest: Promise<ArrayBuffer>;
1262
1262
  get bytesWritten(): number | bigint;
1263
1263
  }
1264
1264
  /**
@@ -1267,7 +1267,7 @@ export declare class DigestStream extends WritableStream<
1267
1267
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1268
1268
  */
1269
1269
  export declare class TextDecoder {
1270
- constructor(decoder?: string, options?: TextDecoderConstructorOptions);
1270
+ constructor(label?: string, options?: TextDecoderConstructorOptions);
1271
1271
  /**
1272
1272
  * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
1273
1273
  *
@@ -3084,7 +3084,7 @@ export interface GPUCommandEncoder {
3084
3084
  destinationOffset: number | bigint,
3085
3085
  size: number | bigint,
3086
3086
  ): void;
3087
- finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3087
+ finish(param1?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3088
3088
  copyTextureToBuffer(
3089
3089
  source: GPUImageCopyTexture,
3090
3090
  destination: GPUImageCopyBuffer,
@@ -6130,19 +6130,7 @@ export declare namespace Rpc {
6130
6130
  // serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
6131
6131
  type Serializable<T> =
6132
6132
  // Structured cloneables
6133
- | void
6134
- | undefined
6135
- | null
6136
- | boolean
6137
- | number
6138
- | bigint
6139
- | string
6140
- | TypedArray
6141
- | ArrayBuffer
6142
- | DataView
6143
- | Date
6144
- | Error
6145
- | RegExp
6133
+ | BaseType
6146
6134
  // Structured cloneable composites
6147
6135
  | Map<
6148
6136
  T extends Map<infer U, unknown> ? Serializable<U> : never,
@@ -6154,11 +6142,6 @@ export declare namespace Rpc {
6154
6142
  [K in keyof T]: K extends number | string ? Serializable<T[K]> : never;
6155
6143
  }
6156
6144
  // Special types
6157
- | ReadableStream<Uint8Array>
6158
- | WritableStream<Uint8Array>
6159
- | Request
6160
- | Response
6161
- | Headers
6162
6145
  | Stub<Stubable>
6163
6146
  // Serialized as stubs, see `Stubify`
6164
6147
  | Stubable;
@@ -6169,6 +6152,26 @@ export declare namespace Rpc {
6169
6152
  dup(): this;
6170
6153
  }
6171
6154
  export type Stub<T extends Stubable> = Provider<T> & StubBase<T>;
6155
+ // This represents all the types that can be sent as-is over an RPC boundary
6156
+ type BaseType =
6157
+ | void
6158
+ | undefined
6159
+ | null
6160
+ | boolean
6161
+ | number
6162
+ | bigint
6163
+ | string
6164
+ | TypedArray
6165
+ | ArrayBuffer
6166
+ | DataView
6167
+ | Date
6168
+ | Error
6169
+ | RegExp
6170
+ | ReadableStream<Uint8Array>
6171
+ | WritableStream<Uint8Array>
6172
+ | Request
6173
+ | Response
6174
+ | Headers;
6172
6175
  // Recursively rewrite all `Stubable` types with `Stub`s
6173
6176
  type Stubify<T> = T extends Stubable
6174
6177
  ? Stub<T>
@@ -6180,13 +6183,15 @@ export declare namespace Rpc {
6180
6183
  ? Array<Stubify<V>>
6181
6184
  : T extends ReadonlyArray<infer V>
6182
6185
  ? ReadonlyArray<Stubify<V>>
6183
- : T extends {
6184
- [key: string | number]: any;
6185
- }
6186
- ? {
6187
- [K in keyof T]: Stubify<T[K]>;
6188
- }
6189
- : T;
6186
+ : T extends BaseType
6187
+ ? T
6188
+ : T extends {
6189
+ [key: string | number]: any;
6190
+ }
6191
+ ? {
6192
+ [K in keyof T]: Stubify<T[K]>;
6193
+ }
6194
+ : T;
6190
6195
  // Recursively rewrite all `Stub<T>`s with the corresponding `T`s.
6191
6196
  // Note we use `StubBase` instead of `Stub` here to avoid circular dependencies:
6192
6197
  // `Stub` depends on `Provider`, which depends on `Unstubify`, which would depend on `Stub`.
@@ -6201,13 +6206,15 @@ export declare namespace Rpc {
6201
6206
  ? Array<Unstubify<V>>
6202
6207
  : T extends ReadonlyArray<infer V>
6203
6208
  ? ReadonlyArray<Unstubify<V>>
6204
- : T extends {
6205
- [key: string | number]: unknown;
6206
- }
6207
- ? {
6208
- [K in keyof T]: Unstubify<T[K]>;
6209
- }
6210
- : T;
6209
+ : T extends BaseType
6210
+ ? T
6211
+ : T extends {
6212
+ [key: string | number]: unknown;
6213
+ }
6214
+ ? {
6215
+ [K in keyof T]: Unstubify<T[K]>;
6216
+ }
6217
+ : T;
6211
6218
  type UnstubifyAll<A extends any[]> = {
6212
6219
  [I in keyof A]: Unstubify<A[I]>;
6213
6220
  };
@@ -1259,7 +1259,7 @@ declare class DigestStream extends WritableStream<
1259
1259
  ArrayBuffer | ArrayBufferView
1260
1260
  > {
1261
1261
  constructor(algorithm: string | SubtleCryptoHashAlgorithm);
1262
- get digest(): Promise<ArrayBuffer | ArrayBufferView>;
1262
+ readonly digest: Promise<ArrayBuffer>;
1263
1263
  get bytesWritten(): number | bigint;
1264
1264
  }
1265
1265
  /**
@@ -1268,7 +1268,7 @@ declare class DigestStream extends WritableStream<
1268
1268
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1269
1269
  */
1270
1270
  declare class TextDecoder {
1271
- constructor(decoder?: string, options?: TextDecoderConstructorOptions);
1271
+ constructor(label?: string, options?: TextDecoderConstructorOptions);
1272
1272
  /**
1273
1273
  * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
1274
1274
  *
@@ -3098,7 +3098,7 @@ interface GPUCommandEncoder {
3098
3098
  destinationOffset: number | bigint,
3099
3099
  size: number | bigint,
3100
3100
  ): void;
3101
- finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3101
+ finish(param1?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3102
3102
  copyTextureToBuffer(
3103
3103
  source: GPUImageCopyTexture,
3104
3104
  destination: GPUImageCopyBuffer,
@@ -6173,19 +6173,7 @@ declare namespace Rpc {
6173
6173
  // serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
6174
6174
  type Serializable<T> =
6175
6175
  // Structured cloneables
6176
- | void
6177
- | undefined
6178
- | null
6179
- | boolean
6180
- | number
6181
- | bigint
6182
- | string
6183
- | TypedArray
6184
- | ArrayBuffer
6185
- | DataView
6186
- | Date
6187
- | Error
6188
- | RegExp
6176
+ | BaseType
6189
6177
  // Structured cloneable composites
6190
6178
  | Map<
6191
6179
  T extends Map<infer U, unknown> ? Serializable<U> : never,
@@ -6197,11 +6185,6 @@ declare namespace Rpc {
6197
6185
  [K in keyof T]: K extends number | string ? Serializable<T[K]> : never;
6198
6186
  }
6199
6187
  // Special types
6200
- | ReadableStream<Uint8Array>
6201
- | WritableStream<Uint8Array>
6202
- | Request
6203
- | Response
6204
- | Headers
6205
6188
  | Stub<Stubable>
6206
6189
  // Serialized as stubs, see `Stubify`
6207
6190
  | Stubable;
@@ -6212,6 +6195,26 @@ declare namespace Rpc {
6212
6195
  dup(): this;
6213
6196
  }
6214
6197
  export type Stub<T extends Stubable> = Provider<T> & StubBase<T>;
6198
+ // This represents all the types that can be sent as-is over an RPC boundary
6199
+ type BaseType =
6200
+ | void
6201
+ | undefined
6202
+ | null
6203
+ | boolean
6204
+ | number
6205
+ | bigint
6206
+ | string
6207
+ | TypedArray
6208
+ | ArrayBuffer
6209
+ | DataView
6210
+ | Date
6211
+ | Error
6212
+ | RegExp
6213
+ | ReadableStream<Uint8Array>
6214
+ | WritableStream<Uint8Array>
6215
+ | Request
6216
+ | Response
6217
+ | Headers;
6215
6218
  // Recursively rewrite all `Stubable` types with `Stub`s
6216
6219
  type Stubify<T> = T extends Stubable
6217
6220
  ? Stub<T>
@@ -6223,13 +6226,15 @@ declare namespace Rpc {
6223
6226
  ? Array<Stubify<V>>
6224
6227
  : T extends ReadonlyArray<infer V>
6225
6228
  ? ReadonlyArray<Stubify<V>>
6226
- : T extends {
6227
- [key: string | number]: any;
6228
- }
6229
- ? {
6230
- [K in keyof T]: Stubify<T[K]>;
6231
- }
6232
- : T;
6229
+ : T extends BaseType
6230
+ ? T
6231
+ : T extends {
6232
+ [key: string | number]: any;
6233
+ }
6234
+ ? {
6235
+ [K in keyof T]: Stubify<T[K]>;
6236
+ }
6237
+ : T;
6233
6238
  // Recursively rewrite all `Stub<T>`s with the corresponding `T`s.
6234
6239
  // Note we use `StubBase` instead of `Stub` here to avoid circular dependencies:
6235
6240
  // `Stub` depends on `Provider`, which depends on `Unstubify`, which would depend on `Stub`.
@@ -6244,13 +6249,15 @@ declare namespace Rpc {
6244
6249
  ? Array<Unstubify<V>>
6245
6250
  : T extends ReadonlyArray<infer V>
6246
6251
  ? ReadonlyArray<Unstubify<V>>
6247
- : T extends {
6248
- [key: string | number]: unknown;
6249
- }
6250
- ? {
6251
- [K in keyof T]: Unstubify<T[K]>;
6252
- }
6253
- : T;
6252
+ : T extends BaseType
6253
+ ? T
6254
+ : T extends {
6255
+ [key: string | number]: unknown;
6256
+ }
6257
+ ? {
6258
+ [K in keyof T]: Unstubify<T[K]>;
6259
+ }
6260
+ : T;
6254
6261
  type UnstubifyAll<A extends any[]> = {
6255
6262
  [I in keyof A]: Unstubify<A[I]>;
6256
6263
  };
@@ -1264,7 +1264,7 @@ export declare class DigestStream extends WritableStream<
1264
1264
  ArrayBuffer | ArrayBufferView
1265
1265
  > {
1266
1266
  constructor(algorithm: string | SubtleCryptoHashAlgorithm);
1267
- get digest(): Promise<ArrayBuffer | ArrayBufferView>;
1267
+ readonly digest: Promise<ArrayBuffer>;
1268
1268
  get bytesWritten(): number | bigint;
1269
1269
  }
1270
1270
  /**
@@ -1273,7 +1273,7 @@ export declare class DigestStream extends WritableStream<
1273
1273
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1274
1274
  */
1275
1275
  export declare class TextDecoder {
1276
- constructor(decoder?: string, options?: TextDecoderConstructorOptions);
1276
+ constructor(label?: string, options?: TextDecoderConstructorOptions);
1277
1277
  /**
1278
1278
  * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
1279
1279
  *
@@ -3110,7 +3110,7 @@ export interface GPUCommandEncoder {
3110
3110
  destinationOffset: number | bigint,
3111
3111
  size: number | bigint,
3112
3112
  ): void;
3113
- finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3113
+ finish(param1?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3114
3114
  copyTextureToBuffer(
3115
3115
  source: GPUImageCopyTexture,
3116
3116
  destination: GPUImageCopyBuffer,
@@ -6156,19 +6156,7 @@ export declare namespace Rpc {
6156
6156
  // serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
6157
6157
  type Serializable<T> =
6158
6158
  // Structured cloneables
6159
- | void
6160
- | undefined
6161
- | null
6162
- | boolean
6163
- | number
6164
- | bigint
6165
- | string
6166
- | TypedArray
6167
- | ArrayBuffer
6168
- | DataView
6169
- | Date
6170
- | Error
6171
- | RegExp
6159
+ | BaseType
6172
6160
  // Structured cloneable composites
6173
6161
  | Map<
6174
6162
  T extends Map<infer U, unknown> ? Serializable<U> : never,
@@ -6180,11 +6168,6 @@ export declare namespace Rpc {
6180
6168
  [K in keyof T]: K extends number | string ? Serializable<T[K]> : never;
6181
6169
  }
6182
6170
  // Special types
6183
- | ReadableStream<Uint8Array>
6184
- | WritableStream<Uint8Array>
6185
- | Request
6186
- | Response
6187
- | Headers
6188
6171
  | Stub<Stubable>
6189
6172
  // Serialized as stubs, see `Stubify`
6190
6173
  | Stubable;
@@ -6195,6 +6178,26 @@ export declare namespace Rpc {
6195
6178
  dup(): this;
6196
6179
  }
6197
6180
  export type Stub<T extends Stubable> = Provider<T> & StubBase<T>;
6181
+ // This represents all the types that can be sent as-is over an RPC boundary
6182
+ type BaseType =
6183
+ | void
6184
+ | undefined
6185
+ | null
6186
+ | boolean
6187
+ | number
6188
+ | bigint
6189
+ | string
6190
+ | TypedArray
6191
+ | ArrayBuffer
6192
+ | DataView
6193
+ | Date
6194
+ | Error
6195
+ | RegExp
6196
+ | ReadableStream<Uint8Array>
6197
+ | WritableStream<Uint8Array>
6198
+ | Request
6199
+ | Response
6200
+ | Headers;
6198
6201
  // Recursively rewrite all `Stubable` types with `Stub`s
6199
6202
  type Stubify<T> = T extends Stubable
6200
6203
  ? Stub<T>
@@ -6206,13 +6209,15 @@ export declare namespace Rpc {
6206
6209
  ? Array<Stubify<V>>
6207
6210
  : T extends ReadonlyArray<infer V>
6208
6211
  ? ReadonlyArray<Stubify<V>>
6209
- : T extends {
6210
- [key: string | number]: any;
6211
- }
6212
- ? {
6213
- [K in keyof T]: Stubify<T[K]>;
6214
- }
6215
- : T;
6212
+ : T extends BaseType
6213
+ ? T
6214
+ : T extends {
6215
+ [key: string | number]: any;
6216
+ }
6217
+ ? {
6218
+ [K in keyof T]: Stubify<T[K]>;
6219
+ }
6220
+ : T;
6216
6221
  // Recursively rewrite all `Stub<T>`s with the corresponding `T`s.
6217
6222
  // Note we use `StubBase` instead of `Stub` here to avoid circular dependencies:
6218
6223
  // `Stub` depends on `Provider`, which depends on `Unstubify`, which would depend on `Stub`.
@@ -6227,13 +6232,15 @@ export declare namespace Rpc {
6227
6232
  ? Array<Unstubify<V>>
6228
6233
  : T extends ReadonlyArray<infer V>
6229
6234
  ? ReadonlyArray<Unstubify<V>>
6230
- : T extends {
6231
- [key: string | number]: unknown;
6232
- }
6233
- ? {
6234
- [K in keyof T]: Unstubify<T[K]>;
6235
- }
6236
- : T;
6235
+ : T extends BaseType
6236
+ ? T
6237
+ : T extends {
6238
+ [key: string | number]: unknown;
6239
+ }
6240
+ ? {
6241
+ [K in keyof T]: Unstubify<T[K]>;
6242
+ }
6243
+ : T;
6237
6244
  type UnstubifyAll<A extends any[]> = {
6238
6245
  [I in keyof A]: Unstubify<A[I]>;
6239
6246
  };
@@ -1277,7 +1277,7 @@ declare class DigestStream extends WritableStream<
1277
1277
  ArrayBuffer | ArrayBufferView
1278
1278
  > {
1279
1279
  constructor(algorithm: string | SubtleCryptoHashAlgorithm);
1280
- get digest(): Promise<ArrayBuffer | ArrayBufferView>;
1280
+ readonly digest: Promise<ArrayBuffer>;
1281
1281
  get bytesWritten(): number | bigint;
1282
1282
  }
1283
1283
  /**
@@ -1286,7 +1286,7 @@ declare class DigestStream extends WritableStream<
1286
1286
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
1287
1287
  */
1288
1288
  declare class TextDecoder {
1289
- constructor(decoder?: string, options?: TextDecoderConstructorOptions);
1289
+ constructor(label?: string, options?: TextDecoderConstructorOptions);
1290
1290
  /**
1291
1291
  * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
1292
1292
  *
@@ -3119,7 +3119,7 @@ interface GPUCommandEncoder {
3119
3119
  destinationOffset: number | bigint,
3120
3120
  size: number | bigint,
3121
3121
  ): void;
3122
- finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3122
+ finish(param1?: GPUCommandBufferDescriptor): GPUCommandBuffer;
3123
3123
  copyTextureToBuffer(
3124
3124
  source: GPUImageCopyTexture,
3125
3125
  destination: GPUImageCopyBuffer,
@@ -6198,19 +6198,7 @@ declare namespace Rpc {
6198
6198
  // serializable check as well. Otherwise, only types defined with the "type" keyword would pass.
6199
6199
  type Serializable<T> =
6200
6200
  // Structured cloneables
6201
- | void
6202
- | undefined
6203
- | null
6204
- | boolean
6205
- | number
6206
- | bigint
6207
- | string
6208
- | TypedArray
6209
- | ArrayBuffer
6210
- | DataView
6211
- | Date
6212
- | Error
6213
- | RegExp
6201
+ | BaseType
6214
6202
  // Structured cloneable composites
6215
6203
  | Map<
6216
6204
  T extends Map<infer U, unknown> ? Serializable<U> : never,
@@ -6222,11 +6210,6 @@ declare namespace Rpc {
6222
6210
  [K in keyof T]: K extends number | string ? Serializable<T[K]> : never;
6223
6211
  }
6224
6212
  // Special types
6225
- | ReadableStream<Uint8Array>
6226
- | WritableStream<Uint8Array>
6227
- | Request
6228
- | Response
6229
- | Headers
6230
6213
  | Stub<Stubable>
6231
6214
  // Serialized as stubs, see `Stubify`
6232
6215
  | Stubable;
@@ -6237,6 +6220,26 @@ declare namespace Rpc {
6237
6220
  dup(): this;
6238
6221
  }
6239
6222
  export type Stub<T extends Stubable> = Provider<T> & StubBase<T>;
6223
+ // This represents all the types that can be sent as-is over an RPC boundary
6224
+ type BaseType =
6225
+ | void
6226
+ | undefined
6227
+ | null
6228
+ | boolean
6229
+ | number
6230
+ | bigint
6231
+ | string
6232
+ | TypedArray
6233
+ | ArrayBuffer
6234
+ | DataView
6235
+ | Date
6236
+ | Error
6237
+ | RegExp
6238
+ | ReadableStream<Uint8Array>
6239
+ | WritableStream<Uint8Array>
6240
+ | Request
6241
+ | Response
6242
+ | Headers;
6240
6243
  // Recursively rewrite all `Stubable` types with `Stub`s
6241
6244
  type Stubify<T> = T extends Stubable
6242
6245
  ? Stub<T>
@@ -6248,13 +6251,15 @@ declare namespace Rpc {
6248
6251
  ? Array<Stubify<V>>
6249
6252
  : T extends ReadonlyArray<infer V>
6250
6253
  ? ReadonlyArray<Stubify<V>>
6251
- : T extends {
6252
- [key: string | number]: any;
6253
- }
6254
- ? {
6255
- [K in keyof T]: Stubify<T[K]>;
6256
- }
6257
- : T;
6254
+ : T extends BaseType
6255
+ ? T
6256
+ : T extends {
6257
+ [key: string | number]: any;
6258
+ }
6259
+ ? {
6260
+ [K in keyof T]: Stubify<T[K]>;
6261
+ }
6262
+ : T;
6258
6263
  // Recursively rewrite all `Stub<T>`s with the corresponding `T`s.
6259
6264
  // Note we use `StubBase` instead of `Stub` here to avoid circular dependencies:
6260
6265
  // `Stub` depends on `Provider`, which depends on `Unstubify`, which would depend on `Stub`.
@@ -6269,13 +6274,15 @@ declare namespace Rpc {
6269
6274
  ? Array<Unstubify<V>>
6270
6275
  : T extends ReadonlyArray<infer V>
6271
6276
  ? ReadonlyArray<Unstubify<V>>
6272
- : T extends {
6273
- [key: string | number]: unknown;
6274
- }
6275
- ? {
6276
- [K in keyof T]: Unstubify<T[K]>;
6277
- }
6278
- : T;
6277
+ : T extends BaseType
6278
+ ? T
6279
+ : T extends {
6280
+ [key: string | number]: unknown;
6281
+ }
6282
+ ? {
6283
+ [K in keyof T]: Unstubify<T[K]>;
6284
+ }
6285
+ : T;
6279
6286
  type UnstubifyAll<A extends any[]> = {
6280
6287
  [I in keyof A]: Unstubify<A[I]>;
6281
6288
  };