Skip to content

Commit

Permalink
Add nodes to hast node type registry
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jan 31, 2022
1 parent bebeaf4 commit 73d1d52
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 12 additions & 0 deletions complex-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,15 @@ declare module 'mdast' {
mdxFlowExpression: MdxFlowExpression
}
}

declare module 'hast' {
interface RootContentMap {
mdxTextExpression: MdxTextExpression
mdxFlowExpression: MdxFlowExpression
}

interface ElementContentMap {
mdxFlowExpression: MdxFlowExpression
mdxFlowExpression: MdxFlowExpression
}
}
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@
"index.js"
],
"dependencies": {
"@types/estree-jsx": "^0.0.1"
"@types/estree-jsx": "^0.0.1",
"@types/hast": "^2.0.0",
"@types/mdast": "^3.0.0",
"mdast-util-from-markdown": "^1.0.0",
"mdast-util-to-markdown": "^1.0.0"
},
"devDependencies": {
"@types/acorn": "^4.0.0",
"@types/tape": "^4.0.0",
"acorn": "^8.0.0",
"c8": "^7.0.0",
"mdast-util-from-markdown": "^1.0.0",
"mdast-util-to-markdown": "^1.0.0",
"micromark-extension-mdx-expression": "^1.0.0",
"prettier": "^2.0.0",
"remark-cli": "^10.0.0",
Expand Down

0 comments on commit 73d1d52

Please sign in to comment.