mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
ts semantic highlighting: support alias
This commit is contained in:
@@ -39,8 +39,11 @@ function collectTokens(jsLanguageService: ts.LanguageService, fileName: string,
|
||||
return;
|
||||
}
|
||||
if (ts.isIdentifier(node)) {
|
||||
const symbol = typeChecker.getSymbolAtLocation(node);
|
||||
let symbol = typeChecker.getSymbolAtLocation(node);
|
||||
if (symbol) {
|
||||
if (symbol.flags & ts.SymbolFlags.Alias) {
|
||||
symbol = typeChecker.getAliasedSymbol(symbol);
|
||||
}
|
||||
let typeIdx = classifySymbol(symbol);
|
||||
if (typeIdx !== undefined) {
|
||||
let modifierSet = 0;
|
||||
|
||||
Reference in New Issue
Block a user