DefinitelyTyped/types/draftjs-to-html/index.d.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
604 B
TypeScript

// Type definitions for draftjs-to-html 0.8
// Project: https://github.com/jpuri/draftjs-to-html#readme
// Definitions by: Ivan Zverev <https://github.com/1cheese>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
import { RawDraftContentState } from 'draft-js';
interface HashtagConfig {
trigger?: string;
separator?: string;
}
declare function draftToHtml(
editorContent: RawDraftContentState,
hashtagConfig?: HashtagConfig,
directional?: boolean,
customEntityTransform?: (...args: any[]) => any,
): string;
export = draftToHtml;