0
Fork 0
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:
Caleb Jasik 2021-09-03 12:42:20 -05:00 committed by GitHub
parent d54cc96cfc
commit 7cb31c6e01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/markdown-support': patch
---
Fix the importing of `unified` `Plugin` and `UnifiedPlugin` types

View file

@ -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 {

View file

@ -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];