diff options
author | 2023-06-06 14:48:54 -0400 | |
---|---|---|
committer | 2023-06-06 14:48:54 -0400 | |
commit | a11b62ee1f5d524b0ba942818525b623a6d6eb99 (patch) | |
tree | f1b010a172546f6f1180a1b8f89b4695fca8d4d7 /packages/integrations/markdoc/src/heading-ids.ts | |
parent | 8034edd9ecf805073395ba7f68f73cd5fc4d2c73 (diff) | |
download | astro-a11b62ee1f5d524b0ba942818525b623a6d6eb99.tar.gz astro-a11b62ee1f5d524b0ba942818525b623a6d6eb99.tar.zst astro-a11b62ee1f5d524b0ba942818525b623a6d6eb99.zip |
Fix: Markdoc type errors (#7311)
* fix: config, prism, shiki exports
* fix: type error for `render` property
* chore: use `.ts` files in select tests for type checks
* fix: type error on shiki() promise
* chore: changeset
Diffstat (limited to 'packages/integrations/markdoc/src/heading-ids.ts')
-rw-r--r-- | packages/integrations/markdoc/src/heading-ids.ts | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/integrations/markdoc/src/heading-ids.ts b/packages/integrations/markdoc/src/heading-ids.ts index 5e54af9a7..41773250e 100644 --- a/packages/integrations/markdoc/src/heading-ids.ts +++ b/packages/integrations/markdoc/src/heading-ids.ts @@ -1,6 +1,9 @@ -import Markdoc, { type RenderableTreeNode, type Schema } from '@markdoc/markdoc'; +import Markdoc, { + type RenderableTreeNode, + type Schema, + type Config as MarkdocConfig, +} from '@markdoc/markdoc'; import Slugger from 'github-slugger'; -import type { AstroMarkdocConfig } from './config.js'; import { getTextContent } from './runtime.js'; import { MarkdocError } from './utils.js'; @@ -19,9 +22,9 @@ function getSlug( return slug; } -type HeadingIdConfig = AstroMarkdocConfig<{ - headingSlugger: Slugger; -}>; +type HeadingIdConfig = MarkdocConfig & { + ctx: { headingSlugger: Slugger }; +}; /* Expose standalone node for users to import in their config. |