Outside of learning for yourself, you will need to have ways to share the work you’ve done with others. Throughout this handbook, we’ve focused on the browser’s URL as the way to share the Playground but that’s not the only option. All of the export options are available under “Export” in the editor toolbar. There are three main sections:
We have ways of generating useful markdown from your playground, either for reporting a bug to the TypeScript or for providing a summary link in a chat.
You can send the current playground code to another Playground-like system, for example the TypeScript AST Viewer.
Because the Playground has a strong focus on only presenting a single text file, that comes with limitations.
There are very good general purpose systems for running a node project in a browser like CodeSandbox and StackBlitz — the Playground will generate a very close approximation of the current environment with corresponding package.json, tsconfig.json and index.{ts, tsx, js, jsx, .d.ts} files and recreate that node project in one of the other services. This export gives you the chance to carry on working when you hit a wall with the available features in the Playground.
There’s also a “Tweet this Playground” because why not?