mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 01:49:57 -05:00
Disallow JS/non-JS merge without crashing
Note that the error location is misleading because it's reported inside the merge step for the js initializer.
This commit is contained in:
@@ -1489,7 +1489,7 @@ namespace ts {
|
||||
}
|
||||
const declaration = symbol.valueDeclaration;
|
||||
const e = getDeclaredJavascriptInitializer(declaration) || getAssignedJavascriptInitializer(declaration);
|
||||
return e ? e.symbol : symbol;
|
||||
return e && e.symbol ? e.symbol : symbol;
|
||||
}
|
||||
|
||||
/** Get the declaration initializer, when the initializer is container-like (See getJavascriptInitializer) */
|
||||
|
||||
Reference in New Issue
Block a user