(filepath: string)
| 6 | } |
| 7 | |
| 8 | export function readJSONFile<T>(filepath: string): Promise<T> { |
| 9 | return ( |
| 10 | readFile(filepath) |
| 11 | // oxlint-disable-next-line typescript/no-unsafe-type-assertion |
| 12 | .then((content) => parseJsonc(content) as T) |
| 13 | ); |
| 14 | } |
| 15 | |
| 16 | export function fileExists(filepath: string) { |
| 17 | return fs.access(filepath).then( |
no test coverage detected