@@ -12742,7 +12742,7 @@ namespace ts {
1274212742 return symbol;
1274312743 }
1274412744 if (skipObjectFunctionPropertyAugment) return undefined;
12745- const file = symbol?.valueDeclaration && getSourceFileOfNode(symbol.valueDeclaration );
12745+ const file = resolved. symbol?.declarations?.[0] && getSourceFileOfNode(resolved. symbol.declarations[0] );
1274612746 const functionType = resolved === anyFunctionType ? globalFunctionType :
1274712747 resolved.callSignatures.length ? globalCallableFunctionType(file) :
1274812748 resolved.constructSignatures.length ? globalNewableFunctionType(file) :
@@ -19123,8 +19123,8 @@ namespace ts {
1912319123 }
1912419124
1912519125 function hasExcessProperties(source: FreshObjectLiteralType, target: Type, reportErrors: boolean): boolean {
19126- const sourceNoImplicitAny = noImplicitAny(source.symbol?.valueDeclaration );
19127- const targetNoImplicitAny = noImplicitAny(target.symbol?.valueDeclaration );
19126+ const sourceNoImplicitAny = noImplicitAny(source.symbol?.declarations?.[0] );
19127+ const targetNoImplicitAny = noImplicitAny(target.symbol?.declarations?.[0] );
1912819128 if (!isExcessPropertyCheckTarget(target) || !(sourceNoImplicitAny || targetNoImplicitAny) && getObjectFlags(target) & ObjectFlags.JSLiteral) {
1912919129 return false; // Disable excess property checks on JS literals to simulate having an implicit "index signature" - but only outside of noImplicitAny
1913019130 }
@@ -43113,7 +43113,7 @@ namespace ts {
4311343113 function getAugmentedPropertiesOfType(type: Type): Symbol[] {
4311443114 type = getApparentType(type);
4311543115 const propsByName = createSymbolTable(getPropertiesOfType(type));
43116- const file = type.symbol?.valueDeclaration && getSourceFileOfNode(type.symbol.valueDeclaration );
43116+ const file = type.symbol?.declarations?.[0] && getSourceFileOfNode(type.symbol.declarations[0] );
4311743117 const functionType = getSignaturesOfType(type, SignatureKind.Call).length ? globalCallableFunctionType(file) :
4311843118 getSignaturesOfType(type, SignatureKind.Construct).length ? globalNewableFunctionType(file) :
4311943119 undefined;
0 commit comments