Skip to content

Commit ef70a6c

Browse files
committed
Add comment to new code in hasExcessProperties
1 parent d719de5 commit ef70a6c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8955,6 +8955,7 @@ namespace ts {
89558955
reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target));
89568956
}
89578957
else {
8958+
// use the property's value declaration if the property is assigned inside the literal itself
89588959
const objectLiteralDeclaration = source.symbol && firstOrUndefined(source.symbol.declarations);
89598960
if (prop.valueDeclaration && findAncestor(prop.valueDeclaration, d => d === objectLiteralDeclaration)) {
89608961
errorNode = prop.valueDeclaration;

0 commit comments

Comments
 (0)