Only show implementations code lens on top level interface

This commit is contained in:
Matt Bierner
2017-03-03 14:06:41 -08:00
parent 4ebfc2fc18
commit d1d30da52b

View File

@@ -65,19 +65,8 @@ export default class TypeScriptImplementationsCodeLensProvider extends TypeScrip
protected extractSymbol(
document: TextDocument,
item: Proto.NavigationTree,
parent: Proto.NavigationTree | null
_parent: Proto.NavigationTree | null
): Range | null {
// Handle children of interfaces
if (parent && parent.kind === PConst.Kind.interface) {
switch (item.kind) {
case PConst.Kind.memberFunction:
case PConst.Kind.memberVariable:
case PConst.Kind.memberGetAccessor:
case PConst.Kind.memberSetAccessor:
return super.getSymbolRange(document, item);
}
}
switch (item.kind) {
case PConst.Kind.interface:
return super.getSymbolRange(document, item);