MCPcopy Create free account
hub / github.com/arktypeio/arktype / checkInput

Function checkInput

ark/type/runtime.ts:1424–1438  ·  view source on GitHub ↗
(
	value: unknown,
	expected: unknown,
	label: string = unnamed
)

Source from the content-addressed store, hash-verified

1422}
1423
1424export const checkInput = (
1425 value: unknown,
1426 expected: unknown,
1427 label: string = unnamed
1428): void => {
1429 if (!is(value, expected)) {
1430 throwError(
1431 writeCreationMismatchMessage(
1432 label,
1433 describeValue(value),
1434 describeValue(expected)
1435 )
1436 )
1437 }
1438}
1439
1440// a module's progress is `undefined` before its body runs
1441export const checkProgress = (

Callers

nothing calls this directly

Calls 4

throwErrorFunction · 0.90
isFunction · 0.85
describeValueFunction · 0.85

Tested by

no test coverage detected