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

fix(types): mark MagicString options as optional #183

Merged
merged 1 commit into from
Mar 2, 2022

Conversation

lukeed
Copy link
Contributor

@lukeed lukeed commented Dec 9, 2020

Without this, something like new MagicString('...', { filename }) is marked as invalid

@rileyajones
Copy link

👍

@aleclarson
Copy link

This is ready to merge 👍

@ecstrema
Copy link

Indeed. Ready to merge. Would be nice to have.

@antfu
Copy link
Collaborator

antfu commented Mar 2, 2022

Released as v0.25.8

@privatenumber
Copy link

FWIW, I think the Partial<> should be directly applied to MagicStringOptions (or better yet, manually add ? to each property) for a consistent source of truth.

Otherwise, the exported type needs to be Partial'd every time it gets used (eg. when creating a MagicString wrapper).

@lukeed lukeed deleted the patch-1 branch March 3, 2022 00:04
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.

6 participants