Daniel Tschinder 16716ea3de Fix rest parameters with flow type casting (#4636)
Do not skip TypeCastExpressions when finding referenced identifiers as the
type cast contains valid non flow code that we need to visit.
2016-10-01 12:58:14 -04:00

7 lines
122 B
JavaScript

let oneOf = (...nodes) => {
if (nodes.length === 1) {
return nodes[0];
}
return ((new OneOfNode(nodes)): any)
}