Do you support User Defined Type Guards?
May I ask you to add documentation about this?
/**
* Just some interfaces
*/
interface Foo {
foo: number;
common: string;
}
interface Bar {
bar: number;
common: string;
}
/**
* User Defined Type Guard!
*/
function isFoo(arg: any): arg is Foo {
return arg.foo !== undefined;
}
How to get arg is Foo? What is the relation to this block and arg as a parameter? How to get type of Foo.
It would be great if add this to your documentation.
See here:
https://ts-ast-viewer.com/#code/GYVwdgxgLglg9mABDAzgMTnAFAQwE4DmAXIjmAJ4CUJ+ByKiGciA3gLABQi3ieAplBB4ktAHTBMiAIQBeGYnAATPsBhg+igNycAvkA
It's a TypePredicate. I just wrapped that node in 4.2.0 (see #722).
I don't know if I'm going to add documentation for it though beyond what's in the JS docs (I need to revamp the documentation).
@dsherret
I can not find any getTypePredicate() or something like this.

May I ask you to share an example?
Use getReturnTypeNode() then check if that is a type predicate using TypeGuards.isTypePredicateNode.