Type Widening

You widen a type when you assign a value to a variable where the variable has a supertype of the value.

1
2
// The value 72 is assigned to the wide type of "number"
const myVariable: number = 72;