From 64dcdb97023ca6571b825e5c4ffe30059983e113 Mon Sep 17 00:00:00 2001 From: Steve Baker <_steve_@outlook.com> Date: Thu, 13 Nov 2014 20:05:32 +0100 Subject: [PATCH] add convenience overload to getDOMNode --- react/react.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/react/react.d.ts b/react/react.d.ts index 32249bd347..f7e5f5387c 100644 --- a/react/react.d.ts +++ b/react/react.d.ts @@ -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().value + */ + getDOMNode(): TElement; } export interface Component extends DomReferencer {