A type predicate is a special kind of function return type. It tells the Typescript compiler what type a piece of data is.
// the `input is Value` is a type predicate
function isValue(input: unknown): input is Value;
The Typescript compiler relies heavily on type predicates to determine or not your code is safe to compile.
It's one of the features that attracted us to Typescript in the first place.