Merge pull request #34452 from Rahul-Sagore/update-react-textarea-autosize

Update inputRef type: handling createRef
This commit is contained in:
Benjamin Lichtman
2019-04-11 15:12:16 -07:00
committed by GitHub
+4 -2
View File
@@ -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 <https://github.com/asvetliakov>, Jerry Zou <https://github.com/zry656565>
// Definitions by: Alexey Svetliakov <https://github.com/asvetliakov>,
// Jerry Zou <https://github.com/zry656565>
// Rahul Sagore <https://github.com/Rahul-Sagore>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -49,7 +51,7 @@ declare module "react-textarea-autosize" {
/**
* Allows an owner to retrieve the DOM node.
*/
inputRef?: (node: HTMLTextAreaElement) => void;
inputRef?: ((node: HTMLTextAreaElement) => void) | React.RefObject<HTMLTextAreaElement>;
}
/**