Click in order · JavaScript and React course · Module 12: React and TypeScript

The assertNever Function

Arrange the syntax of the assertNever function for exhaustive checking:

Items to click

  • value: never
  • throw new Error("Unhandled variant"); }
  • ): never {
  • function assertNever(

You can check the correct answer by solving this task in the CodeWorlds game.