(extConfig: ExternalConfig, extConfigFilePath: string)
| 81 | } |
| 82 | |
| 83 | export async function writeConfig(extConfig: ExternalConfig, extConfigFilePath: string): Promise<void> { |
| 84 | switch (extname(extConfigFilePath)) { |
| 85 | case '.json': { |
| 86 | await writeJSON(extConfigFilePath, extConfig, { spaces: 2 }); |
| 87 | break; |
| 88 | } |
| 89 | case '.ts': { |
| 90 | await writeFile(extConfigFilePath, formatConfigTS(extConfig)); |
| 91 | break; |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | type ExtConfigPairs = Pick<AppConfig, 'extConfigType' | 'extConfigName' | 'extConfigFilePath' | 'extConfig'>; |
| 97 |
nothing calls this directly
no test coverage detected