From 3950a3330269cfa349c568d5c37f7fe67166c43f Mon Sep 17 00:00:00 2001 From: Aironas Kulvelis Date: Fri, 6 Sep 2024 00:12:10 +0300 Subject: [PATCH] fix: ts error due to react types forwardRef changes --- src/SafeAreaContext.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/SafeAreaContext.tsx b/src/SafeAreaContext.tsx index 5da007e3..87ad0553 100644 --- a/src/SafeAreaContext.tsx +++ b/src/SafeAreaContext.tsx @@ -141,11 +141,13 @@ export type WithSafeAreaInsetsProps = { }; export function withSafeAreaInsets( - WrappedComponent: React.ComponentType, + WrappedComponent: React.ComponentType< + (React.PropsWithoutRef | T) & WithSafeAreaInsetsProps + >, ): React.ForwardRefExoticComponent< React.PropsWithoutRef & React.RefAttributes > { - return React.forwardRef((props: T, ref: React.Ref) => { + return React.forwardRef((props, ref) => { const insets = useSafeAreaInsets(); return ; });