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(react-vite,vue-vite): add vitest type reference #1832

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

diegoazh
Copy link
Contributor

@diegoazh diegoazh commented Feb 14, 2024

This change solves the TS error on the Vite config object following the Vitest documentation.

@diegoazh diegoazh requested a review from a team as a code owner February 14, 2024 16:47
@diegoazh diegoazh requested review from sean-perkins and removed request for a team February 14, 2024 16:47
@sean-perkins
Copy link
Contributor

Hello @diegoazh thanks for the contribution! Can you provide a link to the documentation that suggests this approach?

@diegoazh
Copy link
Contributor Author

diegoazh commented Feb 16, 2024

Sure @sean-perkins, you can check it here, on the second code example.

Summarizing you can use the defineConfig method from vitest/config or use the three slashes approach to import all needed types from Vitest.

To avoid changing code because the error is only a type inference I decided to use the three slashes approach here. I think is clean and clear enough.

@diegoazh
Copy link
Contributor Author

do you need anything else @sean-perkins?

@diegoazh
Copy link
Contributor Author

What happens with this PR? How should I continue to merge this change?

@diegoazh
Copy link
Contributor Author

💪🏼 all tests passed successfully 🎉, let me know if I can help with anything else to merge this. Thank you.

This change solves the TS error con the Vite config object following the Vitest documentation.
Copy link
Contributor

@sean-perkins sean-perkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 👍

@sean-perkins sean-perkins enabled auto-merge (squash) April 24, 2024 15:17
@sean-perkins sean-perkins merged commit 8e08ccb into ionic-team:main Jun 6, 2024
29 checks passed
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

3 participants