From 6b4fcde3760140733ad03a162dd0682004c106b2 Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Wed, 17 May 2023 16:35:48 -0400 Subject: [PATCH] Fix: add `headings` to `.mdoc` render type (#7111) * fix: add `headings` to `.mdoc` render type * chore: changeset --- .changeset/plenty-cows-act.md | 5 +++++ .../integrations/markdoc/template/content-module-types.d.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/plenty-cows-act.md diff --git a/.changeset/plenty-cows-act.md b/.changeset/plenty-cows-act.md new file mode 100644 index 000000000000..7b76a769d6c7 --- /dev/null +++ b/.changeset/plenty-cows-act.md @@ -0,0 +1,5 @@ +--- +'@astrojs/markdoc': patch +--- + +Fix: add `headings` to Markdoc `render()` return type. diff --git a/packages/integrations/markdoc/template/content-module-types.d.ts b/packages/integrations/markdoc/template/content-module-types.d.ts index 7b82eb18a1fe..193f4c6f2912 100644 --- a/packages/integrations/markdoc/template/content-module-types.d.ts +++ b/packages/integrations/markdoc/template/content-module-types.d.ts @@ -2,6 +2,7 @@ declare module 'astro:content' { interface Render { '.mdoc': Promise<{ Content(props: Record): import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; }>; } }