MCPcopy Index your code
hub / github.com/callstack/agent-device / assertBatchStepCount

Function assertBatchStepCount

src/batch-contract.ts:19–27  ·  view source on GitHub ↗
(
  stepCount: number,
  maxSteps: number,
  makeError: BatchStepErrorFactory = batchInvalidArgsError,
)

Source from the content-addressed store, hash-verified

17}
18
19export 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
29export function readBatchStepRecord(
30 step: unknown,

Callers 2

readBatchInputFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected