Skip to content

armgit / papra

Public Imported from GitHub
0

The minimalistic document archiving platform.

227 B
Raw Blame
export function resolveSetterValue<T>(valueOrUpdater: T | ((prevValue: T) => T), prevValue: T): T {
  return typeof valueOrUpdater === 'function'
    ? (valueOrUpdater as (prevValue: T) => T)(prevValue)
    : valueOrUpdater;
}