Skip to content

Commit

Permalink
fix: type inferencing in preview
Browse files Browse the repository at this point in the history
  • Loading branch information
bholmesdev committed Feb 16, 2023
1 parent 0c05034 commit fb79194
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/integrations/markdoc/src/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -48,3 +49,4 @@ export default function markdoc(): AstroIntegration {
}

export const Markdoc = _Markdoc;
export type MarkdocConfig = _MarkdocConfig;
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
}>;
Expand Down

0 comments on commit fb79194

Please sign in to comment.