Merge pull request #6638 from matrix-org/palid/dx/typescriptify-password-reset

Add missing types
pull/21833/head
Dariusz Niemczyk 2021-08-19 11:30:11 +02:00 committed by GitHub
commit 5a1633d53c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ export default class PasswordReset {
* @param {string} newPassword The new password for the account. * @param {string} newPassword The new password for the account.
* @return {Promise} Resolves when the email has been sent. Then call checkEmailLinkClicked(). * @return {Promise} Resolves when the email has been sent. Then call checkEmailLinkClicked().
*/ */
public resetPassword(emailAddress, newPassword): Promise<IRequestTokenResponse> { public resetPassword(emailAddress: string, newPassword: string): Promise<IRequestTokenResponse> {
this.password = newPassword; this.password = newPassword;
return this.client.requestPasswordEmailToken(emailAddress, this.clientSecret, 1).then((res) => { return this.client.requestPasswordEmailToken(emailAddress, this.clientSecret, 1).then((res) => {
this.sessionId = res.sid; this.sessionId = res.sid;