0

I am using Typescript with React, and I am trying to parse markdown content. There is alot of markdown-parsers out there, but none using typings in Typescript (as React components).

How do I make Typescript use parsers like react-markdown?

I am trying to do things like:

import * as ReactMarkdown from 'react-markdown'
// OR
import ReactMarkdown = require('react-markdown')

I have tried things like:

/// <amd-dependency path="react-markdown" />
"use strict"
declare var ReactMarkdown: any;

Maybe the paths is wrong. Anyway, is there a general solution for adding none-typed modules in Typescript?

Rob
  • 14,746
  • 28
  • 47
  • 65
NiklasMH
  • 697
  • 6
  • 16

0 Answers0