import React from 'react' ; export type Component < T , P > = T & { defaultProps ? : Partial < P > ; displayName ? : string ; } ; see forwardRef param component export const documentable = < T , P > ( component ) : Component < T , P > => component ; note see documentable warning param component export const forwardRef = < P , T > ( component ) => ( React . forwardRef ( component ) as unknown ) as ( props : P & { ref ? : React . Ref < T > ; } ) => React . ReactElement | null ;