allow calling component or element functions no arguments

This commit is contained in:
Steve Baker
2014-11-13 18:30:05 +01:00
parent 8d80986549
commit fa6e45ea4c
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "react" {
export = React;
export = React;
}
declare module React {
@@ -50,11 +50,11 @@ declare module React {
export interface ReactComponentFactory<P> {
(properties: P, ...children: any[]): ReactComponentElement<P>;
(properties?: P, ...children: any[]): ReactComponentElement<P>;
}
export interface ReactElementFactory<P> {
(properties: P, ...children: any[]): ReactDOMElement<P>;
(properties?: P, ...children: any[]): ReactDOMElement<P>;
}
export interface DomElement extends ReactElementFactory<DomAttributes> {