|
|
@@ -1,8 +1,6 @@
|
|
|
import type { ComponentType } from 'react';
|
|
|
|
|
|
-import type { SpecialComponents } from 'react-markdown/lib/ast-to-react';
|
|
|
-import type { NormalComponents } from 'react-markdown/lib/complex-types';
|
|
|
-import type { ReactMarkdownOptions } from 'react-markdown/lib/react-markdown';
|
|
|
+import type { Options as ReactMarkdownOptions, Components } from 'react-markdown';
|
|
|
import type { PluggableList } from 'unified';
|
|
|
|
|
|
export type RendererOptions = Omit<ReactMarkdownOptions, 'remarkPlugins' | 'rehypePlugins' | 'components' | 'children'> & {
|
|
|
@@ -10,8 +8,7 @@ export type RendererOptions = Omit<ReactMarkdownOptions, 'remarkPlugins' | 'rehy
|
|
|
rehypePlugins: PluggableList,
|
|
|
components?:
|
|
|
| Partial<
|
|
|
- Omit<NormalComponents, keyof SpecialComponents>
|
|
|
- & SpecialComponents
|
|
|
+ Components
|
|
|
& {
|
|
|
[elem: string]: ComponentType<any>,
|
|
|
}
|