Do not skip TypeCastExpressions when finding referenced identifiers as the type cast contains valid non flow code that we need to visit.
11 lines
243 B
JavaScript
11 lines
243 B
JavaScript
let oneOf = function () {
|
|
for (var _len = arguments.length, nodes = Array(_len), _key = 0; _key < _len; _key++) {
|
|
nodes[_key] = arguments[_key];
|
|
}
|
|
|
|
if (nodes.length === 1) {
|
|
return nodes[0];
|
|
}
|
|
return new OneOfNode(nodes);
|
|
};
|