mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Import unified types as unified since there is no default export for 'unified'. (#1296)
This commit is contained in:
parent
d54cc96cfc
commit
7cb31c6e01
3 changed files with 7 additions and 2 deletions
5
.changeset/serious-icons-invent.md
Normal file
5
.changeset/serious-icons-invent.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@astrojs/markdown-support': patch
|
||||
---
|
||||
|
||||
Fix the importing of `unified` `Plugin` and `UnifiedPlugin` types
|
|
@ -1,4 +1,4 @@
|
|||
import unified from 'unified';
|
||||
import * as unified from 'unified';
|
||||
import type { Plugin, UnifiedPluginImport } from './types';
|
||||
|
||||
async function importPlugin(p: string | UnifiedPluginImport): UnifiedPluginImport {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import unified from 'unified';
|
||||
import * as unified from 'unified';
|
||||
|
||||
export type UnifiedPluginImport = Promise<{ default: unified.Plugin }>;
|
||||
export type Plugin = string | [string, any] | UnifiedPluginImport | [UnifiedPluginImport, any];
|
||||
|
|
Loading…
Reference in a new issue