( configPath: string, schema: S )
| 97 | } |
| 98 | |
| 99 | export function readConfigFile<S extends z.ZodType>( |
| 100 | configPath: string, |
| 101 | schema: S |
| 102 | ): z.output<S> { |
| 103 | return schema.parse(readJsonFileSync(configPath)); |
| 104 | } |
| 105 | |
| 106 | export function writeConfigFile<S extends z.ZodType>( |
| 107 | configPath: string, |
no test coverage detected