mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
allow calling component or element functions no arguments
This commit is contained in:
@@ -104,4 +104,4 @@ var Timer = React.createClass({displayName: 'Timer',
|
||||
}
|
||||
});
|
||||
|
||||
React.render(Timer(null), mountNode);
|
||||
React.render(Timer(), mountNode);
|
||||
Vendored
+3
-3
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user