Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
inokawa committed Oct 9, 2020
1 parent a2b9d91 commit 1ba556c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/slate-remark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ import * as slate from "slate";
import * as mdast from "./models/mdast";
import { Node } from "unist";
import { SlateNode } from "./remark-slate";
import { Plugin } from "unified";

export default function plugin() {
const plugin: Plugin<[{}?]> = function (settings?: {}) {
// @ts-ignore
return transformer;

function transformer(node: slate.Node): Node {
function transformer(node: any): Node {
return createMdastRoot(node);
}
}
};
export default plugin;

function createMdastRoot(node: slate.Node): Node {
const root: mdast.Root = {
Expand Down

0 comments on commit 1ba556c

Please sign in to comment.