Starting from the ts.Node for the initializer of p.prop1 below, is there a simple way to get the resolved type info (including doc tags/comment) for Props.prop1 using a type checker?
interface Props {
/**
* Doc comment
* @tag
*/
prop1: string;
}
const p: Props = { prop1: 'hello' };
// ^^^^^
I'm aware of APIs like getTypeAtLocation, getDeclaredTypeOfSymbol, getApparentType, and getPropertyOfType, but haven't been able to figure out how to combine them (or what other APIs might be needed) to do what I want. Calling typeChecker.getSymbolAtLocation(node) on the prop1 initializer node returns a symbol which doesn't have the full type information.
(Ultimately what I want is the JSDoc tags, which once you have the right ts.Symbol can be acquired with symbol.getJsDocTags().)