Make apps/web/playwright comply with strict mode (#34403)

* Make apps/web/playwright comply with strict mode

Otherwise it sometimes fails to compile matrix-js-sdk as strict mode & noImplicitAny both impact how overloads are asserted

* Iterate
This commit is contained in:
Michael Telatynski
2026-07-30 09:07:03 +00:00
committed by GitHub
parent 4a18eac927
commit 42253a7ae5
84 changed files with 413 additions and 388 deletions
+3 -3
View File
@@ -63,7 +63,7 @@ type ExtendedMatrixClient = MatrixClient & { __playwright_recovery_key: Generate
export class Bot extends Client {
public credentials?: CredentialsOptionalAccessToken;
private handlePromise: Promise<JSHandle<ExtendedMatrixClient>>;
private handlePromise?: Promise<JSHandle<ExtendedMatrixClient>>;
constructor(
page: Page,
@@ -192,7 +192,7 @@ export class Bot extends Client {
type: "m.id.user",
user: credentials.userId,
},
password: credentials.password,
password: credentials.password ?? undefined,
});
credentials.accessToken = loginResponse.access_token;
@@ -252,7 +252,7 @@ export class Bot extends Client {
if (this.opts.bootstrapSecretStorage) {
await clientHandle.evaluate(async (cli, usePassphrase) => {
const passphrase = usePassphrase ? "new passphrase" : undefined;
const recoveryKey = await cli.getCrypto().createRecoveryKeyFromPassphrase(passphrase);
const recoveryKey = await cli.getCrypto()!.createRecoveryKeyFromPassphrase(passphrase);
Object.assign(cli, { __playwright_recovery_key: recoveryKey });
await cli.getCrypto()!.bootstrapSecretStorage({