Enable no-unsafe-assignments for MSSQL (#23407)

* Enable no-unsafe-assignments for MSSQL

* Remove toString
This commit is contained in:
Charles Gagnon
2023-06-18 10:01:41 -07:00
committed by GitHub
parent 1bed054668
commit cdece24123
58 changed files with 136 additions and 75 deletions

View File

@@ -107,14 +107,14 @@ export class AccountFeature implements StaticFeature {
// find account
const accountList = await azdata.accounts.getAllAccounts();
const account = accountList.find(a => a.key.accountId === request.accountId);
const account: azurecore.AzureAccount | undefined = accountList.find(a => a.key.accountId === request.accountId);
if (!account) {
console.log(`Failed to find azure account ${request.accountId} when executing token refresh`);
throw Error(localizedConstants.failedToFindAccount(request.accountId));
}
// find tenant
const tenant = account.properties.tenants.find((tenant: any) => tenant.id === request.tenantId);
const tenant = account.properties.tenants.find(tenant => tenant.id === request.tenantId);
if (!tenant) {
console.log(`Failed to find tenant ${request.tenantId} in account ${account.displayInfo.displayName} when refreshing security token`);
throw Error(localizedConstants.failedToFindTenants(request.tenantId, account.displayInfo.displayName));