Home » Featured, Headline

Angular2 – Typescript cheatsheet

29 July 2016 No Comment
    This cheat sheet is provisional and may change!

Installing Typescript and its typings

tsd install  // install typings package command
typings install // install ttypings package command
typings install dt~underscore --global --save // install typings for underscore

Declaring third party libraries.

declare var <third-party-namespace>: any;
declare var JSONEditor: any;

Importing third party libraries.

import * as _ from 'underscore'; // import underscore to be used inside ts code

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Anti-spam image