Skip to content

Commit

Permalink
Flow v0.53.0 Codemod facebookarchive#6
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: b7e824f7fd36a51d790d21a62717a666b1e2dd2a
  • Loading branch information
Caleb Meredith authored and facebook-github-bot committed Aug 17, 2017
1 parent 1c99ad7 commit 9d40ffb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let stillComposing = false;
let textInputData = '';

var DraftEditorCompositionHandler = {
onBeforeInput: function(editor: DraftEditor, e: SyntheticInputEvent): void {
onBeforeInput: function(editor: DraftEditor, e: SyntheticInputEvent<>): void {
textInputData = (textInputData || '') + e.data;
},

Expand Down Expand Up @@ -85,7 +85,7 @@ var DraftEditorCompositionHandler = {
* the arrow keys are used to commit, prevent default so that the cursor
* doesn't move, otherwise it will jump back noticeably on re-render.
*/
onKeyDown: function(editor: DraftEditor, e: SyntheticKeyboardEvent): void {
onKeyDown: function(editor: DraftEditor, e: SyntheticKeyboardEvent<>): void {
if (!stillComposing) {
// If a keydown event is received after compositionend but before the
// 20ms timer expires (ex: type option-E then backspace, or type A then
Expand All @@ -106,7 +106,7 @@ var DraftEditorCompositionHandler = {
* characters that we do not want. `preventDefault` allows the composition
* to be committed while preventing the extra characters.
*/
onKeyPress: function(editor: DraftEditor, e: SyntheticKeyboardEvent): void {
onKeyPress: function(editor: DraftEditor, e: SyntheticKeyboardEvent<>): void {
if (e.which === Keys.RETURN) {
e.preventDefault();
}
Expand Down
2 changes: 1 addition & 1 deletion src/component/handlers/edit/editOnPaste.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var splitTextIntoTextBlocks = require('splitTextIntoTextBlocks');
/**
* Paste content.
*/
function editOnPaste(editor: DraftEditor, e: SyntheticClipboardEvent): void {
function editOnPaste(editor: DraftEditor, e: SyntheticClipboardEvent<>): void {
e.preventDefault();
var data = new DataTransfer(e.clipboardData);

Expand Down

0 comments on commit 9d40ffb

Please sign in to comment.