Skip to content

Commit 82c564e

Browse files
committed
Use Binary.isAssignmentOperation()
1 parent 1e46551 commit 82c564e

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/transform-node.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@ type NodeTransformOptions = {
3939
parent?: angular.AST;
4040
};
4141

42-
const assignmentOperators = new Set([
43-
'=',
44-
// https://github.com/angular/angular/pull/62064
45-
'+=', // addition assignment
46-
'-=', // subtraction assignment
47-
'*=', // multiplication assignment
48-
'/=', // division assignment
49-
'%=', // remainder assignment
50-
'**=', // exponentiation assignment
51-
'&&=', // logical AND assignment
52-
'||=', // logical OR assignment
53-
'??=', // nullish coalescing assignment
54-
]);
55-
5642
class Transformer extends Source {
5743
#node;
5844
#text;
@@ -184,7 +170,7 @@ class Transformer extends Source {
184170
);
185171
}
186172

187-
if (assignmentOperators.has(operator)) {
173+
if (angular.Binary.isAssignmentOperation(operator)) {
188174
return this.#create<babel.AssignmentExpression>(
189175
{
190176
...properties,

0 commit comments

Comments
 (0)