Ensure we find export default declaration targets if we search for them by name

This commit is contained in:
Mohamed Hegazy
2015-03-30 16:59:34 -07:00
parent b180324da0
commit bea7221174
7 changed files with 145 additions and 0 deletions
+7
View File
@@ -349,6 +349,13 @@ module ts {
}
result = undefined;
}
else if (location.kind === SyntaxKind.SourceFile) {
result = getSymbol(getSymbolOfNode(location).exports, "default", meaning & SymbolFlags.ModuleMember);
if (result && (result.flags & meaning) && result.valueDeclaration && (result.valueDeclaration.flags & NodeFlags.Default) && result.valueDeclaration.localSymbol.name === name) {
break loop;
}
result = undefined;
}
break;
case SyntaxKind.EnumDeclaration:
if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & SymbolFlags.EnumMember)) {