From 1c99ad7cab7f9a69239ddffc03f64a90921dbc23 Mon Sep 17 00:00:00 2001 From: Caleb Meredith Date: Thu, 17 Aug 2017 00:43:29 -0700 Subject: [PATCH] Flow v0.53 Codemod #5 Summary: bypass-lint ignore-conflict-markers ignore-signed-source ignore-nocommit Reviewed By: avikchaudhuri fbshipit-source-id: d9b032d51619f9827e819d08198ce6a2aeae0fc5 --- src/component/contents/DraftEditorTextNode.react.js | 4 ++-- src/component/handlers/edit/editOnKeyDown.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/component/contents/DraftEditorTextNode.react.js b/src/component/contents/DraftEditorTextNode.react.js index 925078f0c9..8c273cba5f 100644 --- a/src/component/contents/DraftEditorTextNode.react.js +++ b/src/component/contents/DraftEditorTextNode.react.js @@ -60,7 +60,7 @@ type Props = { * nodes with DOM state that already matches the expectations of our immutable * editor state. */ -class DraftEditorTextNode extends React.Component { +class DraftEditorTextNode extends React.Component { _forceFlag: boolean; constructor(props: Props) { @@ -84,7 +84,7 @@ class DraftEditorTextNode extends React.Component { this._forceFlag = !this._forceFlag; } - render(): React.Element { + render(): React.Node { if (this.props.children === '') { return this._forceFlag ? NEWLINE_A : NEWLINE_B; } diff --git a/src/component/handlers/edit/editOnKeyDown.js b/src/component/handlers/edit/editOnKeyDown.js index 3b1322dc67..1e95d6068f 100644 --- a/src/component/handlers/edit/editOnKeyDown.js +++ b/src/component/handlers/edit/editOnKeyDown.js @@ -83,7 +83,7 @@ function onKeyCommand( * See `getDefaultKeyBinding` for defaults. Alternatively, the top-level * component may provide a custom mapping via the `keyBindingFn` prop. */ -function editOnKeyDown(editor: DraftEditor, e: SyntheticKeyboardEvent): void { +function editOnKeyDown(editor: DraftEditor, e: SyntheticKeyboardEvent<>): void { var keyCode = e.which; var editorState = editor._latestEditorState;