Skip to content

Commit

Permalink
Flow v0.53.0 Codemod #9
Browse files Browse the repository at this point in the history
Summary:
bypass-lint
ignore-conflict-markers
ignore-signed-source
ignore-nocommit

Reviewed By: avikchaudhuri

fbshipit-source-id: 66be84ebf50021cffa01f525f8cfb55ea3caf175
  • Loading branch information
Caleb Meredith authored and facebook-github-bot committed Aug 17, 2017
1 parent e1d3f76 commit 897f727
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions src/component/base/DraftEditor.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<DraftEditorProps, State> {
static defaultProps: DraftEditorDefaultProps = {
blockRenderMap: DefaultDraftBlockRenderMap,
blockRendererFn: emptyFunction.thatReturnsNull,
Expand Down Expand Up @@ -213,7 +210,7 @@ class DraftEditor extends React.Component {
return null;
}

render(): React.Element<any> {
render(): React.Node {
const {readOnly, textAlignment} = this.props;
const rootClass = cx({
'DraftEditor/root': true,
Expand Down
2 changes: 1 addition & 1 deletion src/component/handlers/edit/editOnBlur.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/component/utils/isSoftNewlineEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') ||
Expand Down

0 comments on commit 897f727

Please sign in to comment.