@mdit-vue/types
v2.1.0
Published
Shared types definition of mdit-vue
Downloads
154,512
Readme
@mdit-vue/types
Shared types definition of mdit-vue.
Install
npm i @mdit-vue/types
Usage
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);