🎯 Basics & Type Declarations

🧩 Special Types & Modifiers

🔁 Enums

enum UI { React, Vue, Angular }
let z = UI.Angular // 2

🎭 Type Assertions

let x = y as string
ele!.focus() // non-null assertion

⛓️ Intersection & Union Types

type Cat = { name: string }
type Domestic = { owner: string }
let kitty: Cat & Domestic //extends Both

let x: boolean | string // one of list

📦 Tuples & Constants

let p: [string, number] //fixed length typed array
let k = 2, v = true
let z = [k, v] as const // [2, true] <-- most narrow type possible

🛠️ Declarations & Generics