Skip to content
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

Update types to better match reality. #122

Merged
merged 1 commit into from May 30, 2017
Merged

Update types to better match reality. #122

merged 1 commit into from May 30, 2017

Conversation

eventualbuddha
Copy link
Contributor

This also fixes an issue I discovered while figuring out what type indentExclusionsRanges was supposed to be. MagicString#clone does not appear to work when the object was constructed with a non-tuple. It seemed to expect an array of nodes – or something with start and end properties – but generated an array of tuples. Calling #clone multiple times no matter what the starting value would have resulted in an incorrect clone. I'm not 100% sure that I picked the right type, but this seemed the most consistent choice.

This also fixes an issue I discovered while figuring out what type `indentExclusionsRanges` was supposed to be. `MagicString#clone` does not appear to work when the object was constructed with a non-tuple. It seemed to expect an array of nodes – or something with `start` and `end` properties – but generated an array of tuples. Calling `#clone` multiple times no matter what the starting value would have resulted in an incorrect clone. I'm not 100% sure that I picked the right type, but this seemed the most consistent choice.
@Rich-Harris Rich-Harris merged commit b352395 into Rich-Harris:master May 30, 2017
@Rich-Harris
Copy link
Owner

Excellent, thank you! Released 0.21.3.

@eventualbuddha eventualbuddha deleted the fix-type-info branch May 30, 2017 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants