tsx
tsx copied to clipboard
⚡️ TypeScript Execute: Node.js enhanced to run TypeScript & ESM
### Feature request `swc` as `tsx` compile backend alternative ### Why? - https://github.com/evanw/esbuild/issues/2605 Since Oct 11, 2022. `esbuild` seems have low interest to fix `--keep-names` - https://github.com/esbuild-kit/tsx/issues/113#issuecomment-1519340330 `ts-node` support `swc`,...
### Problem I declare enum in typings like it: ```ts // src/typings/main/index.d.ts declare const enum Test { hello = 'world', } ``` and `tsconfig.json` like it: ```json { "compilerOptions": {...
### Problem When [`resolvePackageJsonImports`](https://www.typescriptlang.org/tsconfig#resolvePackageJsonImports) is enabled in tsconfig.json, and they point to somewhere inside the `outDir` directory, TypeScript will resolve the package import as the same file but inside the...
### Bug description `tsx index.mts` to run `index.mts` imports `file.mjs` by `import x from "./file.mjs"` `file.mjs` imports `rootfile.mts` by `import x from "./rootfile.mjs"` I expect this to resolve `rootfile.mts` and...
### Bug description I discovered this while working in a monorepo. I am using TSX to watch my application project (`/apps/my-app`). I was making edits to one of my local...
### Bug description I was trying out making a custom REPL using Node's `repl` module when I came across this bug that was presumably introduced in #125. When running a...
### Bug description Pasting code into tsx REPL fails with newline characters ### Reproduction Paste a function into tsx REPL ``` // can't paste this into REPL let reflect1 =...
### Bug description Watch mode don't work if entry point was passed without extension (like .js or .ts on the end) **Exptecations** Three variants: 1) Watch mode will be working...
### Bug description Run `NODE_REPL_EXTERNAL_MODULE=$(which node-prototype-repl) tsx`. On confirming the first input, it crashes with various exceptions. Run `node-prototype-repl --loader tsx`, the `import` function doesn't work and always errors with...
### Bug description I have created one file named `main.ts` and am using `tsx watch ./main.ts` as my start script to watch the file. Locally everything is working fine (Node...