MCPcopy Create free account
hub / github.com/clientdb/clientdb / assert

Function assert

core/utils/assert.ts:20–33  ·  view source on GitHub ↗
(
  input: unknown,
  messageOrError: MessageOrError,
 
)

Source from the content-addressed store, hash-verified

18
19
20export function assert(
21 input: unknown,
22 messageOrError: MessageOrError,
23
24): asserts input {
25 if (input) {
26 return;
27 }
28
29 const error = getErrorFromMessageOrError(messageOrError);
30
31
32 throw error;
33}
34
35export function unsafeAssert(input: unknown): asserts input {
36 //

Callers 4

assertNotDestroyedFunction · 0.90
rejectAllAndResetFunction · 0.90
flushNextFunction · 0.90

Calls 1

Tested by

no test coverage detected