<commit_before>import parse, {
  HTMLReactParserOptions,
  domToReact,
  htmlToDOM
} from 'html-react-parser';
import * as React from 'react';

// $ExpectType Element | Element[]
parse('<p>text</p>');

// $ExpectType Element | Element[]
parse('<br id="replace">', {
  replace: domNode => {
    if (domNode.attribs && domNode.attribs.id === 'replace') {
      return <span>replaced</span>;
    }
  }
});

// $ExpectType Element | Element[]
parse('<br id="remove">', {<commit_msg>test(types): add error and more expect cases to index.test.tsx<commit_after>import parse, {
  HTMLReactParserOptions,
  domToReact,
  htmlToDOM
} from 'html-react-parser';
import * as React from 'react';

// $ExpectError
parse();

// $ExpectType Element | Element[]
parse('');

// $ExpectType Element | Element[]
parse('string');

// $ExpectType Element | Element[]
parse('<p>text</p>');

// $ExpectType Element | Element[]
parse('<li>1</li><li>2</li>');

// $ExpectType Element | Element[]
parse('<br id="replace">', {
  replace: domNode => {
    if (domNode.attribs && domNode.attribs.id === 'replace') {
      return <span>replaced</span>;
    }
  }
});

// $ExpectType Element | Element[]
parse('<br id="remove">', {
{'fraction_non_alphanumeric': 0.2003338898163606, 'fraction_numerical': 0.001669449081803005, 'mean_word_length': 4.21304347826087, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '741922', 'n_tokens_mistral': 403, 'n_tokens_neox': 404, 'n_words': 90}