This chapter gives tips for quickly trying out TypeScript.
The TypeScript Playground is an online editor for TypeScript code. Features include:
The Playground is very useful for quick experiments and demos. It can save both TypeScript code snippets and compiler settings into URLs, which is great for sharing such snippets with others. This is an example of such a URL:
TS Node is a TypeScript version of Node.js. Its use cases are:
TS Node provides a REPL (command line) for TypeScript:
$ ts-node > const twice = (x: string) => x + x; > twice('abc') 'abcabc' > twice(123) Error TS2345: Argument of type '123' is not assignable to parameter of type 'string'.
mocha --require ts-node/register --ui qunit testfile.ts
npx ts-node to run the REPL without installing it.