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

refactor(options)!: type format as Format #877

Merged
merged 1 commit into from
Jun 16, 2023
Merged

refactor(options)!: type format as Format #877

merged 1 commit into from
Jun 16, 2023

Conversation

spifory
Copy link
Contributor

@spifory spifory commented Apr 3, 2023

This types Options.format as Format[] | Format instead of Format[] | string.

You can currently pass in an array or string to format, however, the type is not consistent, as you are allowed to use the string literals from Format only for arrays, but not for strings. Typing it as string allows you to put anything as an option. This fixes that.
image
image

This types Options.format as `Format[] | Format` instead of `Format[] | string`
@codesandbox
Copy link

codesandbox bot commented Apr 3, 2023

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@vercel
Copy link

vercel bot commented Apr 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 3, 2023 9:49am

@github-actions
Copy link

🎉 This PR is included in version 7.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants