File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,11 @@ export interface HTMLReactParserOptions {
1515}
1616
1717/**
18- * Convert HTML string to React elements.
18+ * Converts HTML string to React elements.
1919 *
20- * @param - Raw string of HTML to parse.
21- * @param options - Options to use when converting to react.
22- * @returns ReactElement on successful parse or string when `html` cannot be
23- * parsed as HTML
20+ * @param html - The HTML string to parse to React.
21+ * @param options - The parser options.
22+ * @return - When parsed with HTML string, returns React elements; otherwise, returns string or empty array.
2423 */
2524declare function HTMLReactParser (
2625 html : string ,
Original file line number Diff line number Diff line change @@ -5,12 +5,12 @@ var htmlToDOM = require('html-dom-parser');
55var domParserOptions = { decodeEntities : true , lowerCaseAttributeNames : false } ;
66
77/**
8- * Convert HTML string to React elements.
8+ * Converts HTML string to React elements.
99 *
10- * @param {String } html - The HTML string.
11- * @param {Object } [options] - The additional options.
10+ * @param {String } html - The HTML string to parse to React .
11+ * @param {Object } [options] - The parser options.
1212 * @param {Function } [options.replace] - The replace method.
13- * @return {ReactElement|Array }
13+ * @return {ReactElement|Array|String } - When parsed with HTML string, returns React elements; otherwise, returns string or empty array.
1414 */
1515function HTMLReactParser ( html , options ) {
1616 if ( typeof html !== 'string' ) {
You can’t perform that action at this time.
0 commit comments