Show Menu
Cheatography

TypeScript Cheat Sheet Cheat Sheet (DRAFT) by

Get started with TypeScript

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Install TypeScript

npm install typescript --save-dev
// JavaScript let foo = "­hel­lo"; foo = 55; // foo has changed type from a string to a number - no problem // TypeScript let foo = "­hel­lo"; foo = 55; // ERROR - foo cannot change from string to number`
   

interface

<?php // This is a code block. // It preserves indent­ation and // uses a monospaced font.
<?php // This is a code block. // It preserves indent­ation and // uses a monospaced font.
<?php // This is a code block. // It preserves indent­ation and // uses a monospaced font.
var x = 12