()
| 37 | const ioFormat: IOFormat = filename ? formatFromFilename(filename) : 'json' |
| 38 | |
| 39 | const hasInput = (): boolean => !!filename |
| 40 | |
| 41 | const read = async (): Promise<T> => { |
| 42 | if (!filename) { |
| 43 | throw ReferenceError('read called when hasInput returns false') |
| 44 | } |
| 45 | |
| 46 | return parseJSONOrYAML(await readFile(filename, 'utf-8'), filename) |
| 47 | } |
| 48 |
nothing calls this directly
no test coverage detected