(filePath: string)
| 123 | } |
| 124 | |
| 125 | async function loadJsonFile(filePath: string): Promise<JsonObject> { |
| 126 | try { |
| 127 | const data = await fs.readFile(filePath, "utf8"); |
| 128 | return JSON.parse(data); |
| 129 | } catch (error) { |
| 130 | console.error(`Error reading file ${filePath}:`, error); |
| 131 | return {}; |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | async function saveJsonFile(filePath: string, data: any): Promise<void> { |
| 136 | try { |
no test coverage detected