mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-08 08:14:51 -06:00
hasExcessProperty only uses valueDeclaration if available
Previously it would crash if valueDeclaration was not set
This commit is contained in:
parent
b94c51360b
commit
70069aeb31
@ -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));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user