Skip to content

Commit

Permalink
Flow v0.53.0 Codemod #8
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: ce6ef0603e85b0bf373e64b77b9c95e55ceaf88c
  • Loading branch information
Caleb Meredith authored and facebook-github-bot committed Aug 17, 2017
1 parent 4a89df4 commit e1d3f76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/component/handlers/edit/editOnBeforeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function replaceText(
* preserve spellcheck highlighting, which disappears or flashes if re-render
* occurs on the relevant text nodes.
*/
function editOnBeforeInput(editor: DraftEditor, e: SyntheticInputEvent): void {
function editOnBeforeInput(editor: DraftEditor, e: SyntheticInputEvent<>): void {
if (editor._pendingStateFromBeforeInput !== undefined) {
editor.update(editor._pendingStateFromBeforeInput);
editor._pendingStateFromBeforeInput = undefined;
Expand Down
10 changes: 5 additions & 5 deletions src/component/utils/getDefaultKeyBinding.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ var {
isCtrlKeyCommand,
} = KeyBindingUtil;

function shouldRemoveWord(e: SyntheticKeyboardEvent): boolean {
function shouldRemoveWord(e: SyntheticKeyboardEvent<>): boolean {
return (isOSX && e.altKey) || isCtrlKeyCommand(e);
}

/**
* Get the appropriate undo/redo command for a Z key command.
*/
function getZCommand(
e: SyntheticKeyboardEvent,
e: SyntheticKeyboardEvent<>,
): ?DraftEditorCommand {
if (!hasCommandModifier(e)) {
return null;
Expand All @@ -49,7 +49,7 @@ function getZCommand(
}

function getDeleteCommand(
e: SyntheticKeyboardEvent,
e: SyntheticKeyboardEvent<>,
): ?DraftEditorCommand {
// Allow default "cut" behavior for Windows on Shift + Delete.
if (isWindows && e.shiftKey) {
Expand All @@ -59,7 +59,7 @@ function getDeleteCommand(
}

function getBackspaceCommand(
e: SyntheticKeyboardEvent,
e: SyntheticKeyboardEvent<>,
): ?DraftEditorCommand {
if (hasCommandModifier(e) && isOSX) {
return 'backspace-to-start-of-line';
Expand All @@ -71,7 +71,7 @@ function getBackspaceCommand(
* Retrieve a bound key command for the given event.
*/
function getDefaultKeyBinding(
e: SyntheticKeyboardEvent,
e: SyntheticKeyboardEvent<>,
): ?DraftEditorCommand {
switch (e.keyCode) {
case 66: // B
Expand Down

0 comments on commit e1d3f76

Please sign in to comment.