diff --git a/src/component/base/DraftEditor.react.js b/src/component/base/DraftEditor.react.js index 7b6085ba09..599e4b3fbb 100644 --- a/src/component/base/DraftEditor.react.js +++ b/src/component/base/DraftEditor.react.js @@ -66,10 +66,7 @@ type State = { * div, and provides a wide variety of useful function props for managing the * state of the editor. See `DraftEditorProps` for details. */ -class DraftEditor extends React.Component { - props: DraftEditorProps; - state: State; - +class DraftEditor extends React.Component { static defaultProps: DraftEditorDefaultProps = { blockRenderMap: DefaultDraftBlockRenderMap, blockRendererFn: emptyFunction.thatReturnsNull, @@ -213,7 +210,7 @@ class DraftEditor extends React.Component { return null; } - render(): React.Element { + render(): React.Node { const {readOnly, textAlignment} = this.props; const rootClass = cx({ 'DraftEditor/root': true, diff --git a/src/component/handlers/edit/editOnBlur.js b/src/component/handlers/edit/editOnBlur.js index 616a41ddc4..5429e9976d 100644 --- a/src/component/handlers/edit/editOnBlur.js +++ b/src/component/handlers/edit/editOnBlur.js @@ -19,7 +19,7 @@ const EditorState = require('EditorState'); const containsNode = require('containsNode'); const getActiveElement = require('getActiveElement'); -function editOnBlur(editor: DraftEditor, e: SyntheticEvent): void { +function editOnBlur(editor: DraftEditor, e: SyntheticEvent<>): void { // In a contentEditable element, when you select a range and then click // another active element, this does trigger a `blur` event but will not // remove the DOM selection from the contenteditable. diff --git a/src/component/utils/isSoftNewlineEvent.js b/src/component/utils/isSoftNewlineEvent.js index 1ef6692da1..837217e46e 100644 --- a/src/component/utils/isSoftNewlineEvent.js +++ b/src/component/utils/isSoftNewlineEvent.js @@ -15,7 +15,7 @@ var Keys = require('Keys'); -function isSoftNewlineEvent(e: SyntheticKeyboardEvent): boolean { +function isSoftNewlineEvent(e: SyntheticKeyboardEvent<>): boolean { return e.which === Keys.RETURN && ( e.getModifierState('Shift') || e.getModifierState('Alt') ||