Type Typescript

Key points:

Example

type Point = {
	x: number;
	y: number;
}

let point:Point = {x: 10, y: 20};

type ID = string | number; // Union type
let userId: ID = "user123" // Valid
userId = 123; // Also valid