Skip to content

Commit

Permalink
Remove unnecessary casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRosenwasser committed May 7, 2020
1 parent 54fa1b7 commit 946f4be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27699,7 +27699,7 @@ namespace ts {
error(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_a_property_reference);
return booleanType;
}
if (expr.kind === SyntaxKind.PropertyAccessExpression && isPrivateIdentifier((expr as PropertyAccessExpression).name)) {
if (expr.kind === SyntaxKind.PropertyAccessExpression && isPrivateIdentifier(expr.name)) {
error(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_private_identifier);
}
const links = getNodeLinks(expr);
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4029,11 +4029,11 @@ namespace ts {
}

if (member.kind === SyntaxKind.GetAccessor && !getAccessor) {
getAccessor = <GetAccessorDeclaration>member;
getAccessor = member;
}

if (member.kind === SyntaxKind.SetAccessor && !setAccessor) {
setAccessor = <SetAccessorDeclaration>member;
setAccessor = member;
}
}
}
Expand Down

0 comments on commit 946f4be

Please sign in to comment.