Add a TypeScript configuration file You’ll want to bring your TypeScript files together - both the code you’ll be writing as well as any necessary
Install typings for dependencies Angular 2 includes es6-shim for Promise support, but TypeScript still needs the types. Open a command prompt
// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~] // Project: [~THE PROJECT NAME~] // Definitions by: [~YOUR
Exporting a declaration Any declaration (such as a variable, function, class, type alias, or interface) can be exported by adding the export
Install ASP.NET Core and TypeScript First, install ASP.NET Core if you need
Writing the function type Now that we’ve typed the function, let’s write the full type of the function out by looking at the each piece of the
ES6 Modules TypeScript 1.5 supports ECMAScript 6 (ES6) modules. ES6 modules are effectively TypeScript external modules with a new syntax:
webpack
Write a simple Angular app in TypeScript First, change the code in app.ts to:
Property Decorators A Property Decorator is declared just before a property declaration. A property decorator cannot be used in a declaration
Page 22 of 29