mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-14 16:56:06 -05:00
Add comment to new code in hasExcessProperties
This commit is contained in:
@@ -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