diff --git a/.storybook/playground.stories.tsx b/.storybook/playground.stories.tsx index ed1c05c8..3d048461 100644 --- a/.storybook/playground.stories.tsx +++ b/.storybook/playground.stories.tsx @@ -9,7 +9,7 @@ import text from "../fixture/article.md"; const processor = unified() .use(markdown, { commonmark: true }) - .use(remarkToSlate as any); + .use(remarkToSlate); export default { title: "playground", diff --git a/src/remark-slate.ts b/src/remark-slate.ts index 1cc04ab7..5c1cfc7c 100644 --- a/src/remark-slate.ts +++ b/src/remark-slate.ts @@ -1,12 +1,12 @@ import { Node } from "unist"; -import { Compiler } from "unified"; import * as slate from "slate"; import * as mdast from "./models/mdast"; const VOID_KEY = "void"; -export default function plugin(this: { Compiler: Compiler }) { - this.Compiler = (compiler as any) as Compiler; +export default function plugin() { + // @ts-ignore + this.Compiler = compiler; function compiler(node: Node) { return remarkToSlate((node as any) as mdast.Root);