( updater: Updater<TInput, TOutput>, input: TInput, )
| 121 | export function noop() {} |
| 122 | |
| 123 | export function functionalUpdate<TInput, TOutput>( |
| 124 | updater: Updater<TInput, TOutput>, |
| 125 | input: TInput, |
| 126 | ): TOutput { |
| 127 | return typeof updater === 'function' |
| 128 | ? (updater as (_: TInput) => TOutput)(input) |
| 129 | : updater |
| 130 | } |
| 131 | |
| 132 | export function isValidTimeout(value: unknown): value is number { |
| 133 | return typeof value === 'number' && value >= 0 && value !== Infinity |
no outgoing calls
no test coverage detected