diff --git a/packages/markdown/remark/src/rehype-collect-headers.ts b/packages/markdown/remark/src/rehype-collect-headers.ts index c6c0e568cd17..77126ab7e57e 100644 --- a/packages/markdown/remark/src/rehype-collect-headers.ts +++ b/packages/markdown/remark/src/rehype-collect-headers.ts @@ -44,8 +44,8 @@ export default function createCollectHeaders() { if (isJSX) { // HACK: for ids that have JSX content, use $$slug helper to generate slug at runtime node.properties.id = `$$slug(\`${text.replace(/\{/g, '${')}\`)`; - node.type = 'raw'; - node.value = `<${node.tagName} id={${node.properties.id}}>${raw}`; + (node as any).type = 'raw'; + (node as any).value = `<${node.tagName} id={${node.properties.id}}>${raw}`; } else { node.properties.id = slugger.slug(text); }