Glossary: TypeScript Beyond the Basics
Type predicate
Also written: x is T, type predicates
A return type of the form `value is Type`. When the function returns `true`, TypeScript narrows the argument to that type.
Glossary: TypeScript Beyond the Basics
Also written: x is T, type predicates
A return type of the form `value is Type`. When the function returns `true`, TypeScript narrows the argument to that type.