Closed IMax153 closed 1 year ago
Because this happens only with esbuild, this is an upstream issue. Please create an issue to esbuild.
The fix for this has been published by the way. Thanks for reporting it in the esbuild repo.
Thanks for the fix 💚
Describe the bug
When running
vitest
, annotating the following re-exported function with it's type:causes
vitest
to fail with the following error:The error references an
Unexpected "..."
in the type annotation (preceding the tuple parameter) even though this is perfectly valid typescript.Removing the type annotation causes tests to pass successfully:
Downstream issue for reference: https://github.com/vitest-dev/vitest/issues/2157
Reproduction
https://gitpod.io/#https://github.com/fp-ts/data
Steps to reproduce
Navigate to the following GitPod url:
Add the type annotation to
tuple
in theSafeEval
module here.Run
pnpm install
followed bypnpm test
.System Info
Used Package Manager
pnpm
Logs
No response
Validations