This is a plugin for VSCode that provides an interactive programming experience for the TypeScript programming language.
Debugging one function shouldn't require running the entire program.
It should not be a chore to do good things. Running code is ultimately how we know it works. The ability to do this easier and faster has compunding effects on software development.
An integrated project REPL environment lets you write and evaluate code one moment and ship it the next.
macOS
typescript-repl.evaluate
: Evaluate the current selection.typescript-repl.evaluate-file
: Evaluate the current file.
Q: How do I run shell commands?
A: Either:
- Set cwd when running exec* commands:
import {execSync} from "node:child_process"
execSync("ls", {cwd: "/some/path"})
- Set the root directory for the node process by evaluating
process.chdir
:
// In any file
process.chdir("/some/path")
process.cwd() // "/some/path"