Conform more of the codebase to strictNullChecks
(#10731)
This commit is contained in:
parent
9f8113eabd
commit
1281c0746b
40 changed files with 147 additions and 119 deletions
|
@ -15,7 +15,7 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import { MatrixClient } from "matrix-js-sdk/src/matrix";
|
||||
import { IAuthData } from "matrix-js-sdk/src/interactive-auth";
|
||||
import { IAuthDict, IAuthData } from "matrix-js-sdk/src/interactive-auth";
|
||||
|
||||
import { _t } from "../../../../languageHandler";
|
||||
import Modal from "../../../../Modal";
|
||||
|
@ -25,8 +25,8 @@ import InteractiveAuthDialog from "../../dialogs/InteractiveAuthDialog";
|
|||
|
||||
const makeDeleteRequest =
|
||||
(matrixClient: MatrixClient, deviceIds: string[]) =>
|
||||
async (auth?: IAuthData): Promise<IAuthData> => {
|
||||
return matrixClient.deleteMultipleDevices(deviceIds, auth);
|
||||
async (auth: IAuthDict | null): Promise<IAuthData> => {
|
||||
return matrixClient.deleteMultipleDevices(deviceIds, auth ?? undefined);
|
||||
};
|
||||
|
||||
export const deleteDevicesWithInteractiveAuth = async (
|
||||
|
@ -38,7 +38,7 @@ export const deleteDevicesWithInteractiveAuth = async (
|
|||
return;
|
||||
}
|
||||
try {
|
||||
await makeDeleteRequest(matrixClient, deviceIds)();
|
||||
await makeDeleteRequest(matrixClient, deviceIds)(null);
|
||||
// no interactive auth needed
|
||||
onFinished(true, undefined);
|
||||
} catch (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue