Fix generator missing parens on Flow union types (#6334)
This commit is contained in:
@@ -93,6 +93,17 @@ export function Binary(node: Object, parent: Object): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function UnionTypeAnnotation(node: Object, parent: Object): boolean {
|
||||
return (
|
||||
t.isArrayTypeAnnotation(parent) ||
|
||||
t.isNullableTypeAnnotation(parent) ||
|
||||
t.isIntersectionTypeAnnotation(parent) ||
|
||||
t.isUnionTypeAnnotation(parent)
|
||||
);
|
||||
}
|
||||
|
||||
export { UnionTypeAnnotation as IntersectionTypeAnnotation };
|
||||
|
||||
export function TSAsExpression() {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user