Skip to content

Commit 46801b3

Browse files
committed
Add nodes to hast node type registry
1 parent 7eede29 commit 46801b3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

lib/complex-types.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,15 @@ declare module 'mdast' {
4242
mdxJsxFlowElement: MdxJsxFlowElement
4343
}
4444
}
45+
46+
declare module 'hast' {
47+
interface RootContentMap {
48+
mdxJsxTextElement: MdxJsxTextElement
49+
mdxJsxFlowElement: MdxJsxFlowElement
50+
}
51+
52+
interface ElementContentMap {
53+
mdxJsxFlowElement: MdxJsxFlowElement
54+
mdxJsxFlowElement: MdxJsxFlowElement
55+
}
56+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
],
3838
"dependencies": {
3939
"@types/estree-jsx": "^0.0.1",
40+
"@types/hast": "^2.0.0",
4041
"@types/mdast": "^3.0.0",
4142
"ccount": "^2.0.0",
4243
"mdast-util-to-markdown": "^1.3.0",

0 commit comments

Comments
 (0)