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

Function describeValue

ark/type/runtime.ts:1612–1620  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

1610
1611// described by kind, so a bundle ships no printer
1612const describeValue = (value: unknown) =>
1613 isValidator(value) ?
1614 Reflect.getOwnPropertyDescriptor(value, "expression") ?
1615 String(value)
1616 : "a Type"
1617 : typeof value === "string" ? JSON.stringify(value)
1618 : typeof value === "function" ? "a function"
1619 : value !== null && typeof value === "object" ? "an object"
1620 : String(value)
1621
1622export const writeCreationMismatchMessage = <
1623 label extends string,

Callers 8

factOfHoleFunction · 0.85
describeShapeFunction · 0.85
checkArityFunction · 0.85
checkInputFunction · 0.85
checkFunctionFunction · 0.85
checkHeldFunction · 0.85
runtime.tsFile · 0.85
checkHelperFunction · 0.85

Calls 2

StringInterface · 0.85
isValidatorFunction · 0.70

Tested by

no test coverage detected