/** * View of an object's x-* spec-extension fields. Values are `unknown` because * extension payloads are arbitrary JSON, validated at runtime by the extension * component that renders them. Spec object types declare no x-* keys (and no * index signature), so they can't assign to this directly; extension readers * accept `object` and narrow through `getExtension` / the key scan instead of * making every caller cast. */ export type ExtensionSource = { [key: `x-${string}`]: unknown; }; /** Reads one x-* field off any spec object, e.g. `getExtension(info, "x-logo")`. */ export declare const getExtension: (source: object | undefined, key: `x-${string}`) => unknown; interface RenderExtensionsProps { /** The object to scan for x-* fields, e.g. the `info` object. */ source: object | undefined; /** Prefix for each matched extension's `path` prop, e.g. "info". */ pathPrefix: string; } /** * Scans `source`'s own keys for x-* spec-extension fields the `x-tensions` * catalog knows how to render, and lazily loads + renders each match (via * `React.lazy`, so an extension's code is only fetched when its key actually * appears in a document). Unmatched x-* keys, and the library's own internal * bookkeeping markers (`x-parser-*`, `x-lib-*`), render nothing. */ export declare function RenderExtensions({ source, pathPrefix }: RenderExtensionsProps): import("react").JSX.Element | null; export default RenderExtensions;