(filePath: string)
| 254 | } |
| 255 | |
| 256 | function readJsonFile(filePath: string): unknown | null { |
| 257 | if (!fs.existsSync(filePath)) return null; |
| 258 | try { |
| 259 | return JSON.parse(fs.readFileSync(filePath, 'utf8')) as unknown; |
| 260 | } catch { |
| 261 | return null; |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | function removeFileIfExists(filePath: string): void { |
| 266 | try { |
no test coverage detected