Add TypeScript code Right click on src and click New Item. Then choose TypeScript File and name
Update tsconfig.json Now that Angular 2 and its dependencies are installed, we need to enable TypeScript’s experimental support for decorators
Object destructuring You can also destructure objects: let o = {
Call the script from a view In the Solution Explorer, open Views
Weeding out Errors Like we mentioned, it’s not unexpected to get error messages after conversion. The important thing is to actually go one
Decorator Factories If we want to customize how a decorator is applied to a declaration, we can write a decorator factory. A Decorator Factory
Reusable Types (Type Aliases) Documentation Anywhere a greeting is expected, you can provide
Symbol.hasInstance A method that determines if a constructor object recognizes an object as one of the constructor’s instances
Typing the function Let’s add types to our simple examples from earlier: function
Re-exports Often modules extend other modules, and partially expose some of their features. A re-export does not import it locally, or introduce
Page 1 of 29