ts-repl is a super-fast environment for exploring and experimenting with TypeScript on your local machine. Designed to run seamlessly within VSCode, it enables quick feedback and smooth experimentation.
- Blazing-fast transpilation: Built on SWC for near-instant code transformations.
- Local integration: Designed to work directly within VSCode, leveraging your local setup.
- Simple and lightweight: A minimal yet powerful setup for experimenting with TypeScript.
First, install dependencies with npm
.
npm install
Open the project in VSCode:
code .
To achieve functionality similar to Replit, add these entries to your keybindings.json file.
[
{
"key": "cmd+enter",
"command": "workbench.action.tasks.runTask",
"args": "build",
"when": "config.workspaceKeybindings.repl.enabled"
},
{
"key": "cmd+enter",
"command": "workbench.action.tasks.restartTask",
"args": "build",
"when": "config.workspaceKeybindings.repl.enabled && taskRunning"
}
]
-
Open
src/index.ts
-
Start experimenting with TypeScript syntax and features.
-
Update results on demand with Command+Enter, similar to Replit.
We welcome contributions! If you have ideas for new features, improvements, or bug fixes, feel free to open an issue or submit a pull request.