(taskListId: string)
| 112 | } |
| 113 | |
| 114 | async function readHighWaterMark(taskListId: string): Promise<number> { |
| 115 | const path = getHighWaterMarkPath(taskListId) |
| 116 | try { |
| 117 | const content = (await readFile(path, 'utf-8')).trim() |
| 118 | const value = parseInt(content, 10) |
| 119 | return isNaN(value) ? 0 : value |
| 120 | } catch { |
| 121 | return 0 |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | async function writeHighWaterMark( |
| 126 | taskListId: string, |
no test coverage detected