mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Add comment to new code in hasExcessProperties
This commit is contained in:
1 parent
d719de5928
commit
ef70a6c61b
1 file changed
+1
@@ -8955,6 +8955,7 @@ namespace ts {
|
||||
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
|
||||
}
|
||||
else {
|
||||
// use the property's value declaration if the property is assigned inside the literal itself
|
||||
const objectLiteralDeclaration = source.symbol && firstOrUndefined(source.symbol.declarations);
|
||||
if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, d => d === objectLiteralDeclaration)) {
|
||||
errorNode = prop.valueDeclaration;
|
||||
|
||||
Reference in new issue
Block a user