DefinitelyTyped/types/draftjs-to-html/draftjs-to-html-tests.ts
Ivan Zverev 99078a21ed Add types for draftjs-to-html (#38588)
* Add types for draftjs-to-html

* Add types for draftjs-to-html: remove excess blank line

* Add types for draftjs-to-html: change function export
2019-09-26 16:09:04 -07:00

22 lines
357 B
TypeScript

import draftToHtml from 'draftjs-to-html';
const editorContent = {
blocks: [
{
key: '355iu',
text: 'test',
type: 'unstyled',
depth: 0,
inlineStyleRanges: [],
entityRanges: [],
data: {
'text-align': 'center',
},
},
],
entityMap: {},
};
// $ExpectType string
draftToHtml(editorContent);