@@ -18091,18 +18091,17 @@ namespace ts {
18091
18091
18092
18092
forEach(overloads, o => {
18093
18093
const deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags;
18094
- const name = getNameOfDeclaration(o);
18095
18094
if (deviation & ModifierFlags.Export) {
18096
- error(name , Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
18095
+ error(getNameOfDeclaration(o) , Diagnostics.Overload_signatures_must_all_be_exported_or_non_exported);
18097
18096
}
18098
18097
else if (deviation & ModifierFlags.Ambient) {
18099
- error(name , Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
18098
+ error(getNameOfDeclaration(o) , Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient);
18100
18099
}
18101
18100
else if (deviation & (ModifierFlags.Private | ModifierFlags.Protected)) {
18102
- error(name || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
18101
+ error(getNameOfDeclaration(o) || o, Diagnostics.Overload_signatures_must_all_be_public_private_or_protected);
18103
18102
}
18104
18103
else if (deviation & ModifierFlags.Abstract) {
18105
- error(name , Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
18104
+ error(getNameOfDeclaration(o) , Diagnostics.Overload_signatures_must_all_be_abstract_or_non_abstract);
18106
18105
}
18107
18106
});
18108
18107
}
@@ -20240,17 +20239,9 @@ namespace ts {
20240
20239
return;
20241
20240
}
20242
20241
20243
- let errorNode: Node;
20244
- if (propDeclaration && propDeclaration.kind === SyntaxKind.BinaryExpression) {
20245
- const specialAssignmentKind = getSpecialPropertyAssignmentKind(propDeclaration as BinaryExpression);
20246
- if (specialAssignmentKind === SpecialPropertyAssignmentKind.Property ||
20247
- specialAssignmentKind === SpecialPropertyAssignmentKind.PrototypeProperty ||
20248
- specialAssignmentKind === SpecialPropertyAssignmentKind.ThisProperty) {
20249
- errorNode = propDeclaration;
20250
- }
20251
- }
20252
20242
// perform property check if property or indexer is declared in 'type'
20253
- // this allows to rule out cases when both property and indexer are inherited from the base class
20243
+ // this allows us to rule out cases when both property and indexer are inherited from the base class
20244
+ let errorNode: Node;
20254
20245
if (propDeclaration &&
20255
20246
(propDeclaration.kind === SyntaxKind.BinaryExpression ||
20256
20247
getNameOfDeclaration(propDeclaration).kind === SyntaxKind.ComputedPropertyName ||
0 commit comments