mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-26 12:10:44 +08:00
allow calling component or element functions no arguments
This commit is contained in:
1 parent
8d80986549
commit
fa6e45ea4c
2 files changed
+4
-4
No files matched your search
@@ -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