Array methods stay typed
Because the element type is known, array methods return and accept the right types:
const nums: number[] = [1, 2, 3];
const doubled = nums.map((n) => n * 2); // number[], no manual annotation
const found = nums.find((n) => n > 1); // number | undefined
.find() returns T | undefined because a match is not guaranteed, the compiler forces you to handle the not-found case.