UNPKG

@instantdb/core

Version:

Instant's core local abstraction

10 lines (8 loc) 286 B
export function assert(condition: any, msg?: string): asserts condition { if (!condition) { throw new Error('[assertion error] ' + msg); } } export function assertUnreachable(_x: never): never { throw new Error('[assertion error] TS should prevent us from reaching here'); }