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 visitors merging #15702
Refactor visitors merging #15702
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/54785/ |
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.
Thanks!
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.
Thank you! Just one question.
// @ts-expect-error Fixme: document state.key | ||
newFn = wrapper(state.key, key, newFn); | ||
// @ts-expect-error Fixme: actually PluginPass.key (aka pluginAlias)? | ||
newFn = wrapper(state?.key, phase, newFn); |
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.
Can state
be nullish? Or should this be state!.key
? If it can be null, can you specify it in the state
type signature?
Co-authored-by: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com>
881528e
to
70eaf38
Compare
I've tried to better type-polish
merge
, not realizing there was already an open bug and attached PR; hence, there is the relevant test added, courtesy of @liuxingbaoyu on #15593.VisitPhase
ExplodedVisitor
with internal flags attached