// Minimal ambient types for the untyped `react-native-markdown-display` package // (no @types package is published). Only the surface this package consumes is // declared; everything else stays loosely typed. declare module 'react-native-markdown-display' { import type { ComponentType, ReactNode } from 'react'; export interface ASTNode { type: string; key: string; content: string; sourceInfo?: string; attributes: Record; children: ASTNode[]; } // `styles` values are RN style objects from the untyped library; typed as // `any` so rule bodies can pass them straight to View/Text/Image style props. export type RenderRule = ( node: ASTNode, children: ReactNode[], parent: ASTNode[], // eslint-disable-next-line @typescript-eslint/no-explicit-any styles: Record, // eslint-disable-next-line @typescript-eslint/no-explicit-any inheritedStyles?: Record, ) => ReactNode; export interface MarkdownProps { children?: ReactNode; style?: Record; mergeStyle?: boolean; rules?: Record; onLinkPress?: (url: string) => boolean; markdownit?: unknown; debugPrintTree?: boolean; } export function MarkdownIt(options?: Record): unknown; const Markdown: ComponentType; export default Markdown; }