diff --git a/complex-types.d.ts b/complex-types.d.ts index 6d0c058..0877550 100644 --- a/complex-types.d.ts +++ b/complex-types.d.ts @@ -24,3 +24,15 @@ declare module 'mdast' { mdxFlowExpression: MdxFlowExpression } } + +declare module 'hast' { + interface RootContentMap { + mdxTextExpression: MdxTextExpression + mdxFlowExpression: MdxFlowExpression + } + + interface ElementContentMap { + mdxFlowExpression: MdxFlowExpression + mdxFlowExpression: MdxFlowExpression + } +} diff --git a/package.json b/package.json index ade4477..111feb9 100644 --- a/package.json +++ b/package.json @@ -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",