From 23d02a78fb32eddf45cd5e0acd7e07fa6bf29836 Mon Sep 17 00:00:00 2001 From: Jack Leigh Date: Wed, 14 Mar 2018 12:05:47 +0000 Subject: [PATCH] react-native: Correct onKeyPress type See https://facebook.github.io/react-native/docs/0.53/textinput.html#onkeypress This has been the case since 0.41 at least. --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index f4be32ade0..5abf96e04c 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -972,7 +972,7 @@ export interface TextInputIOSProperties { * Pressed key value is passed as an argument to the callback handler. * Fires before onChange callbacks. */ - onKeyPress?: (key: string) => void; + onKeyPress?: (event: {nativeEvent: {key: string}}) => void; /** * See DocumentSelectionState.js, some state that is responsible for maintaining selection information for a document