Skip to content

getTypeAtLocation fails on a PropertyAccessExpression in a type position #37901

@uniqueiniquity

Description

@uniqueiniquity

TypeScript Version: 3.8.3

Search Terms:
getTypeAtLocation

Code

declare class SomeClass implements NodeJS.CallSite {
  //
}

Expected behavior:
getTypeAtLocation on the PropertyAccessExpression node for NodeJS.CallSite should return CallSite.

Actual behavior:
Instead, it returns any with intrinsic name error.

Notes
Note that getTypeAtLocation on the parent ExpressionWithTypeArguments does actually succeed.

Playground Link: N/A

Related Issues: #35233

Thanks to @bradzacher for finding this!

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions