Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agentcooper/typescript-play
Better TypeScript playground
https://github.com/agentcooper/typescript-play
playground typescript
Last synced: about 2 months ago
JSON representation
Better TypeScript playground
- Host: GitHub
- URL: https://github.com/agentcooper/typescript-play
- Owner: agentcooper
- Archived: true
- Created: 2018-04-09T11:10:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-08T20:28:05.000Z (about 5 years ago)
- Last Synced: 2024-05-11T15:33:57.523Z (7 months ago)
- Topics: playground, typescript
- Language: JavaScript
- Homepage: https://typescript-play.js.org
- Size: 2 MB
- Stars: 245
- Watchers: 7
- Forks: 39
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - typescript-play - Better TypeScript playground (JavaScript)
- awesome-list - typescript-play
README
⚠️ **Please use [the offical TypeScript playground](http://www.typescriptlang.org/play/index.html), now it has all the same features and even more. Use https://github.com/microsoft/TypeScript-Website/issues for issues and questions.**
# [TypeScript playground](https://typescript-play.js.org)
A better TypeScript playground.
Website: https://typescript-play.js.org.
Differences from https://www.typescriptlang.org/play:
* All strict options turned on by default
* More available compiler options
* Ability to switch TypeScript version
* More space for code
* More examples
* Quicker sharing, URL updates as you type
* Shorter sharing URLs## Getting started
```
npm install
npm run setup
npm start
```## Updating TypeScript
Playground relies on [UNPKG](https://unpkg.com) to fetch `monaco-editor` (contains `typescript` through [`monaco-typescript`](https://github.com/Microsoft/monaco-typescript) package).
In case if `monaco-editor` is not updated to the latest TypeScript, the latest version can be built with `npm run get-typescript latest` and served locally.
If you run into errors, the latest monaco version may be incompatible with the latest typescript version,
in which case you'll need to update monaco-typescript upstream, or apply a patch locally (see the `# Patches` section in [get-typescript.sh](scripts/get-typescript.sh).In case you want to serve some specific version of TypeScript locally you should run `npm run get-typescript `. For example, to serve TypeScript version 2.8.3 you should run `npm run get-typescript 2.8.3; npm start`
## Browser compatibility
Tested with:
* Chrome 65
* Safari 11
* Firefox 58
* Microsoft Edge 41## Prior art
* https://fabiandev.github.io/typescript-playground/
* http://hi104.github.io/typescript-playground-on-ace/
* http://drake7707.github.io/Typescript-Editor/
* http://niutech.github.io/typescript-interpret/## Other useful links
* https://typescript-api-playground.glitch.me/ – exlore TS transforms
* https://ts-ast-viewer.com/ – TS AST viewer
* https://ts-creator.js.org/ - turn TypeScript code into AST builder expressions