Generics Because TypeScript is a structural type system, type parameters only affect the resulting type when consumed as part of the type of
Symbol.unscopables An Object whose own property names are property names that are excluded from the ‘with’ environment bindings
Publicize your declaration file After publishing your declaration file with your package, make sure to add a reference to it in the
Setting up your Directories If you’re writing in plain JavaScript, it’s likely that you’re running your JavaScript directly, where your
Add Angular to the gulp build Finally, we need to make sure that the Angular files are copied as part of the build. We need to add:
Additional module resolution flags A project source layout sometimes does not match that of the output. Usually a set of build steps result
/// <amd-dependency /> Note: this directive has been deprecated. Use import "moduleName";
Re-exports Often modules extend other modules, and partially expose some of their features. A re-export does not import it locally, or introduce
Module Augmentation Although JavaScript modules do not support merging, you can patch existing objects by importing and then updating them.
Needless Namespacing If you’re converting a program from namespaces to modules, it can be easy to end up with a file that looks like this:
Page 3 of 29