gulp

gulp

Module Plugin or UMD Plugin

Module Plugin or UMD Plugin A module plugin changes the shape of another module (either UMD or module). For example, in Moment.js, moment-range adds a new range method to the moment object. For the purposes of writing a declaration file, you’ll write the same code whether the module being changed is a plain module or UMD module.

Putting it all together

Putting it all together Just run: webpack Now open up index.html in your favorite browser and everything should be ready to use! You should see a page that says “Hello from TypeScript and React!”

Iterables

Iterables An object is deemed iterable if it has an implementation for the Symbol.iterator property. Some built-in types like Array, Map, Set, String, Int32Array, Uint32Array, etc. have their Symbol.iterator property already implemented. Symbol.iterator function on an object is responsible for returning the list of values to iterate on.

Add NPM dependencies

Add NPM dependencies Add the following "dependencies" to package.json to install Angular 2 and SystemJS: "dependencies": { "angular2": "2.0.0-beta.11", "systemjs": "0.19.24", },

TypeScript 1.7

async/await support in ES6 targets (Node v4+) TypeScript now supports asynchronous functions for engines that have native support for ES6 generators, e.g. Node v4 and above. Asynchronous functions are prefixed with the async keyword; await suspends the execution until an asynchronous function return promise is fulfilled and unwraps the value from the Promise returned. Example In the following example, each input element will be printed out one at a time with a 400ms delay: "use strict"; // pr

Number

Number As in JavaScript, all numbers in TypeScript are floating point values. These floating point numbers get the type number. In addition to hexadecimal and decimal literals, TypeScript also supports binary and octal literals introduced in ECMAScript 2015. let decimal: number = 6; let hex: number = 0xf00d; let binary: number = 0b1010; let octal: number = 0o744;

unscopables

Symbol.unscopables An Object whose own property names are property names that are excluded from the ‘with’ environment bindings of the associated objects.

“Do”s and “Don’t”s

“Do”s and “Don’t”s Many common mistakes in declaration files can be easily avoided. The Do’s and Don’ts section identifies common errors, describes how to detect them, and how to fix them. Everyone should read this section to help themselves avoid common mistakes.

Duo

Duo