Created
February 17, 2020 04:47
-
-
Save gustav1105/d36ceb1a1033f746d6d6d4adf144028a to your computer and use it in GitHub Desktop.
type-definitions-draft-utils-plugins
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
declare module "draft-js-plugins-utils" { | |
import { EditorState, DraftEntityType, EntityInstance } from "draft-js"; | |
function createLinkAtSelection( | |
editorState: EditorState, | |
url: string | |
): EditorState; | |
function getCurrentEntityKey(editorState: EditorState): string | null; | |
function getCurrentEntity(editorState: EditorState): EntityInstance; | |
function hasEntity( | |
editorState: EditorState, | |
entityType: DraftEntityType | |
): boolean; | |
//@ts-ignore | |
declare const _default = { | |
createLinkAtSelection, | |
getCurrentEntityKey, | |
getCurrentEntity, | |
hasEntity | |
}; | |
export default _default; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment