Skip to content

assertLessThan

Assert that a numeric value is less than the expected value, with type-narrowing.

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

Source file: src/assert/less-than/less-than.assert.ts