Use Union Types
  • References/JavaScript/TypeScript/Declaration Files

Use Union Types Don’t write overloads that differ by type in only one argument position:

2025-01-10 15:47:30
Integrating with Build Tools
  • References/JavaScript/TypeScript/Tutorials

Integrating with Build Tools You might have some more build steps in your pipeline. Perhaps you concatenate something to each of your files

2025-01-10 15:47:30
Install our dependencies
  • References/JavaScript/TypeScript/Tutorials

Install our dependencies Now we can use npm install to install packages. First install TypeScript and gulp globally. (You might

2025-01-10 15:47:30
Method Decorators
  • References/JavaScript/TypeScript/Decorators

Method Decorators A Method Decorator is declared just before a method declaration. The decorator is applied to the Property Descriptor

2025-01-10 15:47:30
Import a single export from a module
  • References/JavaScript/TypeScript/Modules

Import a single export from a module import { ZipCodeValidator } from "./ZipCodeValidator"; let

2025-01-10 15:47:30
The Impact of ES6 on Module Plugins
  • References/JavaScript/TypeScript/Declaration Files

The Impact of ES6 on Module Plugins Some plugins add or modify top-level exports on existing modules. While this is legal in CommonJS and other

2025-01-10 15:47:30
Scoping rules
  • References/JavaScript/TypeScript/Variable Declarations

Scoping rules var declarations have some odd scoping rules for those used to other languages. Take the following example:

2025-01-10 15:47:30
Abstract Classes
  • References/JavaScript/TypeScript/Classes

Abstract Classes Abstract classes are base classes from which other classes may be derived. They may not be instantiated directly. Unlike an

2025-01-10 15:47:30
Static Properties
  • References/JavaScript/TypeScript/Classes

Static Properties Up to this point, we’ve only talked about the instance members of the class, those that show up on the object when

2025-01-10 15:47:30
Constraints
  • References/JavaScript/TypeScript/Generics

Generic Constraints If you remember from an earlier example, you may sometimes want to write a generic function that works on a set of types

2025-01-10 15:47:30