Skip to content

Commit 897f727

Browse files
Caleb Meredithfacebook-github-bot
Caleb Meredith
authored andcommitted
Flow v0.53.0 Codemod #9
Summary: bypass-lint ignore-conflict-markers ignore-signed-source ignore-nocommit Reviewed By: avikchaudhuri fbshipit-source-id: 66be84ebf50021cffa01f525f8cfb55ea3caf175
1 parent e1d3f76 commit 897f727

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

src/component/base/DraftEditor.react.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ type State = {
6666
* div, and provides a wide variety of useful function props for managing the
6767
* state of the editor. See `DraftEditorProps` for details.
6868
*/
69-
class DraftEditor extends React.Component {
70-
props: DraftEditorProps;
71-
state: State;
72-
69+
class DraftEditor extends React.Component<DraftEditorProps, State> {
7370
static defaultProps: DraftEditorDefaultProps = {
7471
blockRenderMap: DefaultDraftBlockRenderMap,
7572
blockRendererFn: emptyFunction.thatReturnsNull,
@@ -213,7 +210,7 @@ class DraftEditor extends React.Component {
213210
return null;
214211
}
215212

216-
render(): React.Element<any> {
213+
render(): React.Node {
217214
const {readOnly, textAlignment} = this.props;
218215
const rootClass = cx({
219216
'DraftEditor/root': true,

src/component/handlers/edit/editOnBlur.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const EditorState = require('EditorState');
1919
const containsNode = require('containsNode');
2020
const getActiveElement = require('getActiveElement');
2121

22-
function editOnBlur(editor: DraftEditor, e: SyntheticEvent): void {
22+
function editOnBlur(editor: DraftEditor, e: SyntheticEvent<>): void {
2323
// In a contentEditable element, when you select a range and then click
2424
// another active element, this does trigger a `blur` event but will not
2525
// remove the DOM selection from the contenteditable.

src/component/utils/isSoftNewlineEvent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
var Keys = require('Keys');
1717

18-
function isSoftNewlineEvent(e: SyntheticKeyboardEvent): boolean {
18+
function isSoftNewlineEvent(e: SyntheticKeyboardEvent<>): boolean {
1919
return e.which === Keys.RETURN && (
2020
e.getModifierState('Shift') ||
2121
e.getModifierState('Alt') ||

0 commit comments

Comments
 (0)