import { TextStyle } from 'react-native' ; export const TEXT_STYLE_PROPS = [ 'color' , 'fontFamily' , 'fontSize' , 'fontStyle' , 'fontWeight' ] ; export const pickTextStyles = ( style ) => TEXT_STYLE_PROPS . reduce < TextStyle > ( ( soFar , prop ) => { if ( style && prop in style ) { soFar [ prop ] = style [ prop ] as NonNullable < any > ; } return soFar ; } , { } ) ;