We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Binary.isAssignmentOperation
1 parent 4929577 commit f598808Copy full SHA for f598808
1 file changed
packages/compiler/src/expression_parser/ast.ts
@@ -268,6 +268,8 @@ export class Interpolation extends AST {
268
}
269
270
271
+type AssignmentOperation = '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '**=' | '&&=' | '||=' | '??=';
272
+
273
export class Binary extends AST {
274
constructor(
275
span: ParseSpan,
@@ -282,7 +284,7 @@ export class Binary extends AST {
282
284
return visitor.visitBinary(this, context);
283
285
286
- static isAssignmentOperation(op: string): boolean {
287
+ static isAssignmentOperation(op: string): op is AssignmentOperation {
288
return (
289
op === '=' ||
290
op === '+=' ||
0 commit comments