Skip to content

Commit 8d7b7b5

Browse files
committed
fix ts error
1 parent e117947 commit 8d7b7b5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/react-pages/src/node/virtual-module-plugins/outline-info-module/extractOutlineInfo.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import type { Root } from 'remark-mdx'
2+
13
// collect headings
24
// ref: https://github.com/syntax-tree/mdast-util-toc/blob/ba8f680a3cbcd96351febe2b73edb21598720945/lib/search.js#L67
35

@@ -10,7 +12,7 @@ export async function extractOutlineInfo(md: string) {
1012
const { toString } = await import('mdast-util-to-string')
1113
const { default: Slugger } = await import('github-slugger')
1214

13-
const ast = remark().use(frontmatter).use(gfm).use(remarkMdx).parse(md)
15+
const ast: Root = remark().use(frontmatter).use(gfm).use(remarkMdx).parse(md)
1416
const slugs = new Slugger()
1517
const headings: { depth: number; text: string; id: string }[] = []
1618

0 commit comments

Comments
 (0)