Skip to content

Commit

Permalink
Improve types.
Browse files Browse the repository at this point in the history
  • Loading branch information
twisty committed Feb 6, 2020
1 parent 054f92f commit fe7538c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Textarea extends React.Component<TextareaProps, State> {
this.blurDebounced = debounce(onSetValue, blurDebounceInterval);
}

public static getDerivedStateFromProps(props, state): any {
public static getDerivedStateFromProps(props, state): null | Partial<State> {
const {value: incomingPropValue} = props;
if (incomingPropValue !== state.incomingPropValue) {
return {
Expand All @@ -61,7 +61,7 @@ class Textarea extends React.Component<TextareaProps, State> {
return null;
}

public shouldComponentUpdate(nextProps, nextState): any {
public shouldComponentUpdate(nextProps, nextState): boolean {
const {valueIsChanging, incomingPropValue} = nextState;
if (valueIsChanging === true) {
this.setState({
Expand Down

0 comments on commit fe7538c

Please sign in to comment.