import { MutableRefObject } from 'react' ; import { isRef } from './is' ; import type { MaybeRef } from './types' ; param target returns export function unRef < T = HTMLElement > ( target ) { const element = isRef ( target ) ? ( target as MutableRefObject < T > ) . current : ( target as T ) ; return element ; }