(ms: number, label: string)
| 58 | if (lifecycle) { |
| 59 | await lifecycle.delay(ms, { label }); |
| 60 | return; |
| 61 | } |
| 62 | await new Promise(resolve => setTimeout(resolve, ms)); |
| 63 | } |
| 64 | |
| 65 | function scheduleAbort(controller: AbortController, ms: number, label: string): () => void { |
| 66 | const lifecycle = tryGetCurrentGenerationContext(); |
| 67 | if (lifecycle) { |
| 68 | const handle = lifecycle.setTimeout(() => controller.abort(), ms, { label }); |
| 69 | return () => clearTimeout(handle); |
| 70 | } |
no outgoing calls
no test coverage detected