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

Function assertArgument

src.ts/utils/errors.ts:730–732  ·  view source on GitHub ↗
(check: unknown, message: string, name: string, value: unknown)

Source from the content-addressed store, hash-verified

728 * any further code does not need additional compile-time checks.
729 */
730export function assertArgument(check: unknown, message: string, name: string, value: unknown): asserts check {
731 assert(check, message, "INVALID_ARGUMENT", { argument: name, value: value });
732}
733
734export function assertArgumentCount(count: number, expectedCount: number, message?: string): void {
735 if (message == null) { message = ""; }

Callers

nothing calls this directly

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected