(path: string)
| 54 | } |
| 55 | |
| 56 | add(path: string): void { |
| 57 | this.changes.add(path) |
| 58 | |
| 59 | if (this.timer) { |
| 60 | clearTimeout(this.timer) |
| 61 | } |
| 62 | |
| 63 | this.timer = setTimeout(() => { |
| 64 | const currentChanges = new Set(this.changes) |
| 65 | this.callback(currentChanges) |
| 66 | this.changes.clear() |
| 67 | }, this.delay) |
| 68 | } |
| 69 | |
| 70 | size(): number { |
| 71 | return this.changes.size |