mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-19 22:07:42 -05:00
Report excess property errors on object literal names (#53129)
This commit is contained in:
committed by
GitHub
parent
b1f25a2bdb
commit
4ee8b0f315
@@ -20711,9 +20711,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
const propDeclaration = prop.valueDeclaration as ObjectLiteralElementLike;
|
||||
Debug.assertNode(propDeclaration, isObjectLiteralElementLike);
|
||||
|
||||
errorNode = propDeclaration;
|
||||
|
||||
const name = propDeclaration.name!;
|
||||
errorNode = name;
|
||||
|
||||
if (isIdentifier(name)) {
|
||||
suggestion = getSuggestionForNonexistentProperty(name, errorTarget);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user