| 163 | } |
| 164 | |
| 165 | interface DelayedFunction<T extends (...args: any[]) => unknown> { |
| 166 | (...args: Parameters<T>): void; |
| 167 | $pending: boolean; |
| 168 | $cancelTimeout: () => void; |
| 169 | $execute: (...args: Parameters<T>) => void; |
| 170 | } |
| 171 | |
| 172 | function delay<T extends (...args: any[]) => unknown>(callback: T, timeout: number): DelayedFunction<T> { |
| 173 | let timer: ReturnType<typeof setTimeout> | undefined; |
nothing calls this directly
no outgoing calls
no test coverage detected