Improve quality of Typescript types (#10742)
This commit is contained in:
parent
542bf68c63
commit
a4f0b80692
30 changed files with 74 additions and 75 deletions
|
@ -67,9 +67,9 @@ const enum LoginField {
|
|||
* The email/username/phone fields are fully-controlled, the password field is not.
|
||||
*/
|
||||
export default class PasswordLogin extends React.PureComponent<IProps, IState> {
|
||||
private [LoginField.Email]: Field | null;
|
||||
private [LoginField.Phone]: Field | null;
|
||||
private [LoginField.MatrixId]: Field | null;
|
||||
private [LoginField.Email]: Field | null = null;
|
||||
private [LoginField.Phone]: Field | null = null;
|
||||
private [LoginField.MatrixId]: Field | null = null;
|
||||
|
||||
public static defaultProps = {
|
||||
onUsernameChanged: function () {},
|
||||
|
|
|
@ -95,11 +95,11 @@ interface IState {
|
|||
* A pure UI component which displays a registration form.
|
||||
*/
|
||||
export default class RegistrationForm extends React.PureComponent<IProps, IState> {
|
||||
private [RegistrationField.Email]: Field | null;
|
||||
private [RegistrationField.Password]: Field | null;
|
||||
private [RegistrationField.PasswordConfirm]: Field | null;
|
||||
private [RegistrationField.Username]: Field | null;
|
||||
private [RegistrationField.PhoneNumber]: Field | null;
|
||||
private [RegistrationField.Email]: Field | null = null;
|
||||
private [RegistrationField.Password]: Field | null = null;
|
||||
private [RegistrationField.PasswordConfirm]: Field | null = null;
|
||||
private [RegistrationField.Username]: Field | null = null;
|
||||
private [RegistrationField.PhoneNumber]: Field | null = null;
|
||||
|
||||
public static defaultProps = {
|
||||
onValidationChange: logger.error,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue