You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
which is broken because optionalArg = (optionalArg != null) sets optionalArg to true instead of keeping it as-is when it has a truthy value. Also, typescript doesn't even compile the new code because the variable can now be a string[] or boolean.
What did you expect to happen?
Code doesn't get changed or code gets changed to use the ?? operator instead.
Are you willing to submit a pull request to fix this bug?
no
The text was updated successfully, but these errors were encountered:
What version of this package are you using?
What operating system, Node.js, and npm version?
macos 12.3
Node: v16.14.2
npm: 8.5.3
What happened?
write this code:
run
ts-standard --fix
, it turns intowhich is broken because
optionalArg = (optionalArg != null)
setsoptionalArg
totrue
instead of keeping it as-is when it has a truthy value. Also, typescript doesn't even compile the new code because the variable can now be astring[]
orboolean
.What did you expect to happen?
Code doesn't get changed or code gets changed to use the
??
operator instead.Are you willing to submit a pull request to fix this bug?
no
The text was updated successfully, but these errors were encountered: