-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: add utility to err on unreachable branches #991
base: main
Are you sure you want to change the base?
Conversation
It would be nice to add some usage examples for the new utilities |
4ecf064
to
027ac91
Compare
Perhaps let's try applying it to the map key/value pair types once #993 is merged |
027ac91
to
d6715e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's revert changes on switch
which are not strictly necessary and keep them only for pairs of key/value types where exhaustivity is desired
return this.interpretStaticCall(ast); | ||
} | ||
} | ||
public interpretExpression = (ast: AstExpression): Value => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change is not strictly necessary, since a missing case in this switch
should be caught by ESLint.
case "int": | ||
return ", int vl"; | ||
} | ||
return match(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say this change is not strictly necessary, ESLint would catch it.
CI is not all green |
Issue
Closes #915.
Checklist