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
Based on the checked "Allow running vitest typecheck even, if there are no potential tests (vitest still shows source errors)" in #2107, I'd assume vitest can act as a typechecker, even in the absence of explicit type tests.
However it appears Vitest does not perform typechecks if there are no typecheck tests detected. I was hoping to rely on Vitest for typechecking as there may be tests added later on, and just let it do "basic" typechecking for the time being but it seems this is currently not supported (requires at least dummy test case).
I think there might be someone who doesn't want the type check of the source code as well, because maybe it's the performance. So I think this is the expected action but is it better to support this?
I think there might be someone who doesn't want the type check of the source code as well, because maybe it's the performance. So I think this is the expected action but is it better to support this?
If they don't have type tests and don't want to run typechecker on their source code, then they simply shouldn't use --typecheck flag.
Describe the bug
Based on the checked "Allow running vitest typecheck even, if there are no potential tests (vitest still shows source errors)" in #2107, I'd assume vitest can act as a typechecker, even in the absence of explicit type tests.
However it appears Vitest does not perform typechecks if there are no typecheck tests detected. I was hoping to rely on Vitest for typechecking as there may be tests added later on, and just let it do "basic" typechecking for the time being but it seems this is currently not supported (requires at least dummy test case).
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-wbddaw
Observe the lack of type error reported. If a file named
a.test-d.ts
is created, type errors will start being reported.System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: