MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / assert

Function assert

src.ts/utils/errors.ts:718–720  ·  view source on GitHub ↗
(check: unknown, message: string, code: K, info?: ErrorInfo<T>)

Source from the content-addressed store, hash-verified

716 * @see [[api:makeError]]
717 */
718export function assert<K extends ErrorCode, T extends CodedEthersError<K>>(check: unknown, message: string, code: K, info?: ErrorInfo<T>): asserts check {
719 if (!check) { throw makeError(message, code, info); }
720}
721
722
723/**

Callers 4

assertArgumentFunction · 0.70
assertArgumentCountFunction · 0.70
assertNormalizeFunction · 0.70
assertPrivateFunction · 0.70

Calls 1

makeErrorFunction · 0.70

Tested by

no test coverage detected