nagaozen / markdown-it-toc-done-right

A table of contents (TOC) plugin for Markdown-it with focus on semantic and security. Made to work gracefully with markdown-it-anchor.
MIT License
133 stars 26 forks source link

types: fix import #53

Closed korki43 closed 3 years ago

korki43 commented 3 years ago

This fixes the import of types from markdown-it.

@types/markdown-it doesn't provide default exports, so I got an error saying something like: Module '"/path/to/@types/markdown-it/index"' can only be default-imported using the 'esModuleInterop' flag. (And yes, I had esModuleInterop activated in my tsconfig)

I fixed it by importing only PluginWithOptions. I don't really understand why this works (and didn't before) but it works so I think it's ok. It should work on all TypeScript build targets.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 91


Totals Coverage Status
Change from base Build 89: 0.0%
Covered Lines: 53
Relevant Lines: 53

💛 - Coveralls