From 96b8d598a3a80e7869e6971187198d358c88554e Mon Sep 17 00:00:00 2001 From: hduprat Date: Wed, 27 Apr 2022 17:39:09 +0200 Subject: [PATCH] (typescript) type scrollIntoView method --- index.d.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index bf03b269..19480b25 100644 --- a/index.d.ts +++ b/index.d.ts @@ -7,7 +7,9 @@ import * as React from 'react' import { ScrollViewProps, FlatListProps, - SectionListProps + SectionListProps, + LayoutRectangle, + NativeScrollPoint } from 'react-native' interface KeyboardAwareProps { @@ -167,6 +169,16 @@ declare class ScrollableComponent extends React.Component { extraHeight?: number, keyboardOpeningTime?: number ) => void + scrollIntoView: ( + element: React.ReactElement, + options?: { + getScrollPosition?: ( + parentLayout: LayoutRectangle, + childLayout: LayoutRectangle, + contentOffset: NativeScrollPoint + ) => NativeScrollPoint & { animated?: boolean } + } + ) => void } export class KeyboardAwareMixin {}