A persistent, offline, quasi-REPL for TypeScript that promotes coding with rapid feedback. Ideal for:
- Learning TypeScript itself.
- Experimenting with npm packages.
- Practising coding challenges.
- Demonstrating code.
- Building a 'functional core' independently of an 'imperative shell'.
- Modelling a domain, in isolation or interactively with a domain expert.
- For a Node.js REPL, use the
node
command. - For a Bun REPL, use the
bun repl
command. - For online environments consider the official TypeScript Playground or another online environment.
- For a "REPL as document" notebook, consider Node.js Notebooks (REPL).
- To share code snippets, consider GitHub gist.
Clone the repository:
git clone https://github.com/RyanNieuwoudt/TypeScript-Playground.git
Alternatively, Open in Visual Studio Code and select "Clone repo in container volume" for a supported environment.
The playground supports npm, yarn and bun. From a terminal in the TypeScript-Playground
directory:
npm install
or
yarn install
or
bun install
npm run watch
or
yarn watch
or
bun watch run
With the playground started:
- Observe the output.
- Save changes to the code.
- Repeat.