diff --git a/types/react-faux-dom/index.d.ts b/types/react-faux-dom/index.d.ts index 0a363de3f0..c0f1bae645 100644 --- a/types/react-faux-dom/index.d.ts +++ b/types/react-faux-dom/index.d.ts @@ -28,3 +28,10 @@ export function createElement(nodeName: string): Element; export function createElementNS(namespace: string, nodeName: string): Element; export function compareDocumentPosition(): number; + +export interface IReactFauxDomProps { + connectFauxDOM?(node: string, name: string, discardNode?: any): Element; + animateFauxDOM?(duration: number): void; +} + +export function withFauxDOM
(WrappedComponent: any): React.ClassicComponentClass
;
\ No newline at end of file
diff --git a/types/react-faux-dom/react-faux-dom-tests.tsx b/types/react-faux-dom/react-faux-dom-tests.tsx
index 0410306f6b..bad1bccc03 100644
--- a/types/react-faux-dom/react-faux-dom-tests.tsx
+++ b/types/react-faux-dom/react-faux-dom-tests.tsx
@@ -1,6 +1,6 @@
import * as React from 'react';
import * as d3 from 'd3';
-import { createElement, Element } from 'react-faux-dom';
+import { createElement, Element, IReactFauxDomProps, withFauxDOM } from 'react-faux-dom';
class SomeChart extends React.Component {
render() {
@@ -21,3 +21,30 @@ class SomeChart extends React.Component {
return el.toReact();
}
}
+
+interface ChartProps extends IReactFauxDomProps {
+ chart?: any;
+}
+
+class MyReactComponent extends React.ComponentHere is some fancy data:
+