tome-web/common/assertNever.ts

5 lines
164 B
TypeScript

export default function assertNever(value: never): never {
// TODO an actual error message
throw new Error(`assertNever failed for value ${value}`)
}