mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-14 12:30:47 +08:00
add convenience overload to getDOMNode
This commit is contained in:
1 parent
fa6e45ea4c
commit
64dcdb9702
1 file changed
+5
Vendored
+5
@@ -117,6 +117,11 @@ declare module React {
|
||||
|
||||
export interface DomReferencer {
|
||||
getDOMNode(): Element;
|
||||
/**
|
||||
* Use this overload to cast the returned element to a more specific type.
|
||||
* Eg: var name = this.refs['name'].getDOMNode<HTMLInputElement>().value
|
||||
*/
|
||||
getDOMNode<TElement extends Element>(): TElement;
|
||||
}
|
||||
|
||||
export interface Component<P, S> extends DomReferencer {
|
||||
|
||||
Reference in new issue
Block a user