@@ -12742,7 +12742,7 @@ namespace ts {
12742
12742
return symbol;
12743
12743
}
12744
12744
if (skipObjectFunctionPropertyAugment) return undefined;
12745
- const file = symbol?.valueDeclaration && getSourceFileOfNode(symbol.valueDeclaration );
12745
+ const file = resolved. symbol?.declarations?.[0] && getSourceFileOfNode(resolved. symbol.declarations[0] );
12746
12746
const functionType = resolved === anyFunctionType ? globalFunctionType :
12747
12747
resolved.callSignatures.length ? globalCallableFunctionType(file) :
12748
12748
resolved.constructSignatures.length ? globalNewableFunctionType(file) :
@@ -19123,8 +19123,8 @@ namespace ts {
19123
19123
}
19124
19124
19125
19125
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] );
19128
19128
if (!isExcessPropertyCheckTarget(target) || !(sourceNoImplicitAny || targetNoImplicitAny) && getObjectFlags(target) & ObjectFlags.JSLiteral) {
19129
19129
return false; // Disable excess property checks on JS literals to simulate having an implicit "index signature" - but only outside of noImplicitAny
19130
19130
}
@@ -43113,7 +43113,7 @@ namespace ts {
43113
43113
function getAugmentedPropertiesOfType(type: Type): Symbol[] {
43114
43114
type = getApparentType(type);
43115
43115
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] );
43117
43117
const functionType = getSignaturesOfType(type, SignatureKind.Call).length ? globalCallableFunctionType(file) :
43118
43118
getSignaturesOfType(type, SignatureKind.Construct).length ? globalNewableFunctionType(file) :
43119
43119
undefined;
0 commit comments