mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06:00
Use local meaning for variables in quick info.
This means we no longer indicate a variable is an interface if it shares the a name with one.
This commit is contained in:
parent
eb5d378d55
commit
66e1e47d2e
@ -2395,11 +2395,6 @@ module ts {
|
||||
totalParts.push(spacePart());
|
||||
totalParts.push.apply(totalParts, typeInfoResolver.symbolToDisplayParts(symbol, sourceFile));
|
||||
}
|
||||
else if (symbol.flags & SymbolFlags.Interface) {
|
||||
totalParts.push(keywordPart(SyntaxKind.InterfaceKeyword));
|
||||
totalParts.push(spacePart());
|
||||
totalParts.push.apply(totalParts, typeInfoResolver.symbolToDisplayParts(symbol, sourceFile));
|
||||
}
|
||||
else if (symbol.flags & SymbolFlags.Enum) {
|
||||
totalParts.push(keywordPart(SyntaxKind.EnumKeyword));
|
||||
totalParts.push(spacePart());
|
||||
@ -2410,12 +2405,19 @@ module ts {
|
||||
totalParts.push(spacePart());
|
||||
totalParts.push.apply(totalParts, typeInfoResolver.symbolToDisplayParts(symbol, sourceFile));
|
||||
}
|
||||
else if (symbol.flags & SymbolFlags.TypeParameter) {
|
||||
totalParts.push(punctuationPart(SyntaxKind.OpenParenToken));
|
||||
totalParts.push(new SymbolDisplayPart("type parameter", SymbolDisplayPartKind.text, undefined));
|
||||
totalParts.push(punctuationPart(SyntaxKind.CloseParenToken));
|
||||
totalParts.push(spacePart());
|
||||
totalParts.push.apply(totalParts, typeInfoResolver.symbolToDisplayParts(symbol));
|
||||
else if (getMeaningFromLocation(node) === SemanticMeaning.Type) {
|
||||
if (symbol.flags & SymbolFlags.Interface) {
|
||||
totalParts.push(keywordPart(SyntaxKind.InterfaceKeyword));
|
||||
totalParts.push(spacePart());
|
||||
totalParts.push.apply(totalParts, typeInfoResolver.symbolToDisplayParts(symbol, sourceFile));
|
||||
}
|
||||
else if (symbol.flags & SymbolFlags.TypeParameter) {
|
||||
totalParts.push(punctuationPart(SyntaxKind.OpenParenToken));
|
||||
totalParts.push(new SymbolDisplayPart("type parameter", SymbolDisplayPartKind.text, undefined));
|
||||
totalParts.push(punctuationPart(SyntaxKind.CloseParenToken));
|
||||
totalParts.push(spacePart());
|
||||
totalParts.push.apply(totalParts, typeInfoResolver.symbolToDisplayParts(symbol));
|
||||
}
|
||||
}
|
||||
else {
|
||||
totalParts.push(punctuationPart(SyntaxKind.OpenParenToken));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user