mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-16 01:41:02 +08:00
316b925f94
* Use unreachable exception in favor of type safety * Add tests * add test
6 lines
148 B
TypeScript
6 lines
148 B
TypeScript
export default class UnreachableException {
|
|
constructor(value: never) {
|
|
return new Error(`unreachable case: ${JSON.stringify(value)}`);
|
|
}
|
|
}
|