diff --git a/packages/integrations/markdoc/src/index.ts b/packages/integrations/markdoc/src/index.ts index 92ef73a704fe..ed260563b05a 100644 --- a/packages/integrations/markdoc/src/index.ts +++ b/packages/integrations/markdoc/src/index.ts @@ -1,5 +1,6 @@ import type { AstroIntegration } from 'astro'; import type { InlineConfig } from 'vite'; +import type { Config as _MarkdocConfig } from '@markdoc/markdoc'; import _Markdoc from '@markdoc/markdoc'; import { parseFrontmatter } from './utils.js'; import { fileURLToPath } from 'node:url'; @@ -48,3 +49,4 @@ export default function markdoc(): AstroIntegration { } export const Markdoc = _Markdoc; +export type MarkdocConfig = _MarkdocConfig; diff --git a/packages/integrations/markdoc/template/content-module-types.d.ts b/packages/integrations/markdoc/template/content-module-types.d.ts index f13d422caa28..528c7db7ee8e 100644 --- a/packages/integrations/markdoc/template/content-module-types.d.ts +++ b/packages/integrations/markdoc/template/content-module-types.d.ts @@ -5,14 +5,14 @@ declare module 'astro:content' { component: import('astro').ComponentInstance['default']; props?(params: { attributes: Record; - getTreeNode(): import('@astrojs/markdoc').Markdoc.Tag; + getTreeNode(): typeof import('@astrojs/markdoc').Markdoc.Tag; }): Record; }; interface Render { '.mdoc': Promise<{ Content(props: { - config?: import('@astrojs/markdoc').Markdoc.Config; + config?: import('@astrojs/markdoc').MarkdocConfig; components?: Record; }): import('astro').MarkdownInstance<{}>['Content']; }>;