Skip to main content

BatchResponseArray<T>

type BatchResponseArray<T> = { [K in keyof T]: T[K] extends BatchRequestDescriptor<infer R> ? BatchResponse<R> : never };

Maps an array of BatchRequestDescriptor types to their corresponding BatchResponse types. Preserves individual types in heterogeneous arrays for proper type inference.

Type Parameters

Type Parameter
T extends readonly BatchRequestDescriptor<unknown>[]