(path: string, windowMs: number)
| 24 | * the next (real, external) change to the same file. |
| 25 | */ |
| 26 | export function consumeInternalWrite(path: string, windowMs: number): boolean { |
| 27 | const ts = timestamps.get(path) |
| 28 | if (ts !== undefined && Date.now() - ts < windowMs) { |
| 29 | timestamps.delete(path) |
| 30 | return true |
| 31 | } |
| 32 | return false |
| 33 | } |
| 34 | |
| 35 | export function clearInternalWrites(): void { |
| 36 | timestamps.clear() |
no test coverage detected