Open penfold opened 2 years ago
Typescript would be great- its quite a large change, so help will be needed.
That would be a really HUGE undertaking, since showdown uses some prototyping and weak typing that would be hard to replicate in pure typescript.
Here's how I'm using Showdown in my TypeScript Svelte app...
shell
npm install --save showdown @types/showdown
Component.svelte
<script lang="ts">
import showdown from 'showdown';
const converter = new showdown.Converter();
const html = converter.makeHtml(someMarkdownContent);
</script>
My variant in Vue app
npm install --save showdown @types/showdown
<script lang="ts">
import { Converter } from 'showdown';
const converter = new Converter();
const html = converter.makeHtml(someMarkdownContent);
</script>
Have you considered moving to use Typescript for v2.0?
Kind Regards, Paul