Describe the bug
TypeScript 5.2 supports an upcoming ES feature, using: https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/
The syntax doesn't get transpiled by vitest, and then tests fail with the following error:
Error: Parse failure: Unexpected token (6:10)
At file: /home/projects/vitest-dev-vitest-uk35mv/test/basic.test.ts
Contents of line 6: using disposable = {
When I run the files that use the using syntax with https://github.com/esbuild-kit/tsx, it works just fine.
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-uk35mv?file=tsconfig.json,test%2Fbasic.test.ts&initialPath=__vitest__/
System Info
System:
OS: macOS 13.4
CPU: (12) arm64 Apple M2 Max
Memory: 2.24 GB / 64.00 GB
Shell: 5.9 - /opt/homebrew/bin/zsh
Binaries:
Node: 20.7.0 - ~/Workspace/letschurch/lets.church/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.1.0 - ~/Workspace/letschurch/lets.church/bin/npm
pnpm: 8.7.4 - /opt/homebrew/bin/pnpm
Browsers:
Chrome: 116.0.5845.187
Chrome Canary: 117.0.5863.0
Safari: 16.5
npmPackages:
vitest: ^0.34.5 => 0.34.5
Used Package Manager
npm
Validations
Describe the bug
TypeScript 5.2 supports an upcoming ES feature,
using: https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/The syntax doesn't get transpiled by vitest, and then tests fail with the following error:
When I run the files that use the
usingsyntax with https://github.com/esbuild-kit/tsx, it works just fine.Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-uk35mv?file=tsconfig.json,test%2Fbasic.test.ts&initialPath=__vitest__/
System Info
System: OS: macOS 13.4 CPU: (12) arm64 Apple M2 Max Memory: 2.24 GB / 64.00 GB Shell: 5.9 - /opt/homebrew/bin/zsh Binaries: Node: 20.7.0 - ~/Workspace/letschurch/lets.church/bin/node Yarn: 1.22.19 - /opt/homebrew/bin/yarn npm: 10.1.0 - ~/Workspace/letschurch/lets.church/bin/npm pnpm: 8.7.4 - /opt/homebrew/bin/pnpm Browsers: Chrome: 116.0.5845.187 Chrome Canary: 117.0.5863.0 Safari: 16.5 npmPackages: vitest: ^0.34.5 => 0.34.5Used Package Manager
npm
Validations