declare module 'markdown-it' {
  import type { PluginSimple, Renderer, ParserRules, PresetCores } from 'markdown-it';

  interface Options {
    html?: boolean;
    xhtmlOut?: boolean;
    breaks?: boolean;
    langPrefix?: string;
    linkify?: boolean;
    typographer?: boolean;
    quotes?: string;
    highlight?: (str: string, lang: string) => string;
  }

  type RenderRule = (tokens: any[], idx: number, options: Options, env: any, self: any) => string;

  interface MarkdownIt {
    render(text: string, env?: any): string;
    utils: {
      escapeHtml(str: string): string;
    };
    set(options: Options): MarkdownIt;
  }

  interface MarkdownItConstructor {
    new (preset?: string | PresetCores, options?: Options): MarkdownIt;
    (preset?: string | PresetCores, options?: Options): MarkdownIt;
  }

  const MarkdownIt: MarkdownItConstructor;
  export default MarkdownIt;
}
