( updater: Updater<TInput, TOutput>, input: TInput, )
| 82 | export function noop() {} |
| 83 | |
| 84 | export function functionalUpdate<TInput, TOutput>( |
| 85 | updater: Updater<TInput, TOutput>, |
| 86 | input: TInput, |
| 87 | ): TOutput { |
| 88 | return typeof updater === 'function' |
| 89 | ? (updater as (_: TInput) => TOutput)(input) |
| 90 | : updater |
| 91 | } |
| 92 | |
| 93 | export function isValidTimeout(value: unknown): value is number { |
| 94 | return typeof value === 'number' && value >= 0 && value !== Infinity |
no outgoing calls
no test coverage detected
searching dependent graphs…