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

feat: support readonly tuples as input to .each #733

Merged
merged 2 commits into from Feb 11, 2022
Merged

feat: support readonly tuples as input to .each #733

merged 2 commits into from Feb 11, 2022

Conversation

IgnusG
Copy link
Contributor

@IgnusG IgnusG commented Feb 11, 2022

Using readonly tuples makes it easy to type check their individual parts inside the test.

Resolves #732

@netlify
Copy link

netlify bot commented Feb 11, 2022

✔️ Deploy Preview for vitest-dev ready!

🔨 Explore the source changes: 9784b1a

🔍 Inspect the deploy log: https://app.netlify.com/sites/vitest-dev/deploys/6206532b3d056800074f737a

😎 Browse the preview: https://deploy-preview-733--vitest-dev.netlify.app

@IgnusG IgnusG changed the title feat: support readonly tuples as input to .each Support readonly tuples as input to .each Feb 11, 2022
Using readonly tuples makes it easy to type check their individual parts inside the test.
@IgnusG
Copy link
Contributor Author

IgnusG commented Feb 11, 2022

I've added one test that would fail if the types get merged (const not used or respected). @sheremet-va let me know if that's alright or if it's not needed.

@antfu antfu changed the title Support readonly tuples as input to .each feat: support readonly tuples as input to .each Feb 11, 2022
@antfu antfu merged commit 73d36dc into vitest-dev:main Feb 11, 2022
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.

Add type support for const/readonly arrays in .each cases
3 participants