TypeScript · Type Guards · Senior · Live Coding
Type predicates with generics?
Short Interview Answer
Guards can be generic to narrow to T when runtime check confirms.
Detailed Explanation
Keep predicates honest. Avoid `x is T` without testing T's shape.