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
Add interfaces used by rollup #131
Conversation
I've also updated the source map interface types here to make them compatible with the typings from the source-map project. I added the |
Subtle ping |
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! (And sorry for the delay.)
One minor thing that I think could be improved, although I might be misreading and don't feel too strongly.
index.d.ts
Outdated
@@ -55,6 +57,8 @@ export interface OverwriteOptions { | |||
} | |||
|
|||
export default class MagicString { | |||
indentExclusionRanges: Array<ExclusionRange>; |
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.
It looks to me like this could also be ExclusionRange | Array<ExclusionRange>
, same as elsewhere. (Sneakily, clone
uses indentExclusionRanges.slice()
, which works with either a single range or an array of ranges.) Could you use the more general type here? (I may also be misreading it, but it looks like MagicString.indent
handles either case.)
Thanks @alangpierce for taking a look. I've updated that line - let me know how that seems. |
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!
Much appreciated! Any chance of an npm publish soon? |
Oops, of course. This is my first time handling a PR in this repo since getting collaborator access, but looks like I have npm access as well, so I should be able to do a release. |
Done! Published as v0.22.5. |
Great, thank you! |
This adds missing interfaces used by Rollup in the progress of rollup/rollup#1806.