ESLint plugin
This project is maintained by iliubinskii
ESLint plugin / typescript/exhaustive-switch
Checks exhaustiveness of switch statement.
module.exports = {
plugins: ["misc"],
rules: {
"misc/typescript/exhaustive-switch": "error"
}
};
function f(x: 1 | 2): void {
switch (x) {
case 1:
}
}
function f(x: 1 | 2): void {
switch (x) {
case 1:
case 2:
}
}