Add more folders to strict compile (#8954)

* add more folders to strictire compile, add more strict compile options

* update ci

* remove unnecessary assertion
This commit is contained in:
Anthony Dresser
2020-01-27 16:26:49 -08:00
committed by GitHub
parent fefe1454de
commit 64929de09d
81 changed files with 630 additions and 644 deletions

View File

@@ -130,7 +130,7 @@ export class ApplyFilterAction extends Action {
export class RefreshAccountAction extends Action {
public static ID = 'account.refresh';
public static LABEL = localize('refreshAccount', "Reenter your credentials");
public account: azdata.Account;
public account?: azdata.Account;
constructor(
@IAccountManagementService private _accountManagementService: IAccountManagementService,

View File

@@ -14,9 +14,9 @@ export default class AccountStore implements IAccountStore {
public static MEMENTO_KEY: string = 'Microsoft.SqlTools.Accounts';
// MEMBER VARIABLES ////////////////////////////////////////////////////
private _activeOperation: Thenable<any>;
private _activeOperation?: Thenable<any>;
constructor(private _memento: object) { }
constructor(private _memento: { [key: string]: any }) { }
// PUBLIC METHODS //////////////////////////////////////////////////////
public addOrUpdate(newAccount: azdata.Account): Thenable<AccountAdditionResult> {

View File

@@ -12,33 +12,33 @@ export class FirewallRuleViewModel {
public isIPAddressSelected: boolean;
public selectedAccount: azdata.Account | undefined;
private _defaultIPAddress: string;
private _defaultFromSubnetIPRange: string;
private _defaultToSubnetIPRange: string;
private _fromSubnetIPRange: string;
private _toSubnetIPRange: string;
private _defaultIPAddress?: string;
private _defaultFromSubnetIPRange?: string;
private _defaultToSubnetIPRange?: string;
private _fromSubnetIPRange?: string;
private _toSubnetIPRange?: string;
constructor() {
this.isIPAddressSelected = true;
}
public get defaultIPAddress(): string {
public get defaultIPAddress(): string | undefined {
return this._defaultIPAddress;
}
public get defaultFromSubnetIPRange(): string {
public get defaultFromSubnetIPRange(): string | undefined {
return this._defaultFromSubnetIPRange;
}
public get defaultToSubnetIPRange(): string {
public get defaultToSubnetIPRange(): string | undefined {
return this._defaultToSubnetIPRange;
}
public set fromSubnetIPRange(IPAddress: string) {
public set fromSubnetIPRange(IPAddress: string | undefined) {
this._fromSubnetIPRange = IPAddress;
}
public get fromSubnetIPRange(): string {
public get fromSubnetIPRange(): string | undefined {
if (this._fromSubnetIPRange) {
return this._fromSubnetIPRange;
} else {
@@ -46,11 +46,11 @@ export class FirewallRuleViewModel {
}
}
public set toSubnetIPRange(IPAddress: string) {
public set toSubnetIPRange(IPAddress: string | undefined) {
this._toSubnetIPRange = IPAddress;
}
public get toSubnetIPRange(): string {
public get toSubnetIPRange(): string | undefined {
if (this._toSubnetIPRange) {
return this._toSubnetIPRange;
} else {

View File

@@ -11,7 +11,7 @@ import { EventVerifierSingle } from 'sql/base/test/common/event';
suite('Account Store Tests', () => {
test('AddOrUpdate - Uninitialized memento', () => {
// Setup: Create account store w/o initialized memento
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
let as = new AccountStore(memento);
// If: I add an account to the store
@@ -32,7 +32,7 @@ suite('Account Store Tests', () => {
test('AddOrUpdate - Adds to accounts', () => {
// Setup: Create account store with initialized memento with accounts
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
memento[AccountStore.MEMENTO_KEY] = [];
let as = new AccountStore(memento);
@@ -99,7 +99,7 @@ suite('Account Store Tests', () => {
test('GetAccountsByProvider - No accounts', () => {
// Setup: Create account store with initialized memento with accounts
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
memento[AccountStore.MEMENTO_KEY] = [];
let as = new AccountStore(memento);
@@ -162,7 +162,7 @@ suite('Account Store Tests', () => {
test('GetAllAccounts - No accounts', () => {
// Setup: Create account store with initialized memento with accounts
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
memento[AccountStore.MEMENTO_KEY] = [];
let as = new AccountStore(memento);
@@ -193,7 +193,7 @@ suite('Account Store Tests', () => {
test('Remove - Uninitialized menento', () => {
// Setup: Create account store w/o initialized memento
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
let as = new AccountStore(memento);
// If: I remove an account when there's an uninitialized memento
@@ -211,7 +211,7 @@ suite('Account Store Tests', () => {
test('Remove - Account does not exist', () => {
// Setup: Create account store with initialized memento with accounts
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
memento[AccountStore.MEMENTO_KEY] = [];
let as = new AccountStore(memento);
@@ -250,7 +250,7 @@ suite('Account Store Tests', () => {
test('Update - Uninitialized menento', () => {
// Setup:
// ... Create account store w/o initialized memento
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
let as = new AccountStore(memento);
// ... Create a callback that we can verify was called
@@ -274,7 +274,7 @@ suite('Account Store Tests', () => {
test('Update - Account does not exist', () => {
// Setup: Create account store with initialized memento with accounts
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
memento[AccountStore.MEMENTO_KEY] = [];
let as = new AccountStore(memento);
@@ -358,7 +358,7 @@ const account2 = <azdata.Account>{
};
function getTestMemento() {
let memento = {};
let memento: { [key: string]: azdata.Account[] } = {};
memento[AccountStore.MEMENTO_KEY] = [account1, account2];
return memento;