Playground
TypeScript playground
This runs the real TypeScript compiler, not a tool that strips the types and hopes. Your code is type-checked first, and a type error stops it before a single line executes, with the compiler's own message. How the sandbox works, and its honest limits, is on the code execution and security page.
TypeScript 5.9.3 (the real compiler, self-hosted)
Ctrl/Cmd+Enter to run
Press Esc then Tab to move keyboard focus out of the code editor.
Ready
Output will appear here after you run your code.Not sure what to type?
A blank editor is the hard place to start. The TypeScript exercises hand you a program that already runs and ask you to change one thing.