Skip to content

Commit

Permalink
fix: missing type dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Val-istar-Guo committed Jun 24, 2022
1 parent 3369d84 commit 3e975d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@
"unified": "^10.1.2"
},
"dependencies": {
"@types/hast": "*",
"@types/mdast": "*",
"@types/node": ">12",
"@types/prismjs": "^1.16.6",
"@types/unist": "*",
"prismjs": "^1.24.1",
"rehype-parse": "^7 || ^ 8",
"unist-util-is": "^4 || ^5",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const visitor = (preNode: hast.Element): void => {
const html = Prism.highlight(textNode.value, Prism.languages[lang], lang)
const tree = unified()
.use(parse, { fragment: true })
.parse(html) as hast.Element
.parse(html) as unknown as hast.Element

if (!preNode.properties) preNode.properties = {}
if (!preNode.properties.className) preNode.properties.className = []
Expand Down

0 comments on commit 3e975d1

Please sign in to comment.