-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
DFS refactor work #9648
DFS refactor work #9648
Conversation
if (command.exit != null) { | ||
let {nodeId, context, exit} = command; | ||
let newContext = exit(nodeId, command.context, actions); | ||
if (typeof newContext !== 'undefined') { |
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.
/nit != null
checks are usually preferred in the codebase from what I can tell
return context; | ||
} | ||
|
||
if (typeof visit !== 'function' && visit.exit) { |
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.
We assign enter
to a const up on line 545 - any reason we don't do the same for exit
? I'm guessing a typeof
isn't a huge overhead anyway..
Do you have performance numbers for this? Where did this work come from? |
I need help with:
I will do clean-up around:
Missing from this diff is:
getChildren
with a few generator/callback based options