function assertFalse
assertFalse(expr: unknown,msg?: string): asserts expr is FalsyMake an assertion, an error will be thrown if expr has a truthy value.
Examples
Usage
Usage
import { assertFalse } from "@std/assert"; assertFalse(false); // Doesn't throw assertFalse(true); // Throws
Parameters
expr: unknownThe expression to test.
optional
msg: string = The optional message to display if the assertion fails.
Return Type
asserts expr is FalsyThrows
AssertionErrorIf expr is truthy.