Functions
Learning TypeScript's Functions chapter shows how a function's parameters and return types can be inferred or explicitly declared in TypeScript:
- Declaring function parameter types with type annotations
- Declaring optional parameters, default values, and rest parameters to change type system behavior
- Declaring function return types with type annotations
- Describing functions that don't return a usable value with the
void
type - Describing functions that don't return at all with the
never
type - Declaring function types in type annotations
- Using function overloads to describe varying function call signatures