* Returns the first child in a collection of children and verifies that there * is only one child in the collection. * * See https://facebook.github.io/react/docs/react-api.html#react.children.only * * The current implementation of this function assumes that a single child gets * passed withou
(children)
| 2033 | * structure. |
| 2034 | */ |
| 2035 | function onlyChild(children) { |
| 2036 | !ReactElement_1.isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; |
| 2037 | return children; |
| 2038 | } |
| 2039 | |
| 2040 | var onlyChild_1 = onlyChild; |
| 2041 |
nothing calls this directly
no test coverage detected