node_modules/react-native-paper/src/utils/forwardRef.tsx:21:14 - error TS2322: Type '<T, P = {}>(render: ForwardRefRenderFunction<T, PropsWithoutRef<P>>) => ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>' is not assignable to type '<T, P = {}>(render: ForwardRefRenderFunction<T, P>) => ForwardRefComponent<T, P>'.
Types of parameters 'render' and 'render' are incompatible.
Type 'ForwardRefRenderFunction<T, P>' is not assignable to type 'ForwardRefRenderFunction<T, PropsWithoutRef<P>>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'PropsWithoutRef<P>' is not assignable to type 'P'.
'P' could be instantiated with an arbitrary type which could be unrelated to 'PropsWithoutRef<P>'.
import 'react-native-paper/src/utils/forwardRef';
declare module 'react-native-paper/src/utils/forwardRef' {
export declare const forwardRef: <T, P = {}>(
render: ForwardRefRenderFunction<T, PropsWithoutRef<P>>
) => ForwardRefComponent<T, P> = React.forwardRef;
}
Current behaviour
Expected behaviour
type checking should complete without errors
How to reproduce?
tsc --noEmitin the project directoryPreview
N/A
What have you tried so far?
react-native-paper/src/utils/forwardRef.tsxskipLibCheck: trueto tsconfig.jsonnode_modules/react-native-paper/srcto theexcludearray in tsconfig.jsonYour Environment