( nextState: IHookStateResolvable<S>, currentState?: C )
| 16 | currentState?: C |
| 17 | ): S; |
| 18 | export function resolveHookState<S, C extends S>( |
| 19 | nextState: IHookStateResolvable<S>, |
| 20 | currentState?: C |
| 21 | ): S { |
| 22 | if (typeof nextState === 'function') { |
| 23 | return nextState.length ? (nextState as Function)(currentState) : (nextState as Function)(); |
| 24 | } |
| 25 | |
| 26 | return nextState; |
| 27 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…