(rawConfig: unknown)
| 641 | export type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>; |
| 642 | |
| 643 | export function parseI18nConfig(rawConfig: unknown) { |
| 644 | try { |
| 645 | const result = LATEST_CONFIG_DEFINITION.parse(rawConfig); |
| 646 | return result; |
| 647 | } catch (error: any) { |
| 648 | throw new Error(`Failed to parse config: ${error.message}`); |
| 649 | } |
| 650 | } |
| 651 | |
| 652 | export const defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue; |
no test coverage detected