Generics
  • References/JavaScript/TypeScript/Type Compatibility

Generics Because TypeScript is a structural type system, type parameters only affect the resulting type when consumed as part of the type of

2025-01-10 15:47:30
unscopables
  • References/JavaScript/TypeScript/Symbols

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

2025-01-10 15:47:30
Publicize your declaration file
  • References/JavaScript/TypeScript/Declaration Files

Publicize your declaration file After publishing your declaration file with your package, make sure to add a reference to it in the

2025-01-10 15:47:30
Setting up your Directories
  • References/JavaScript/TypeScript/Tutorials

Setting up your Directories If you’re writing in plain JavaScript, it’s likely that you’re running your JavaScript directly, where your

2025-01-10 15:47:30
Add Angular to the gulp build
  • References/JavaScript/TypeScript/Tutorials

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:

2025-01-10 15:47:30
Additional module resolution flags
  • References/JavaScript/TypeScript/Module Resolution

Additional module resolution flags A project source layout sometimes does not match that of the output. Usually a set of build steps result

2025-01-10 15:47:30
<amd-dependency />
  • References/JavaScript/TypeScript/Triple-Slash Directives

/// <amd-dependency /> Note: this directive has been deprecated. Use import "moduleName";

2025-01-10 15:47:30
Re-exports
  • References/JavaScript/TypeScript/Modules

Re-exports Often modules extend other modules, and partially expose some of their features. A re-export does not import it locally, or introduce

2025-01-10 15:47:30
Module Augmentation
  • References/JavaScript/TypeScript/Declaration Merging

Module Augmentation Although JavaScript modules do not support merging, you can patch existing objects by importing and then updating them.

2025-01-10 15:47:30
Needless Namespacing
  • References/JavaScript/TypeScript/Namespaces & Modules

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:

2025-01-10 15:47:30