Skip to content

Commit e1d3f76

Browse files
Caleb Meredithfacebook-github-bot
Caleb Meredith
authored andcommitted
Flow v0.53.0 Codemod #8
Summary: bypass-lint ignore-conflict-markers ignore-signed-source ignore-nocommit Reviewed By: avikchaudhuri fbshipit-source-id: ce6ef0603e85b0bf373e64b77b9c95e55ceaf88c
1 parent 4a89df4 commit e1d3f76

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/component/handlers/edit/editOnBeforeInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function replaceText(
7575
* preserve spellcheck highlighting, which disappears or flashes if re-render
7676
* occurs on the relevant text nodes.
7777
*/
78-
function editOnBeforeInput(editor: DraftEditor, e: SyntheticInputEvent): void {
78+
function editOnBeforeInput(editor: DraftEditor, e: SyntheticInputEvent<>): void {
7979
if (editor._pendingStateFromBeforeInput !== undefined) {
8080
editor.update(editor._pendingStateFromBeforeInput);
8181
editor._pendingStateFromBeforeInput = undefined;

src/component/utils/getDefaultKeyBinding.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ var {
3232
isCtrlKeyCommand,
3333
} = KeyBindingUtil;
3434

35-
function shouldRemoveWord(e: SyntheticKeyboardEvent): boolean {
35+
function shouldRemoveWord(e: SyntheticKeyboardEvent<>): boolean {
3636
return (isOSX && e.altKey) || isCtrlKeyCommand(e);
3737
}
3838

3939
/**
4040
* Get the appropriate undo/redo command for a Z key command.
4141
*/
4242
function getZCommand(
43-
e: SyntheticKeyboardEvent,
43+
e: SyntheticKeyboardEvent<>,
4444
): ?DraftEditorCommand {
4545
if (!hasCommandModifier(e)) {
4646
return null;
@@ -49,7 +49,7 @@ function getZCommand(
4949
}
5050

5151
function getDeleteCommand(
52-
e: SyntheticKeyboardEvent,
52+
e: SyntheticKeyboardEvent<>,
5353
): ?DraftEditorCommand {
5454
// Allow default "cut" behavior for Windows on Shift + Delete.
5555
if (isWindows && e.shiftKey) {
@@ -59,7 +59,7 @@ function getDeleteCommand(
5959
}
6060

6161
function getBackspaceCommand(
62-
e: SyntheticKeyboardEvent,
62+
e: SyntheticKeyboardEvent<>,
6363
): ?DraftEditorCommand {
6464
if (hasCommandModifier(e) && isOSX) {
6565
return 'backspace-to-start-of-line';
@@ -71,7 +71,7 @@ function getBackspaceCommand(
7171
* Retrieve a bound key command for the given event.
7272
*/
7373
function getDefaultKeyBinding(
74-
e: SyntheticKeyboardEvent,
74+
e: SyntheticKeyboardEvent<>,
7575
): ?DraftEditorCommand {
7676
switch (e.keyCode) {
7777
case 66: // B

0 commit comments

Comments
 (0)