DefinitelyTyped/types/html-to-draftjs/html-to-draftjs-tests.ts
2019-09-25 09:59:39 -07:00

10 lines
282 B
TypeScript

import htmlToDraft from 'html-to-draftjs';
import { ContentBlock } from 'draft-js';
const blocksFromHtml = htmlToDraft('<p>test</p>');
// $ExpectType ContentBlock[]
const contentBlocks = blocksFromHtml.contentBlocks;
// $ExpectType any
const entityMap = blocksFromHtml.entityMap;