Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for node:test with --experimental-strip-types #3401

Open
bradleylandis opened this issue Oct 8, 2024 · 1 comment
Open

Support for node:test with --experimental-strip-types #3401

bradleylandis opened this issue Oct 8, 2024 · 1 comment

Comments

@bradleylandis
Copy link

Issue description or question

In addition to the Typescript compilers currently supported. I would like a way to use node's built in --experimental-strip-types. My tests currently pass from the command line with "node --experimental-strip-types --test **/*.test.ts"

Wallaby diagnostics report

@smcenlly
Copy link
Member

smcenlly commented Oct 8, 2024

Due to some technical complexity in adding support for --experimental-strip-types, we do not have plans to add support for node's built-in type stripping while it is an experimental feature.

Having said that, Wallaby supports type stripping using swc, which is what node.js is using under the covers. Node uses amaro, which is a wrapper around @swc/wasm-typescript. You can run Wallaby using the swc by installing @swc-node/register dependency (see our docs).

We have tested swc in the past, and found find that running with swc natively (as happens with @swc-node/register) was about 10x faster than when using the wasm version (which is what Node is using). Unfortunately, without adding support for --experimental-strip-types, we can't show / verify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants