A ts-morph Project instance with source files already added.
Resolves the TypeScript type at the given 1-based position.
Absolute path of the source file.
1-based line number.
1-based column number.
Resolved type information, or a fallback with typeString: 'unknown'.
Resolves TypeScript types at source positions via ts-morph. Uses the ts-morph language service and type checker.
Remarks
Useful in bug investigation to understand what type a variable holds at a specific location, including whether it is nullable, async, or wraps a generic parameter.
Example