renderer-options.ts 510 B

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