• Use this to assert unreachable code.

    Parameters

    • Optional reason: string

    Returns never

    Since

    24.7.0

    Example

    import { unreachable } from "assert";

    unreachable(); // Throws