Overloads and Callbacks
  • References/JavaScript/TypeScript/Declaration Files

Overloads and Callbacks Don’t write separate overloads that differ only on callback arity:

2025-01-10 15:47:30
Update tsconfig.json
  • References/JavaScript/TypeScript/Tutorials

Update tsconfig.json Now that Angular 2 and its dependencies are installed, we need to enable TypeScript’s experimental support for decorators

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

Global Libraries A global library is one that can be accessed from the global scope (i.e. without using any form of import)

2025-01-10 15:47:30
Organizing Types
  • References/JavaScript/TypeScript/Declaration Files

Organizing Types Documentation The greeter object can log to a file or display

2025-01-10 15:47:30
Using tsconfig.json
  • References/JavaScript/TypeScript/Project Configuration

Using tsconfig.json By invoking tsc with no input files, in which case the compiler searches for the tsconfig.json file starting

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

Property Decorators A Property Decorator is declared just before a property declaration. A property decorator cannot be used in a declaration

2025-01-10 15:47:30
Babel
  • References/JavaScript/TypeScript/Tutorials

Babel First install Babelify and the Babel preset for ES2015. Like Uglify, Babelify mangles code, so we’ll need vinyl-buffer and gulp-sourcemaps

2025-01-10 15:47:30
Write a simple Angular app in TypeScript
  • References/JavaScript/TypeScript/Tutorials

Write a simple Angular app in TypeScript First, change the code in app.ts to:

2025-01-10 15:47:30
Exhaustiveness checking
  • References/JavaScript/TypeScript/Advanced Types

Exhaustiveness checking We would like the compiler to tell us when we don’t cover all variants of the discriminated union. For example, if we

2025-01-10 15:47:30
Intersection Types
  • References/JavaScript/TypeScript/Advanced Types

Intersection Types An intersection type combines multiple types into one. This allows you to add together existing types to get a single type

2025-01-10 15:47:30