Inferred type predicates in 5.5, and the guards I deleted

A filter callback returning a boolean had needed an explicit type predicate to narrow, and 5.5 infers it.

const orders: (Order | null)[] = await load()

// before
const found = orders.filter((o): o is Order => o !== null)

// 5.5
const found = orders.filter((o) => o !== null)
// Order[], inferred

// it works when the function's only job is the check —
// a body with a branch or a side effect infers boolean
// as before.

The inference applies to a narrow shape and that is the right choice: a predicate inferred from a complicated body would be a guess. Deleting forty explicit predicates removed a construct most people write by copying, and the ones that remain are now signals that something non-obvious is being asserted.