Skip to content

assertFalse

Assert that a value is strictly false (not just falsy), with type-narrowing to the literal type false.

import { assertFalse } from "@kensio/smartass";
const isEnabled: unknown = false;
assertFalse(isEnabled);
// isEnabled is now narrowed to literal false

Source file: src/assert/false/false.assert.ts