fix: used flat export like module

This commit is contained in:
Adrian Kremer
2019-04-10 17:40:38 +02:00
parent 61d65d0400
commit a82c20628b
3 changed files with 18 additions and 9 deletions
+11 -9
View File
@@ -1,20 +1,22 @@
// Type definitions for rehype-react 2.0
// Type definitions for rehype-react 3.1
// Project: https://github.com/rhysd/rehype-react
// Definitions by: Adrian Kremer <https://github.com/adriankremer>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import React from "react";
import * as React from "react";
export interface Options {
createElement: typeof React.createElement,
interface Options {
createElement: typeof React.createElement;
components: {
[tagName: string]: React.ComponentType<any>
},
prefix?: string
[tagName: string]: React.ComponentType<any>;
};
prefix?: string;
}
export default class RehypeReact {
declare class RehypeReact {
constructor(options: Options)
Compiler: (node: any) => any
Compiler: (node: any) => any;
}
export = RehypeReact;
+6
View File
@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"rehype-react": "^3.1.0"
}
}
+1
View File
@@ -5,6 +5,7 @@
"es6",
"dom"
],
"target": "es6",
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,