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
Convert npm-discards.js to TypeScript #10663
Convert npm-discards.js to TypeScript #10663
Conversation
This is now self-evident thanks to the typing we have done. Also the comment was a liar anyway, because the file it referenced was incorrect.
This accommodates an undocumented, but supported syntax for NPM.strip, in which you can pass a string/RegExp instead of an array of string/RegExps
4151c4d
to
6c3ce7b
Compare
@filipenevola Would you mind adding label:Project:TypeScript-conversion to this issue, 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.
The conversion looks good to me! Maybe @filipenevola could add his thoughts on the unused if
branch. I don't really like the idea of supporting a syntax that's not documented or used. Maybe there's an edge case I'm not seeing?
This is a dependency to some other npm-related files, so doing this one first.