(timer: ReturnType<typeof setTimeout>)
| 8 | * do not support `unref`. |
| 9 | */ |
| 10 | export function safeUnref(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout> { |
| 11 | if (typeof timer === 'object' && typeof timer.unref === 'function') { |
| 12 | timer.unref(); |
| 13 | } |
| 14 | return timer; |
| 15 | } |
no test coverage detected