import { UpdateStateAction } from './types'; export function resolveValue(prev: T, next: UpdateStateAction): T { return typeof next === 'function' ? (next as Function)(prev) : next; }