( record: Record<string, unknown>, stepNumber: number, makeError: BatchStepErrorFactory = batchInvalidArgsError, )
| 38 | } |
| 39 | |
| 40 | export function readBatchStepInputObject( |
| 41 | record: Record<string, unknown>, |
| 42 | stepNumber: number, |
| 43 | makeError: BatchStepErrorFactory = batchInvalidArgsError, |
| 44 | ): Record<string, unknown> { |
| 45 | const input = record.input; |
| 46 | if (!isRecord(input)) { |
| 47 | throw makeError(`Batch step ${stepNumber} input must be an object.`); |
| 48 | } |
| 49 | return input; |
| 50 | } |
| 51 | |
| 52 | export function parseBatchStepRuntime( |
| 53 | value: unknown, |
no test coverage detected