diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 3eaa05aa30..ccc0fcf49e 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -797,7 +797,7 @@ declare namespace Draft { class CharacterMetadata { static applyStyle(record: CharacterMetadata, style: string): CharacterMetadata; static removeStyle(record: CharacterMetadata, style: string): CharacterMetadata; - static applyEntity(record: CharacterMetadata, entityKey: string): CharacterMetadata; + static applyEntity(record: CharacterMetadata, entityKey: string | null): CharacterMetadata; static applyEntity(record: CharacterMetadata): CharacterMetadata; /** * Use this function instead of the `CharacterMetadata` constructor. @@ -894,7 +894,7 @@ declare namespace Draft { static setBlockData(contentState: ContentState, selectionState: SelectionState, blockData: Immutable.Map): ContentState; static mergeBlockData(contentState: ContentState, selectionState: SelectionState, blockData: Immutable.Map): ContentState; - static applyEntity(contentState: ContentState, selectionState: SelectionState, entityKey: string): ContentState; + static applyEntity(contentState: ContentState, selectionState: SelectionState, entityKey: string | null): ContentState; } class RichTextEditorUtil {