$ npm install @mdit-vue/types
Shared types definition of mdit-vue.
npm i @mdit-vue/types
Add more properties to env
via TypeScript module augmentation:
declare module '@mdit-vue/types' {
interface MarkdownItEnv {
foo?: string[];
}
}
import type { MarkdownItEnv } from '@mdit-vue/types';
import MarkdownIt from 'markdown-it';
const md = MarkdownIt({ html: true });
const env: MarkdownItEnv = {};
const rendered = md.render('raw markdown text', env);
© 2010 - cnpmjs.org x YWFE | Home | YWFE