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
This is a good project but it's very hard to know what's wrong. We only know when there is a problem by getting undefined.. But if the expression does not return anything and only have a side effect then we don't even know if the code was executed or if there was a problem in the AST.
I suggest static-eval could use Errors instead of the FAIL object. This way it would not be needed to check everytime of something is equal fo FAIL and the end user would get more information about the error.
For example I spent 30 minutes figuring out why I was receiving undefined for a perfectly valid expression. It was simply that 'NewExpression' was not handled (This is not a problem of course, this is open source community someone else can implement that) but with Errors I would have known right away.
Would you accept a pull request using Error instead of FAIL ?
The text was updated successfully, but these errors were encountered:
This is a good project but it's very hard to know what's wrong. We only know when there is a problem by getting undefined.. But if the expression does not return anything and only have a side effect then we don't even know if the code was executed or if there was a problem in the AST.
I suggest
static-eval
could useErrors
instead of the FAIL object. This way it would not be needed to check everytime of something is equal foFAIL
and the end user would get more information about the error.For example I spent 30 minutes figuring out why I was receiving
undefined
for a perfectly valid expression. It was simply that 'NewExpression' was not handled (This is not a problem of course, this is open source community someone else can implement that) but with Errors I would have known right away.Would you accept a pull request using
Error
instead ofFAIL
?The text was updated successfully, but these errors were encountered: