MCPcopy Create free account
hub / github.com/TanStack/db / assert

Function assert

packages/db-ivm/src/utils.ts:5–12  ·  view source on GitHub ↗
(
  condition: unknown,
  message?: string,
)

Source from the content-addressed store, hash-verified

3 * Throws an error if the condition is false.
4 */
5export function assert(
6 condition: unknown,
7 message?: string,
8): asserts condition {
9 if (!condition) {
10 throw new Error(message || `Assertion failed`)
11 }
12}
13
14/**
15 * A map that returns a default value for keys that are not present.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected