-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 typescript natively #929
Comments
Hey @ziimakc, Hmm... This should work: "test:smoke:strip-types": "node --experimental-strip-types test/smoke/ts.test.ts", What's your use case? |
Anyway, it seems reasonable provide overriding the default ext (.mjs) in some cases. |
It will be cool if zx have support for ts without any other:
zx can spawn a node with |
npx accepts node flags via NODE_OPTIONS for its own internal spawn: |
@antongolub I just want to run typescript files to ensure scripts are correct. |
In this case tsc is required to check (not only strip) types. |
@antongolub yes, tsc to check types and
Indeed, I was confused a bit because of zx explicit imports are required then. |
* feat(cli): allow to override default script extension closes #929 * test: up size-limit * docs: mention `--ext` flag in man * refactor: handle extensions without dot
Allow to run typescript files natively.
The flag --experimental-strip-types enables Node.js to run TypeScript files. https://nodejs.org/api/typescript.html
Flag is available in current LTS node v22.
The text was updated successfully, but these errors were encountered: