From fe7538c5ad4a7d3df03e8410a5e79a45a5b6d475 Mon Sep 17 00:00:00 2001 From: Tim Brayshaw Date: Thu, 6 Feb 2020 10:45:42 +0000 Subject: [PATCH] Improve types. --- src/components/textarea.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/textarea.tsx b/src/components/textarea.tsx index e100b41..e3792f9 100644 --- a/src/components/textarea.tsx +++ b/src/components/textarea.tsx @@ -50,7 +50,7 @@ class Textarea extends React.Component { this.blurDebounced = debounce(onSetValue, blurDebounceInterval); } - public static getDerivedStateFromProps(props, state): any { + public static getDerivedStateFromProps(props, state): null | Partial { const {value: incomingPropValue} = props; if (incomingPropValue !== state.incomingPropValue) { return { @@ -61,7 +61,7 @@ class Textarea extends React.Component { return null; } - public shouldComponentUpdate(nextProps, nextState): any { + public shouldComponentUpdate(nextProps, nextState): boolean { const {valueIsChanging, incomingPropValue} = nextState; if (valueIsChanging === true) { this.setState({