import React , { RefObject } from 'react' ; import isFunction from 'lodash.isfunction' ; export default ( ref , internalRef ) : void => { if ( isFunction ( ref ) ) { ( ref as ( instance : HTMLInputElement ) => void ) ( internalRef . current ) ; } else { ( ref as React . MutableRefObject < HTMLInputElement > ) . current = internalRef . current ; } } ;