What is a 'type predicate' in TypeScript and what QA problem does it solve?
-
A
A compiler flag that predicates type inference
-
B
A function return type of `param is Type` that narrows the type in calling code
-
C
An assertion that throws if a type is wrong
-
D
A generic constraint on class constructors