Support parsing Flow's Optional Indexed Access Types (#13224)

This commit is contained in:
George Zahariev
2021-04-27 10:27:48 -07:00
committed by Nicolò Ribaudo
parent 57daba85aa
commit 8433cd0c05
18 changed files with 327 additions and 12 deletions

View File

@@ -135,6 +135,10 @@ export function UnionTypeAnnotation(node: any, parent: any): boolean {
export { UnionTypeAnnotation as IntersectionTypeAnnotation };
export function OptionalIndexedAccessType(node: any, parent: any): boolean {
return t.isIndexedAccessType(parent, { objectType: node });
}
export function TSAsExpression() {
return true;
}