blob: d1a348231d917f3eb639b413af2a8bd283ac9d86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/**
* Created by Ben Williams on 3/13/19.
*/
/**
* Enables compile time detection for code that should be unreachable
* For example, calling this function in the default case of a switch statement
* will provide compile time checking that the switch is exhaustive
* @return never
*/
export function unreachable(value) {
throw new Error(`This method should never be called with value: ${value}`);
}
//# sourceMappingURL=errors.js.map
|