Skip to content

Commit

Permalink
type: Fix type errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 20, 2021
1 parent bdce94a commit 26bde02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Expand Up @@ -3,9 +3,9 @@ import { Plugin } from 'unified'
import visit from './visit'

export type MdastTransformer = (tree: Root) => void
export type RemarkRewriteHandle = (node: Content, index: number, parent: Parent) => void
export type RehypeRewriteHandle = (node: Content, index: number, parent: Parent) => void

const remarkRewrite: Plugin<[RemarkRewriteHandle?]> = (handle): MdastTransformer =>{
const remarkRewrite: Plugin<[RehypeRewriteHandle?]> = (handle): MdastTransformer =>{
return (tree: Root) => {
visit(tree, (node: Content, index: number, parent: Parent) => {
if (handle && typeof handle === 'function') {
Expand Down

0 comments on commit 26bde02

Please sign in to comment.