(type: React.ComponentClass
| string, - props: P, children: React.ReactNode): React.ReactElement
; + createElement
(type: React.ComponentClass
| string, props: P, children: React.ReactNode): React.ReactElement
; } -interface Module { - (reactObj: ReactLikeObject): CreateElement -} +type Module = (reactObj: ReactLikeObject) => CreateElement; interface CreateElement { /** @@ -31,7 +26,7 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -
(specString: string, children: React.ReactNode): React.DOMElement
+
(specString: string, children: React.ReactNode): React.DOMElement
; /** * Renders an HTML element from the given spec string, with optional props @@ -42,8 +37,7 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -
(specString: string, props?: React.HTMLAttributes<{}>, children?: React.ReactNode): React.DOMElement
- +
(specString: string, props?: React.HTMLAttributes<{}>, children?: React.ReactNode): React.DOMElement
; /** * Renders a React component, with children but no props @@ -52,7 +46,7 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -
(component: React.ComponentClass
, children: React.ReactNode): React.ReactElement
+
(component: React.ComponentClass
, children: React.ReactNode): React.ReactElement
; /** * Renders a React component, with optional props and children @@ -62,8 +56,8 @@ interface CreateElement { * @param children A single React node (string or ReactElement) or array of nodes. * Note that unlike with React itself, multiple children must be placed into an array. */ -
(component: React.ComponentClass
, props?: P, children?: React.ReactNode): React.ReactElement
+
(component: React.ComponentClass
, props?: P, children?: React.ReactNode): React.ReactElement
;
}
-declare var exports: Module
-export = exports
+declare var exports: Module;
+export = exports;
diff --git a/types/react/index.d.ts b/types/react/index.d.ts
index 46b34637bc..29190c3c9d 100644
--- a/types/react/index.d.ts
+++ b/types/react/index.d.ts
@@ -12,7 +12,7 @@
// Tanguy Krotoff