Type inference je TypeScript automaticky zjišťující typy z kontextu, takže nemusíte anotovat všechno. Odvozuje ze počátečních hodnot, return statements a použití.
ts
let x = 10; // inferred: number
let s = "hi"; // inferred: string
const arr = [1, 2];
obj = { : , : };
