Get resolved type (like the language server does)
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 238
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Sorry if this doesn't belong here but I'm not able to find any discussion forum for `ts-morph`. Please direct me if there is one.
What I'd like is a fully resolved type, similar when you hover over an identifier in VSCode.

What I've tried:
```ts
for (const node of nodesOfInterest) {
const id = node.getFirstChildByKind(tsm.SyntaxKind.Identifier);
const defs = inProject
.getLanguageService()
.compilerObject.getDefinitionAndBoundSpan(
node.compilerNode.getSourceFile().fileName,
id.compilerNode.pos
);
console.log(
node.compilerNode.getSourceFile().fileName,
id.compilerNode.pos,
id.compilerNode.text,
defs
);
// defs is always either undefined or empty
}
```
I've tried `getDefinitionAndBoundSpan`, `getTypeDefinitionAtPosition` and `getDefinitionAtPosition`
Contributor guide
Assessment
This issue has not been assessed yet.