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

Function checkFacts

ark/type/runtime.ts:1347–1361  ·  view source on GitHub ↗
(
	actual: HoleFact,
	expected: HoleFact,
	label: string = unnamed
)

Source from the content-addressed store, hash-verified

1345}
1346
1347export const checkFacts = (
1348 actual: HoleFact,
1349 expected: HoleFact,
1350 label: string = unnamed
1351): void => {
1352 if (actual !== expected) {
1353 throwError(
1354 writeCreationMismatchMessage(
1355 label,
1356 describeFact(actual),
1357 describeFact(expected)
1358 )
1359 )
1360 }
1361}
1362
1363// a function's fact alone, its arity, so a program whose holes are functions
1364// ships nothing of what tells a class or a symbol from the one a build read

Callers 1

checkArityFunction · 0.85

Calls 3

throwErrorFunction · 0.90
describeFactFunction · 0.85

Tested by

no test coverage detected