Add parenthesis for binary expression inside of as (#1682)
parent
f69c5496c6
commit
1e351436da
|
@ -332,6 +332,7 @@ FPp.needsParens = function() {
|
|||
case "SpreadElement":
|
||||
case "SpreadProperty":
|
||||
case "AwaitExpression":
|
||||
case "TSAsExpression":
|
||||
return true;
|
||||
|
||||
case "MemberExpression":
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
|
||||
exports[`as.js 1`] = `
|
||||
const name = (description as DescriptionObject).name || (description as string);
|
||||
this.isTabActionBar((e.target || e.srcElement) as HTMLElement);
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const name = (description as DescriptionObject).name || description as string;
|
||||
this.isTabActionBar((e.target || e.srcElement) as HTMLElement);
|
||||
|
||||
`;
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
const name = (description as DescriptionObject).name || (description as string);
|
||||
this.isTabActionBar((e.target || e.srcElement) as HTMLElement);
|
||||
|
|
Loading…
Reference in New Issue