fix: type inferencing in preview
This commit is contained in:
parent
785bd200c7
commit
702ca067d4
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -5,14 +5,14 @@ declare module 'astro:content' {
|
|||
component: import('astro').ComponentInstance['default'];
|
||||
props?(params: {
|
||||
attributes: Record<string, any>;
|
||||
getTreeNode(): import('@astrojs/markdoc').Markdoc.Tag;
|
||||
getTreeNode(): typeof import('@astrojs/markdoc').Markdoc.Tag;
|
||||
}): Record<string, any>;
|
||||
};
|
||||
|
||||
interface Render {
|
||||
'.mdoc': Promise<{
|
||||
Content(props: {
|
||||
config?: import('@astrojs/markdoc').Markdoc.Config;
|
||||
config?: import('@astrojs/markdoc').MarkdocConfig;
|
||||
components?: Record<string, ComponentRenderer>;
|
||||
}): import('astro').MarkdownInstance<{}>['Content'];
|
||||
}>;
|
||||
|
|
Loading…
Reference in a new issue