TypeScript
TypeScript copied to clipboard
getSymbolAtLocation returns wrong symbol for import alias in RHS of "import ="
module SomeModule { export class SomeClass {} }
import M = SomeModule; // or import M = require(...)
import C = M.SomeClass;
On the M identifier in M.SomeClass, getSymbolAtLocation returns the SomeModule module symbol, rather than the alias M to it.
This affects renaming, find references, and occurrence highlighting:
- If you select the
Minimport M = ..., the secondMwill not be found - If you select the
Minimport C = M.SomeClass, the firstMwill not be found, but the twoSomeModulereferences will be found instead.
Yeah, rename on aliases seems to be extremely broken.
