diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 266fbe573be..7ec1a0ae2b2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8977,7 +8977,9 @@ namespace ts { reportError(Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(prop), typeToString(target)); } else { - errorNode = prop.valueDeclaration; + if (prop.valueDeclaration) { + errorNode = prop.valueDeclaration; + } reportError(Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(prop), typeToString(target)); }