UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

1 lines 393 B
{"version":3,"sources":["../../src/util/resolveSetState.ts"],"sourcesContent":["import type { SetStateAction } from 'react'\n\nexport function resolveSetState<T>(action: SetStateAction<T>, prev: T): T {\n return typeof action === 'function' ? (action as (prev: T) => T)(prev) : action\n}"],"mappings":";AAEO,SAAS,gBAAmB,QAA2B,MAAY;AACxE,SAAO,OAAO,WAAW,aAAc,OAA0B,IAAI,IAAI;AAC3E;","names":[]}