@jossmac/lil-libs
    Preparing search index...

    Function assertNever

    • Throws for unreachable branches in discriminated unions.

      • arg: never

        Exhaustiveness-check value that should be typed never when all union cases are handled.

      Never — always throws.

      switch (status.kind) {
      case "idle":
      case "loading":
      case "done":
      break;
      default:
      assertNever(status.kind);
      }

      Always, with a message that includes the unexpected value.