File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -18448,7 +18448,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
18448
18448
}
18449
18449
18450
18450
function getESSymbolLikeTypeForNode(node: Node) {
18451
- const declaration = getValidESSymbolDeclaration(node)
18451
+ const declaration = getValidESSymbolDeclaration(node);
18452
18452
if (declaration) {
18453
18453
const symbol = isCommonJsExportPropertyAssignment(declaration) ? getSymbolOfNode((declaration as BinaryExpression).left) : getSymbolOfNode(declaration);
18454
18454
if (symbol) {
Original file line number Diff line number Diff line change @@ -2712,13 +2712,16 @@ export function isCommonJsExportPropertyAssignment(node: Node) {
2712
2712
/** @internal */
2713
2713
export function getValidESSymbolDeclaration ( node : Node ) : Node | undefined {
2714
2714
while ( isAssignmentExpression ( node , /*excludeCompoundAssignment*/ true ) ) {
2715
+ if ( isCommonJsExportPropertyAssignment ( node ) ) {
2716
+ return node ;
2717
+ }
2715
2718
node = node . parent ;
2716
2719
}
2717
- if ( ( isVariableDeclaration ( node ) ? isVarConst ( node ) && isIdentifier ( node . name ) && isVariableDeclarationInVariableStatement ( node ) :
2720
+ if ( isVariableDeclaration ( node ) ? isVarConst ( node ) && isIdentifier ( node . name ) && isVariableDeclarationInVariableStatement ( node ) :
2718
2721
isPropertyDeclaration ( node ) ? hasEffectiveReadonlyModifier ( node ) && hasStaticModifier ( node ) :
2719
- isPropertySignature ( node ) && hasEffectiveReadonlyModifier ( node ) ) || isCommonJsExportPropertyAssignment ( node ) ) {
2722
+ isPropertySignature ( node ) && hasEffectiveReadonlyModifier ( node ) ) {
2720
2723
return node ;
2721
- } ;
2724
+ }
2722
2725
return undefined ;
2723
2726
}
2724
2727
You can’t perform that action at this time.
0 commit comments