I came across some function declaration like below.
type DataType = TypeA | TypeB | TypeC;
function Func(data: DataType): data is TypeA {
...
}
I don't understand the is
part of the declaration. How it affects the return type of the function?