diff --git a/htmltojsx/htmltojsx-tests.ts b/htmltojsx/htmltojsx-tests.ts new file mode 100644 index 0000000000..052ae8baa4 --- /dev/null +++ b/htmltojsx/htmltojsx-tests.ts @@ -0,0 +1,7 @@ +/// +import HTMLtoJSX = require("htmltojsx"); +var converter = new HTMLtoJSX({ + createClass: true, + outputClassName: 'AwesomeComponent' +}); +var output = converter.convert('
Hello world!
'); diff --git a/htmltojsx/htmltojsx.d.ts b/htmltojsx/htmltojsx.d.ts new file mode 100644 index 0000000000..06040a67c2 --- /dev/null +++ b/htmltojsx/htmltojsx.d.ts @@ -0,0 +1,15 @@ +// Type definitions for htmltojsx +// Project: https://www.npmjs.com/package/htmltojsx +// Definitions by: Basarat Ali Syed +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +declare module 'htmltojsx' { + class HTMLtoJSX { + constructor(options?: { + createClass?: boolean; + outputClassName?: string; + }); + convert(html: string): string; + } + export = HTMLtoJSX; +}