Skip to content

Commit

Permalink
RN: Rename Keyboard.remove{Event =>}Listener
Browse files Browse the repository at this point in the history
Summary:
Renames `Keyboard.removeEventListener` to `Keyboard.removeListener`.

When I implemented the compatibility layer in {D26589441 (035718b)}, I accidentally used the wrong name. Since `Keyboard.removeEventListener` was always deprecated, this removes it completely.

Changelog:
[General][Changed] - Rename deprecated `Keyboard.removeEventListener` to `Keyboard.removeListener`.

Reviewed By: lunaleaps

Differential Revision: D32282743

fbshipit-source-id: 309382af3269f85f781d38367d115a2ce3690efb
  • Loading branch information
yungsters authored and facebook-github-bot committed Nov 9, 2021
1 parent 9b33c31 commit 8880c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Libraries/Components/Keyboard/Keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ class Keyboard {
}

/**
* @deprecated Use `remove` on the EventSubscription from `addEventListener`.
* @deprecated Use `remove` on the EventSubscription from `addListener`.
*/
removeEventListener<K: $Keys<KeyboardEventDefinitions>>(
removeListener<K: $Keys<KeyboardEventDefinitions>>(
eventType: K,
listener: (...$ElementType<KeyboardEventDefinitions, K>) => mixed,
): void {
Expand Down

0 comments on commit 8880c09

Please sign in to comment.