mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 14:59:37 +08:00
add possibility of null return value from RichUtils.handleKeyCommand (#18277)
* add possibility of null return from RichUtils.handleKeyCommand * more specifically, the function returns null in the overload case * make key for RichUtils.toggleLink potentially null * add definitions by credit
This commit is contained in:
committed by
Wesley Wigham
parent
1be93dbab9
commit
168bb317b1
5
types/draft-js/index.d.ts
vendored
5
types/draft-js/index.d.ts
vendored
@@ -5,6 +5,7 @@
|
||||
// Yale Cason <https://github.com/ghotiphud>
|
||||
// Ryan Schwers <https://github.com/schwers>
|
||||
// Michael Wu <https://github.com/michael-yx-wu>
|
||||
// Willis Plummer <https://github.com/willisplummer>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@@ -863,7 +864,7 @@ declare namespace Draft {
|
||||
static getDataObjectForLinkURL(uri: URI): Object;
|
||||
|
||||
static handleKeyCommand(editorState: EditorState, command: DraftEditorCommand): EditorState;
|
||||
static handleKeyCommand(editorState: EditorState, command: string): EditorState;
|
||||
static handleKeyCommand(editorState: EditorState, command: string): null;
|
||||
|
||||
static insertSoftNewline(editorState: EditorState): EditorState;
|
||||
|
||||
@@ -888,7 +889,7 @@ declare namespace Draft {
|
||||
*/
|
||||
static toggleInlineStyle(editorState: EditorState, inlineStyle: string): EditorState;
|
||||
|
||||
static toggleLink(editorState: EditorState, targetSelection: SelectionState, entityKey: string): EditorState;
|
||||
static toggleLink(editorState: EditorState, targetSelection: SelectionState, entityKey: string | null): EditorState;
|
||||
|
||||
/**
|
||||
* When a collapsed cursor is at the start of an empty styled block, allow
|
||||
|
||||
Reference in New Issue
Block a user