1.0.0 • Published 5 months ago

@mdit-kdu/types v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

@mdit-kdu/types

Shared types definition of mdit-kdu.

Install

npm i @mdit-kdu/types

Usage

Add more properties to env via TypeScript module augmentation:

declare module '@mdit-kdu/types' {
  interface MarkdownItEnv {
    foo?: string[];
  }
}
import MarkdownIt from 'markdown-it';
import type { MarkdownItEnv } from '@mdit-kdu/types';

const md = MarkdownIt({ html: true });
const env: MarkdownItEnv = {};
const rendered = md.render('raw markdown text', env);