import React from 'react' ; export interface SetRef { < T > ( ref , value ) : void ; } export const setRef = ( ref , value ) => { if ( typeof ref === 'function' ) { ref ( value ) ; } else if ( ref ) { ref . current = value ; } } ;