mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Fix return type in onlyChild's JSDoc (#6573)
The return type is a 'ReactElement' instead of a 'ReactComponent'.
This commit is contained in:
@@ -22,7 +22,7 @@ var invariant = require('invariant');
|
||||
* of children.
|
||||
*
|
||||
* @param {?object} children Child collection structure.
|
||||
* @return {ReactComponent} The first and only `ReactComponent` contained in the
|
||||
* @return {ReactElement} The first and only `ReactElement` contained in the
|
||||
* structure.
|
||||
*/
|
||||
function onlyChild(children) {
|
||||
|
||||
Reference in New Issue
Block a user