renderer-options.ts 507 B

1234567891011121314151617
  1. import type { ComponentType } from 'react';
  2. import type { Options as ReactMarkdownOptions, Components } from 'react-markdown';
  3. import type { PluggableList } from 'unified';
  4. export type RendererOptions = Omit<ReactMarkdownOptions, 'remarkPlugins' | 'rehypePlugins' | 'components' | 'children'> & {
  5. remarkPlugins: PluggableList,
  6. rehypePlugins: PluggableList,
  7. components?:
  8. | Partial<
  9. Components
  10. & {
  11. [elem: string]: ComponentType<any>,
  12. }
  13. >
  14. | undefined
  15. };