import type { SourceCode } from '../react/jsx/utils/extractSourceCode.js'; import type { JSONObject } from '../types/data/json.js'; export type MetadataLeaf = { context?: string; maxChars?: number; sourceCode?: Record; }; export type MetadataObject = { [key: string]: MetadataLeaf | MetadataObject; }; export type MetadataArray = (MetadataLeaf | MetadataObject)[]; export type KeyedMetadata = MetadataObject | MetadataArray; /** * Detects and parses a companion metadata file for a given source file. * * For `translations.json`, looks for `translations.metadata.json`. * For `translations.yaml` or `translations.yml`, looks for `translations.metadata.yaml` or `.yml`. * * @param sourceFilePath - Absolute path to the source file * @param sourceContent - Parsed source content (object) for structure validation * @returns Parsed metadata object, or undefined if no companion file exists */ export declare function parseKeyedMetadata(sourceFilePath: string, sourceContent: JSONObject | JSONObject[]): KeyedMetadata | undefined;