markdown-js icon indicating copy to clipboard operation
markdown-js copied to clipboard

Create typings, or a workaround to import to typescript?

Open dessalines opened this issue 9 years ago • 2 comments

Does anyone have this working with typescript, or have typings with it? I'd love if this node package came with the .d.ts typings file.

dessalines avatar Apr 21 '16 03:04 dessalines

If you're just using the toHTML method, you'll only need this:

declare module "markdown" {
  var markdown: {
    toHTML(markdown: string): string;
  }
}

timfish avatar Nov 25 '16 23:11 timfish

Same issue, use in TypeScript, it will tips: Try npm install @types/markdown if it exists or add a new declaration (.d.ts) file containing declare module 'markdown'; and there is no @types/markdown.

zedfight avatar May 16 '19 13:05 zedfight