Skip to content

Commit

Permalink
Add TupleTypeAnnotation wrapper
Browse files Browse the repository at this point in the history
Summary:
There are some unsupported types logged: https://fburl.com/scuba/relay_build_rs/f0fp6p9w

This diff adds support for `TupleTypeAnnotation`

Reviewed By: captbaritone

Differential Revision: D58392098

fbshipit-source-id: 35525f8e2bcf2fe669e405c4dfa3bfff8890057f
  • Loading branch information
tyao1 authored and facebook-github-bot committed Jun 11, 2024
1 parent 9e2bbf8 commit 3c5ba8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,13 @@
"type": "FlowTypeAnnotation"
}
}
},
"TupleTypeAnnotation": {
"fields": {
"types": {
"type": "Vec<FlowTypeAnnotation>"
}
}
}
},
"enums": {
Expand Down Expand Up @@ -1640,7 +1647,8 @@
"UnionTypeAnnotation",
"IntersectionTypeAnnotation",
"IndexedAccessType",
"OptionalIndexedAccessType"
"OptionalIndexedAccessType",
"TupleTypeAnnotation"
],
"ObjectTypePropertyType": [
"ObjectTypeProperty",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ type UnionTypeAnnotation = "a" | "b" | "c";
type IntersectionTypeAnnotation = "a" & "b" & "c";
type IndexedAccessType = Account['account_id'];
type OptionalIndexedAccessType = Account?.['account_id'];
type TupleTypeAnnotation = [A,B]

0 comments on commit 3c5ba8c

Please sign in to comment.