-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix extra styles type in mdToDraftjs declaration
- Loading branch information
1 parent
f6d7d65
commit 3db489e
Showing
3 changed files
with
323 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.