Skip to content

Commit

Permalink
Add typescript definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
janpieterz committed Mar 27, 2020
1 parent 3a12581 commit 3bb00e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
declare module 'draftjs-md-converter' {
import { RawDraftContentState } from 'draft-js';
export function draftjsToMd(
raw: RawDraftContentState,
extraMarkdownDict?: { [key: string]: string }
): string[];
export function mdToDraftjs(mdString: string, extraStyles?: { [key: string]: string });
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.4.0",
"description": "Converter for converting Draft.js state into Markdown and vice versa",
"main": "dist/index.js",
"types": "index.d.ts",
"license": "MIT",
"engines": {
"node": ">=6.0.0"
Expand Down

0 comments on commit 3bb00e7

Please sign in to comment.