( stepCount: number, maxSteps: number, makeError: BatchStepErrorFactory = batchInvalidArgsError, )
| 17 | } |
| 18 | |
| 19 | export function assertBatchStepCount( |
| 20 | stepCount: number, |
| 21 | maxSteps: number, |
| 22 | makeError: BatchStepErrorFactory = batchInvalidArgsError, |
| 23 | ): void { |
| 24 | if (stepCount > maxSteps) { |
| 25 | throw makeError(`batch has ${stepCount} steps; max allowed is ${maxSteps}.`); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | export function readBatchStepRecord( |
| 30 | step: unknown, |
no outgoing calls
no test coverage detected