Welcome to the Playground Handbook

The TypeScript playground is an online environment where people can write and share TypeScript-ish code. We say “ish” because you can work with .ts, .tsx, .js, .jsx and .d.ts files inside the playground. The goal for the Playground is to be a safe environment which requires no setup, is a single text document, can be trivially shared with others, where URLs still works years down the line. In summary, a teaching tool where you can safely experiment.

From day one in 2012, the TypeScript website has featured a playground as a way to highlight the difference between the TypeScript code you write and the JavaScript which is emitted. Today, the Playground has a massive set of features because the needs of developers using TypeScript has grown in scope - there’s over a hundred tsconfig.json flags. Developers need a safe way to be able to reproduce a particular TypeScript environment which can be shared with others.

This handbook will guide you through the feature set of the Playground, explain why these features exist and help you master them. It is generally meant to be read in order, and you should be able to get through the handbook in about 25 minutes. Assuming you don’t dive into too many rabbit holes. That said, the rabbit holes tend to be where the fun complexity lives and time is an illusion anyway. So, we’ll get started over at the Compiler Settings page.