import type { ParseContextType } from '../context/parseTypes.js'; import type { StackTrail } from '../context/StackTrail.js'; export type ToPresentInfoArgs = { info: Info | null | undefined; /** Trail that ends in the `info` key. */ stackTrail: StackTrail; context: ParseContextType; }; /** * Check the document's `info` field before its fields are parsed. Shared by * the 3.0, 3.1 and 3.2 parsers. * * Missing, `null` or not a plain object: logs one `MISSING_INFO` warning and * returns `undefined`. The caller reads it as an empty title and version. */ export declare const toPresentInfo: ({ info, stackTrail, context }: ToPresentInfoArgs) => Info | undefined; export type ToInfoStringArgs = { value: unknown; key: 'title' | 'version'; parent: unknown; /** Trail that ends in the `info` key. */ stackTrail: StackTrail; context: ParseContextType; }; /** * Read `info.title` or `info.version`. A value that is not a string (missing, * or a YAML number such as `version: 1.0`) logs one `MISSING_INFO` warning * and reads as `''`. */ export declare const toInfoString: ({ value, key, parent, stackTrail, context }: ToInfoStringArgs) => string;