mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +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:
1 parent
0dc9b91017
commit
416f315c96
1 file changed
+1
-1
@@ -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