Skip to content

Commit 98baf39

Browse files
docs(lib): update JSDoc in dom-to-react
1 parent ccba051 commit 98baf39

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lib/dom-to-react.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ var utilities = require('./utilities');
44
/**
55
* Converts DOM nodes to React elements.
66
*
7-
* @param {Array} nodes - The DOM nodes.
8-
* @param {Object} [options] - The additional options.
9-
* @param {Function} [options.replace] - The replace method.
10-
* @return {ReactElement|Array}
7+
* @param {DomElement[]} nodes - The DOM nodes.
8+
* @param {Object} [options={}] - The additional options.
9+
* @param {Function} [options.replace] - The replacer.
10+
* @param {Object} [options.library] - The library (React, Preact, etc.).
11+
* @return {String|ReactElement|ReactElement[]}
1112
*/
1213
function domToReact(nodes, options) {
1314
options = options || {};
@@ -95,6 +96,10 @@ function domToReact(nodes, options) {
9596
return result.length === 1 ? result[0] : result;
9697
}
9798

99+
/**
100+
* @param {React.ReactElement} node
101+
* @return {Boolean}
102+
*/
98103
function shouldPassAttributesUnaltered(node) {
99104
return (
100105
utilities.PRESERVE_CUSTOM_ATTRIBUTES &&

0 commit comments

Comments
 (0)