Force parentheses around array and conditional infer (#11227)

This commit is contained in:
Sergey Melyukov
2020-03-10 19:27:52 +03:00
committed by GitHub
parent eb65195f09
commit cb9d28c42c
2 changed files with 13 additions and 0 deletions

View File

@@ -157,6 +157,10 @@ export function TSUnionType(node: Object, parent: Object): boolean {
export { TSUnionType as TSIntersectionType };
export function TSInferType(node: Object, parent: Object): boolean {
return t.isTSArrayType(parent) || t.isTSOptionalType(parent);
}
export function BinaryExpression(node: Object, parent: Object): boolean {
// let i = (1 in []);
// for ((1 in []);;);