Update tsconfig.json Now that Angular 2 and its dependencies are installed, we need to enable TypeScript’s experimental support for decorators
Lay out the project Let’s start out with a new directory. We’ll name it proj for now, but you can change it to whatever you want
Consuming From there you’ll be able to use lodash in your TypeScript code with no fuss. This works for both modules and global code.
Preventing Name Conflicts Note that it’s possible to define many types in the global scope when writing a global declaration file. We strongly
Ambient Modules In Node.js, most tasks are accomplished by loading one or more modules. We could define each module in its own .d.ts
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
Library Structures The Library Structures guide helps
Understanding protected The protected modifier acts much like the private modifier with the exception
Tuple Tuple types allow you to express an array where the type of a fixed number of elements is known, but need not be the same. For example
Property Decorators A Property Decorator is declared just before a property declaration. A property decorator cannot be used in a declaration
Page 18 of 29