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

Function callAssertedFunction

ark/attest/assert/assertions.ts:295–305  ·  view source on GitHub ↗
(
	asserted: Function
)

Source from the content-addressed store, hash-verified

293 return result.threw
294}
295export const callAssertedFunction = (
296 asserted: Function
297): AssertedFnCallResult => {
298 const result: AssertedFnCallResult = {}
299 try {
300 result.returned = asserted()
301 } catch (error) {
302 result.threw = String(error)
303 }
304 return result
305}

Callers 2

throwsMethod · 0.90
throwsAndHasTypeErrorMethod · 0.90

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected