mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-24 20:44:53 -05:00
Fix crash when trying to import a non-exported type (#36619)
* Fix crash when trying to import a non-exported type * Add related info on each declaration
This commit is contained in:
@@ -2530,8 +2530,8 @@ namespace ts {
|
||||
: error(name, Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
|
||||
|
||||
addRelatedInfo(diagnostic,
|
||||
createDiagnosticForNode(localSymbol.valueDeclaration, Diagnostics._0_is_declared_here, declarationName)
|
||||
);
|
||||
...map(localSymbol.declarations, (decl, index) =>
|
||||
createDiagnosticForNode(decl, index === 0 ? Diagnostics._0_is_declared_here : Diagnostics.and_here, declarationName)));
|
||||
}
|
||||
else {
|
||||
error(name, Diagnostics.Module_0_has_no_exported_member_1, moduleName, declarationName);
|
||||
|
||||
Reference in New Issue
Block a user