starters icon indicating copy to clipboard operation
starters copied to clipboard

fix(react-vite,vue-vite): add vitest type reference

Open diegoazh opened this issue 1 year ago • 5 comments

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

diegoazh avatar Feb 14 '24 16:02 diegoazh

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

sean-perkins avatar Feb 15 '24 23:02 sean-perkins

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 avatar Feb 16 '24 01:02 diegoazh

do you need anything else @sean-perkins?

diegoazh avatar Feb 22 '24 16:02 diegoazh

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

diegoazh avatar Mar 26 '24 13:03 diegoazh

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

diegoazh avatar Apr 11 '24 23:04 diegoazh