Dependencies on Global Libraries If your library depends on a global library, use a /// <reference types="..." /> directive:
Disallowed Merges Not all merges are allowed in TypeScript. Currently, classes can not merge with other classes or with variables. For information
/// <reference path="..." /> The /// <reference path="..." /> directive is the most common of this group
Dependencies All dependencies are managed by npm. Make sure all the declaration packages you depend on are marked appropriately in the
Type Guards and Differentiating Types Union types are useful for modeling situations when values can overlap in the types they can take on.
Deep Dive For seasoned authors interested in the underlying mechanics of how declaration files work, the
Value-based elements Value based elements are simply looked up by identifiers that are in scope.
// Type definitions for [~THE LIBRARY NAME~] [~OPTIONAL VERSION NUMBER~] // Project: [~THE PROJECT NAME~] // Definitions by: [~YOUR
Symbol.search A regular expression method that returns the index within a string that matches the regular expression. Called by
Polymorphic this types A polymorphic this type represents a type that is the subtype of the containing class
Page 16 of 29