()
| 451 | let pending: NodeJS.Timeout | undefined |
| 452 | |
| 453 | const fire = (): void => { |
| 454 | if (pending) clearTimeout(pending) |
| 455 | pending = setTimeout(() => { |
| 456 | pending = undefined |
| 457 | try { opts.onTrigger() } catch (err) { |
| 458 | console.error(`[guardian] flag-watcher onTrigger threw:`, err) |
| 459 | } |
| 460 | }, debounceMs) |
| 461 | } |
| 462 | |
| 463 | ;(async () => { |
| 464 | try { |
no test coverage detected