Function fail

  • Forcefully throws a failed assertion.

    Parameters

    • Optionalmsg: string

      Optional message to include in the error.

    Returns never

    Never returns, always throws.

    import { fail } from "@std/assert";

    fail("Deliberately failed!"); // Throws