From 74ed93e6124b402e3739a02d8ab4f668ec6503fb Mon Sep 17 00:00:00 2001 From: Rahul-Sagore Date: Thu, 4 Apr 2019 00:41:39 +0530 Subject: [PATCH 1/3] Update inputRef type: handle for createRef --- types/react-textarea-autosize/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-textarea-autosize/index.d.ts b/types/react-textarea-autosize/index.d.ts index 90fa858dfb..9001fa18b1 100644 --- a/types/react-textarea-autosize/index.d.ts +++ b/types/react-textarea-autosize/index.d.ts @@ -49,7 +49,7 @@ declare module "react-textarea-autosize" { /** * Allows an owner to retrieve the DOM node. */ - inputRef?: (node: HTMLTextAreaElement) => void; + inputRef?: ((node: HTMLTextAreaElement) => void) | RefObject; } /** From f3a77e4b4e446d05b592f684923deb7e0880f31c Mon Sep 17 00:00:00 2001 From: Rahul-Sagore Date: Thu, 4 Apr 2019 11:08:55 +0530 Subject: [PATCH 2/3] Fix RefObject is not defined error --- types/react-textarea-autosize/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-textarea-autosize/index.d.ts b/types/react-textarea-autosize/index.d.ts index 9001fa18b1..1ca112d9c1 100644 --- a/types/react-textarea-autosize/index.d.ts +++ b/types/react-textarea-autosize/index.d.ts @@ -49,7 +49,7 @@ declare module "react-textarea-autosize" { /** * Allows an owner to retrieve the DOM node. */ - inputRef?: ((node: HTMLTextAreaElement) => void) | RefObject; + inputRef?: ((node: HTMLTextAreaElement) => void) | React.RefObject; } /** From 3249f0f900f52dea1e5aec7b33344a9e207bf838 Mon Sep 17 00:00:00 2001 From: Rahul-Sagore Date: Thu, 4 Apr 2019 12:43:56 +0530 Subject: [PATCH 3/3] Update Definitions by section --- types/react-textarea-autosize/index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/types/react-textarea-autosize/index.d.ts b/types/react-textarea-autosize/index.d.ts index 1ca112d9c1..cf03a7a26a 100644 --- a/types/react-textarea-autosize/index.d.ts +++ b/types/react-textarea-autosize/index.d.ts @@ -1,6 +1,8 @@ // Type definitions for react-textarea-autosize 4.3.0 // Project: https://github.com/andreypopp/react-textarea-autosize -// Definitions by: Alexey Svetliakov , Jerry Zou +// Definitions by: Alexey Svetliakov , +// Jerry Zou +// Rahul Sagore // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8