mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Component commits:
9c0fab93b2 Fix crash with Object.defineProperty for imported alias (--allowJs)
Fixes #35196
This commit is contained in:
committed by
Nathan Shively-Sanders
parent
c18d72f220
commit
b9d52319ef
@@ -2792,7 +2792,7 @@ namespace ts {
|
||||
|
||||
function bindObjectDefinePrototypeProperty(node: BindableObjectDefinePropertyCall) {
|
||||
const namespaceSymbol = lookupSymbolForPropertyAccess((node.arguments[0] as PropertyAccessExpression).expression as EntityNameExpression);
|
||||
if (namespaceSymbol) {
|
||||
if (namespaceSymbol && namespaceSymbol.valueDeclaration) {
|
||||
// Ensure the namespace symbol becomes class-like
|
||||
addDeclarationToSymbol(namespaceSymbol, namespaceSymbol.valueDeclaration, SymbolFlags.Class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user