Include exported name in error message.

This commit is contained in:
Daniel Rosenwasser 2016-04-12 16:52:57 -07:00
parent 109e0e279d
commit 0417592ccb
2 changed files with 2 additions and 2 deletions

View file

@ -15790,7 +15790,7 @@ namespace ts {
const symbol = resolveName(exportedName, exportedName.text, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias,
/*nameNotFoundMessage*/ undefined, /*nameArg*/ undefined);
if (symbol && (symbol === undefinedSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) {
error(exportedName, Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module);
error(exportedName, Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, exportedName.text);
}
else {
markExportAsReferenced(node);

View file

@ -1819,7 +1819,7 @@
"category": "Error",
"code": 2660
},
"Cannot re-export name that is not defined in the module.": {
"Cannot export '{0}'. Only local declarations can be exported from a module.": {
"category": "Error",
"code": 2661
},