Cal's TypeScript slides

Functions

Declaring functions

Type Annotations

Every function has a type signature

 

Specify parameter types

 

All functions have an implicit output type (whatever's returned)

 

However you can explicitly specify the return type as well

Optional Parameters

Default Parameters

Rest Parameters

deck

By Calvin Belden

deck

  • 969