import { ComponentType, ComponentPropsWithoutRef } from 'react'; import { type Options as ReactMarkdownOptions } from 'react-markdown'; import { type ReactMarkdownProps } from 'react-markdown/lib/ast-to-react'; /** react-markdown 渲染 `` 时注入组件所拿到的 props(原生 anchor 属性 + react-markdown 的 `node` 等) */ type AnchorRendererProps = ComponentPropsWithoutRef<'a'> & ReactMarkdownProps; export type LinkComponent = ComponentType; export interface MarkdownProps extends ReactMarkdownOptions { /** * 自定义链接渲染组件,用于替换内置的 ``。 * 各站点可注入自己的路由 Link(如 react-router `Link`)以实现 SPA 内部跳转; * 缺省时回退到内置 `LinkRenderer`,保持 router 无关,不给本组件引入路由依赖。 */ linkComponent?: LinkComponent; } export declare function Markdown(props: MarkdownProps): import("react/jsx-runtime").JSX.Element; export declare namespace Markdown { var displayName: string; } export {};