summaryrefslogtreecommitdiff
path: root/packages/markdown/remark/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/markdown/remark/src')
-rw-r--r--packages/markdown/remark/src/index.ts2
-rw-r--r--packages/markdown/remark/src/types.ts11
2 files changed, 3 insertions, 10 deletions
diff --git a/packages/markdown/remark/src/index.ts b/packages/markdown/remark/src/index.ts
index a60ab88c0..d42ce480c 100644
--- a/packages/markdown/remark/src/index.ts
+++ b/packages/markdown/remark/src/index.ts
@@ -102,7 +102,7 @@ export async function createMarkdownProcessor(
}
// Remark -> Rehype
- parser.use(remarkRehype as any, {
+ parser.use(remarkRehype, {
allowDangerousHtml: true,
passThrough: [],
...remarkRehypeOptions,
diff --git a/packages/markdown/remark/src/types.ts b/packages/markdown/remark/src/types.ts
index 7038e2425..b25e92271 100644
--- a/packages/markdown/remark/src/types.ts
+++ b/packages/markdown/remark/src/types.ts
@@ -1,10 +1,6 @@
import type * as hast from 'hast';
import type * as mdast from 'mdast';
-import type {
- one as Handler,
- all as Handlers,
- Options as RemarkRehypeOptions,
-} from 'remark-rehype';
+import type { Options as RemarkRehypeOptions } from 'remark-rehype';
import type {
BuiltinTheme,
LanguageRegistration,
@@ -34,10 +30,7 @@ export type RehypePlugin<PluginParameters extends any[] = any[]> = unified.Plugi
export type RehypePlugins = (string | [string, any] | RehypePlugin | [RehypePlugin, any])[];
-export type RemarkRehype = Omit<RemarkRehypeOptions, 'handlers' | 'unknownHandler'> & {
- handlers?: typeof Handlers;
- handler?: typeof Handler;
-};
+export type RemarkRehype = RemarkRehypeOptions;
export interface ShikiConfig {
langs?: LanguageRegistration[];