You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Error says the following.
S2345: Argument of type 'UserConfigExport' is not assignable to parameter of type 'UserConfig | Promise'. Type 'UserConfigFn' is not assignable to type 'UserConfig | Promise'.
Question:
Can I fix it, or is it only able inside the Vite Package itself? Is there an Update to fix that?
Is it bad to have a TS error (like that) on a fresh install. Should I worry about TS Errors or are they not important?
Ported from vitejs/vite#13792
Fully fixes issues like vuejs/create-vue#317
and vuejs/create-vue#313
For an easy reproduction, please refer to https://github.com/sodatea/viteste-define-config-bug-repro
I didn't include a test in this PR because:
1. The reproduction is a bit complicated, it only fails on the very
latest Vite versions, but updating Vite would mess up the lockfile.
2. By not updating the dependencies, we can make sure that this fix is
compatible with older versions of Vite, too.
Is it bad to have a TS error (like that) on a fresh install. Should I worry about TS Errors or are they not important?
It's bad, but not that important. The code still runs despite the type issue.
The type-check command only checks src at the moment, as they are the most important ones.
That's also why we didn't catch the issue in our own tests.
(We are considering making it more comprehensive, though #274)
See issue on Discord
Hi!
I just made a fresh install (vue@3.3.4, vite@4.4.6)
npm init vue@latest
.Sadly I have a TS Error in vitest.config.ts:7
The Error says the following.
S2345: Argument of type 'UserConfigExport' is not assignable to parameter of type 'UserConfig | Promise'. Type 'UserConfigFn' is not assignable to type 'UserConfig | Promise'.
Question:
How to Reproduce
npm create vite@latest
The text was updated successfully, but these errors were encountered: