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: move @babel/helper-annotate-as-pure to ts #12415
refactor: move @babel/helper-annotate-as-pure to ts #12415
Conversation
JLHwung
commented
Nov 27, 2020
•
edited by gitpod-io
bot
edited by gitpod-io
bot
Q | A |
---|---|
License | MIT |
!!leadingComments && | ||
leadingComments.some(comment => /[@#]__PURE__/.test(comment.value)); | ||
|
||
export default function annotateAsPure(pathOrNode) { | ||
export default function annotateAsPure( | ||
pathOrNode: Node | { node: Node }, |
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.
Since this function does not use Path.prototype
, I type the input as { node: Node }
.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/33757/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit a8da9a8:
|
945d91d
to
b8ce51f
Compare
I didn't add flow types of this package because none of its dependents are type checked by Flow. Since we are unlikely to enable more Flow type check during the transition, I am good with deferring adding flow types for this package. |
Should index have its extension changed to |
b8ce51f
to
41e0bad
Compare
41e0bad
to
a8da9a8
Compare
* refactor: move @babel/helper-annotate-as-pure to ts * chore: add flow types