-
Notifications
You must be signed in to change notification settings - Fork 773
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
evm: Remove dubious booleans in evm #2055
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
We should not check if certain properties are the string Can you link this stack overflow question? |
There are numerous but this one makes the most sense to me. The argument for using |
I guess using some code like |
Okay, I'm gonna close for now so we don't clutter up our pull request log but we can revisit when needed. |
Following on #2030, I noticed the linter complaining about some implicit boolean truthiness being checked in
evm.ts
so trying to come up with better typing to satisfy the new explicit boolean linter rule and also remove theisTruthy
/isFalsy
methods @gabrocheleau introduced for us to use as a fallback. I'm on the fence about whether I like the "improvements." Since alot of our booleans were previously using the existence of an object in a check as below:or
we basically have to check if something is undefined or not, and according to multiple stackOverflow questions, the only correct way to do this is to make our code look like this:
What do y'all think?