fix(language-service): only use canonical symbols
Language service was treating some alias TypeScript symbols as if they where the canonical symbol. If the symbol in scope is an alias of another symbol the symbol should be converted to the canonical symbol.
This commit is contained in:
parent
7165eb15bd
commit
5a88d2f68b
|
@ -811,10 +811,15 @@ class TypeWrapper implements Symbol {
|
|||
}
|
||||
|
||||
class SymbolWrapper implements Symbol {
|
||||
private symbol: ts.Symbol;
|
||||
private _tsType: ts.Type;
|
||||
private _members: SymbolTable;
|
||||
|
||||
constructor(private symbol: ts.Symbol, private context: TypeContext) {}
|
||||
constructor(symbol: ts.Symbol, private context: TypeContext) {
|
||||
this.symbol = symbol && context && (symbol.flags & ts.SymbolFlags.Alias) ?
|
||||
context.checker.getAliasedSymbol(symbol) :
|
||||
symbol;
|
||||
}
|
||||
|
||||
get name(): string { return this.symbol.name; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue