mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* -updated ts config. * -Added draft-convert typings with test. * -Better typing for entity found and applied.
12 lines
322 B
TypeScript
12 lines
322 B
TypeScript
import * as draftConvert from "draft-convert"
|
|
|
|
const html = '<div>this is a test</div>';
|
|
const configFromHtml = {};
|
|
const configToHtml = {};
|
|
|
|
// $ExpectType ContentState
|
|
const contentState = draftConvert.convertFromHTML(configFromHtml)(html);
|
|
|
|
// $ExpectType string
|
|
draftConvert.convertToHTML(configToHtml)(contentState);
|