mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
Strict Null Checks on platform/accounts (#6735)
* add some patches for strict null * renable strict null checks * wip * finish adding account to strict nulls * fix backup component * wip * fix tests
This commit is contained in:
@@ -15,6 +15,6 @@ export interface IAccountPickerService {
|
||||
addAccountCompleteEvent: Event<void>;
|
||||
addAccountErrorEvent: Event<string>;
|
||||
addAccountStartEvent: Event<void>;
|
||||
onAccountSelectionChangeEvent: Event<azdata.Account>;
|
||||
selectedAccount: azdata.Account;
|
||||
onAccountSelectionChangeEvent: Event<azdata.Account | undefined>;
|
||||
selectedAccount: azdata.Account | undefined;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export class AccountPickerViewModel {
|
||||
private _updateAccountListEmitter: Emitter<UpdateAccountListEventParams>;
|
||||
public get updateAccountListEvent(): Event<UpdateAccountListEventParams> { return this._updateAccountListEmitter.event; }
|
||||
|
||||
public selectedAccount: azdata.Account;
|
||||
public selectedAccount: azdata.Account | undefined;
|
||||
|
||||
constructor(
|
||||
private _providerId: string,
|
||||
|
||||
@@ -89,7 +89,7 @@ export default class AccountStore implements IAccountStore {
|
||||
activeOperation = activeOperation.then(op);
|
||||
|
||||
// Add a catch at the end to make sure we can continue after any errors
|
||||
activeOperation = activeOperation.then(null, (err) => {
|
||||
activeOperation = activeOperation.then(undefined, (err) => {
|
||||
// TODO: Log the error
|
||||
});
|
||||
|
||||
@@ -107,7 +107,7 @@ export default class AccountStore implements IAccountStore {
|
||||
accountAdded: false,
|
||||
accountModified: false,
|
||||
accountRemoved: false,
|
||||
changedAccount: null,
|
||||
changedAccount: undefined,
|
||||
updatedAccounts: accounts
|
||||
};
|
||||
}
|
||||
@@ -135,7 +135,7 @@ export default class AccountStore implements IAccountStore {
|
||||
accountAdded: false,
|
||||
accountModified: false,
|
||||
accountRemoved: match >= 0,
|
||||
changedAccount: null,
|
||||
changedAccount: undefined,
|
||||
updatedAccounts: accounts
|
||||
};
|
||||
}
|
||||
@@ -149,7 +149,7 @@ export default class AccountStore implements IAccountStore {
|
||||
accountAdded: false,
|
||||
accountModified: false,
|
||||
accountRemoved: false,
|
||||
changedAccount: null,
|
||||
changedAccount: undefined,
|
||||
updatedAccounts: accounts
|
||||
};
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface AccountAdditionResult {
|
||||
/**
|
||||
* The account that was added/updated (with any updates applied)
|
||||
*/
|
||||
changedAccount: azdata.Account;
|
||||
changedAccount: azdata.Account | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as azdata from 'azdata';
|
||||
*/
|
||||
export class FirewallRuleViewModel {
|
||||
public isIPAddressSelected: boolean;
|
||||
public selectedAccount: azdata.Account;
|
||||
public selectedAccount: azdata.Account | undefined;
|
||||
|
||||
private _defaultIPAddress: string;
|
||||
private _defaultFromSubnetIPRange: string;
|
||||
|
||||
Reference in New Issue
Block a user