MCPcopy
hub / github.com/lingodotdev/lingo.dev / parseI18nConfig

Function parseI18nConfig

packages/spec/src/config.ts:643–650  ·  view source on GitHub ↗
(rawConfig: unknown)

Source from the content-addressed store, hash-verified

641export type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
642
643export 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
652export const defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;

Callers 3

config.spec.tsFile · 0.90
getConfigFunction · 0.85
demo.spec.tsFile · 0.85

Calls 1

parseMethod · 0.80

Tested by

no test coverage detected