Dependencies on Modules
  • References/JavaScript/TypeScript/Declaration Files

Dependencies on Modules If your library depends on a module, use an import statement:

2025-01-10 15:47:30
Global Functions
  • References/JavaScript/TypeScript/Declaration Files

Global Functions Documentation You can call the function greet with a string

2025-01-10 15:47:30
“Do”s and “Don’t”s
  • References/JavaScript/TypeScript/Declaration Files

“Do”s and “Don’t”s Many common mistakes in declaration files can be easily avoided. The

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

/// <amd-module /> By default AMD modules are generated anonymous. This can lead to problems when other tools are used to

2025-01-10 15:47:30
Indexable Types
  • References/JavaScript/TypeScript/Interfaces

Indexable Types Similarly to how we can use interfaces to describe function types, we can also describe types that we can “index into” like

2025-01-10 15:47:30
TypeScript 1.4
  • References/JavaScript/TypeScript/What's New

Union types Overview Union types are a powerful way to express a value that can be one of several types

2025-01-10 15:47:30
Ambient Namespaces
  • References/JavaScript/TypeScript/Namespaces

Ambient Namespaces The popular library D3 defines its functionality in a global object called d3. Because this library is loaded

2025-01-10 15:47:30
Publish to @types
  • References/JavaScript/TypeScript/Declaration Files

Publish to @types Packages on under the

2025-01-10 15:47:30
Type assertions
  • References/JavaScript/TypeScript/Basic Types

Type assertions Sometimes you’ll end up in a situation where you’ll know more about a value than TypeScript does. Usually this will happen when

2025-01-10 15:47:30
Multi-file namespaces
  • References/JavaScript/TypeScript/Namespaces

Multi-file namespaces Here, we’ll split our Validation namespace across many files. Even though the files are separate, they can

2025-01-10 15:47:30