Skip to content

Commit

Permalink
Fix extra styles type in mdToDraftjs declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
KenanYusuf committed Nov 21, 2021
1 parent f6d7d65 commit 3db489e
Show file tree
Hide file tree
Showing 3 changed files with 323 additions and 178 deletions.
18 changes: 15 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
declare module 'draftjs-md-converter' {
import { RawDraftContentState } from 'draft-js';
declare module "draftjs-md-converter" {
import type { Syntax as ASTNodeTypes } from "@textlint/markdown-to-ast";
import type { RawDraftContentState } from "draft-js";
export function draftjsToMd(
raw: RawDraftContentState,
extraMarkdownDict?: { [key: string]: string }
): string;
export function mdToDraftjs(
mdString: string,
extraStyles?: { [key: string]: string }
extraStyles?: {
inlineStyles?: {
[key in ASTNodeTypes]?: {
type: string;
symbol: string;
[key: string]: string;
};
};
blockStyles?: {
[key: string]: string;
};
}
): RawDraftContentState;
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"babel-eslint": "^10.1.0",
"chai": "^3.5.0",
"dirty-chai": "^1.2.2",
"esbuild": "0.8.36",
"eslint": "^3.9.0",
"eslint-config-airbnb": "^6.2.0",
"eslint-config-prettier": "^2.9.0",
Expand All @@ -58,11 +59,10 @@
"husky": "4.2.1",
"lint-staged": "^7.0.4",
"mocha": "^2.4.5",
"esbuild": "0.8.36",
"prettier": "1.19.1"
},
"dependencies": {
"@textlint/markdown-to-ast": "6.1.6"
"@textlint/markdown-to-ast": "12.0.2"
},
"husky": {
"hooks": {
Expand Down
Loading

0 comments on commit 3db489e

Please sign in to comment.