Comply with noImplicitAny (#9940)
* Stash noImplicitAny work * Stash * Fix imports * Iterate * Fix tests * Delint * Fix tests
This commit is contained in:
parent
ac7f69216e
commit
61a63e47f4
359 changed files with 1621 additions and 1353 deletions
|
@ -145,7 +145,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
|||
});
|
||||
}, VALIDATION_THROTTLE_MS);
|
||||
|
||||
public constructor(props) {
|
||||
public constructor(props: PropShapes) {
|
||||
super(props);
|
||||
this.state = {
|
||||
valid: undefined,
|
||||
|
@ -165,7 +165,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
|||
});
|
||||
}
|
||||
|
||||
private onFocus = (ev): void => {
|
||||
private onFocus = (ev: React.FocusEvent<any>): void => {
|
||||
this.setState({
|
||||
focused: true,
|
||||
});
|
||||
|
@ -175,22 +175,18 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
|||
});
|
||||
}
|
||||
// Parent component may have supplied its own `onFocus` as well
|
||||
if (this.props.onFocus) {
|
||||
this.props.onFocus(ev);
|
||||
}
|
||||
this.props.onFocus?.(ev);
|
||||
};
|
||||
|
||||
private onChange = (ev): void => {
|
||||
private onChange = (ev: React.ChangeEvent<any>): void => {
|
||||
if (this.props.validateOnChange) {
|
||||
this.validateOnChange();
|
||||
}
|
||||
// Parent component may have supplied its own `onChange` as well
|
||||
if (this.props.onChange) {
|
||||
this.props.onChange(ev);
|
||||
}
|
||||
this.props.onChange?.(ev);
|
||||
};
|
||||
|
||||
private onBlur = (ev): void => {
|
||||
private onBlur = (ev: React.FocusEvent<any>): void => {
|
||||
this.setState({
|
||||
focused: false,
|
||||
});
|
||||
|
@ -200,9 +196,7 @@ export default class Field extends React.PureComponent<PropShapes, IState> {
|
|||
});
|
||||
}
|
||||
// Parent component may have supplied its own `onBlur` as well
|
||||
if (this.props.onBlur) {
|
||||
this.props.onBlur(ev);
|
||||
}
|
||||
this.props.onBlur?.(ev);
|
||||
};
|
||||
|
||||
public async validate({ focused, allowEmpty = true }: IValidateOpts): Promise<boolean> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue