Skip to content

assertGreaterThanOrEqual

Assert that a numeric value is greater than or equal to the expected value, with type-narrowing.

import { assertGreaterThanOrEqual } from "@kensio/smartass";
const attempts: unknown = 1;
assertGreaterThanOrEqual(attempts, 1);
// attempts is now narrowed to number | bigint

Source file: src/assert/greater-than-or-equal/greater-than-or-equal.assert.ts