* 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 g
(children)
| 2258 | * structure. |
| 2259 | */ |
| 2260 | function onlyChild(children) { |
| 2261 | !ReactElement_1.isValidElement(children) ? invariant(false, 'React.Children.only expected to receive a single React element child.') : void 0; |
| 2262 | return children; |
| 2263 | } |
| 2264 | |
| 2265 | var onlyChild_1 = onlyChild; |
| 2266 |
nothing calls this directly
no test coverage detected