diff --git a/types/react-measure/index.d.ts b/types/react-measure/index.d.ts index 3236dc2a4c..ab7ab1b005 100644 --- a/types/react-measure/index.d.ts +++ b/types/react-measure/index.d.ts @@ -52,7 +52,7 @@ export interface MeasureProps { scroll?: boolean; bounds?: boolean; margin?: boolean; - innerRef?(ref: Element | null): void; + innerRef?: React.Ref; onResize?(contentRect: ContentRect): void; children?: React.SFC; } diff --git a/types/react-measure/react-measure-tests.tsx b/types/react-measure/react-measure-tests.tsx index 1e58ecbbbe..f1ee76c44b 100644 --- a/types/react-measure/react-measure-tests.tsx +++ b/types/react-measure/react-measure-tests.tsx @@ -107,3 +107,8 @@ const funcEl = ; const MeasuredClassComponent = withContentRect('bounds')(TestClassComponentWithProps); const classEl = ; + +function testInnerRefHook() { + const ref = React.useRef(); + return ; +} diff --git a/types/react-measure/tsconfig.json b/types/react-measure/tsconfig.json index 63aa208f05..6ee180c2f2 100644 --- a/types/react-measure/tsconfig.json +++ b/types/react-measure/tsconfig.json @@ -23,4 +23,4 @@ "index.d.ts", "react-measure-tests.tsx" ] -} \ No newline at end of file +}