mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
htmltojsx
This commit is contained in:
7
htmltojsx/htmltojsx-tests.ts
Normal file
7
htmltojsx/htmltojsx-tests.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
/// <reference path="htmltojsx.d.ts"/>
|
||||
import HTMLtoJSX = require("htmltojsx");
|
||||
var converter = new HTMLtoJSX({
|
||||
createClass: true,
|
||||
outputClassName: 'AwesomeComponent'
|
||||
});
|
||||
var output = converter.convert('<div>Hello world!</div>');
|
||||
15
htmltojsx/htmltojsx.d.ts
vendored
Normal file
15
htmltojsx/htmltojsx.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
// Type definitions for htmltojsx
|
||||
// Project: https://www.npmjs.com/package/htmltojsx
|
||||
// Definitions by: Basarat Ali Syed <https://github.com/basarat>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module 'htmltojsx' {
|
||||
class HTMLtoJSX {
|
||||
constructor(options?: {
|
||||
createClass?: boolean;
|
||||
outputClassName?: string;
|
||||
});
|
||||
convert(html: string): string;
|
||||
}
|
||||
export = HTMLtoJSX;
|
||||
}
|
||||
Reference in New Issue
Block a user