From 167acb7b2f625509172542493e275da6ccdf3310 Mon Sep 17 00:00:00 2001 From: Leonid Shevtsov Date: Tue, 22 Oct 2019 23:11:07 +0300 Subject: [PATCH] Add Typescript definitions for listenToKeyboardEvents --- index.d.ts | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/index.d.ts b/index.d.ts index bf03b26..1e3a70f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -182,3 +182,36 @@ export class KeyboardAwareSectionList extends ScrollableComponent< KeyboardAwareSectionListProps, KeyboardAwareState > {} + +export type KeyboardAwareOptions = { + enableOnAndroid?: boolean; + contentContainerStyle?: {}; + enableAutomaticScroll?: boolean; + extraHeight?: number; + extraScrollHeight?: number; + enableResetScrollToCoords?: boolean; + keyboardOpeningTime?: number; + viewIsInsideTabBar?: boolean; + refPropName?: string; + extractNativeRef?(ref: JSX.Element): JSX.Element; +}; + +export function listenToKeyboardEvents

( + options: KeyboardAwareOptions +): ( + Comp: React.ComponentType

+) => { + new (props: P | KeyboardAwareProps): ScrollableComponent< + P | KeyboardAwareProps, + KeyboardAwareState + >; +}; + +export function listenToKeyboardEvents

( + Comp: React.ComponentType

+): { + new (props: P | KeyboardAwareProps): ScrollableComponent< + P | KeyboardAwareProps, + KeyboardAwareState + >; +};