Even more strictness (#11879)

* add more to strict nulls

* maintain error handling properly

* fix lint

* the rest of workbench/services

* fix compile
This commit is contained in:
Anthony Dresser
2020-08-20 14:00:26 -07:00
committed by GitHub
parent ca2b893c2c
commit adfdd56907
23 changed files with 260 additions and 302 deletions

View File

@@ -43,7 +43,7 @@ export class ConnectionContextKey implements IContextKey<IConnectionProfile> {
this._providerKey.set(value && value.providerName);
this._serverKey.set(value && value.serverName);
this._databaseKey.set(value && value.databaseName);
this._isQueryProviderKey.set(value && value.providerName && queryProviders.indexOf(value.providerName) !== -1);
this._isQueryProviderKey.set(!!value && !!value.providerName && queryProviders.indexOf(value.providerName) !== -1);
}
private setCanOpenInPortal(connectionProfile: IConnectionProfile): void {
@@ -64,7 +64,7 @@ export class ConnectionContextKey implements IContextKey<IConnectionProfile> {
this._canOpenInAzurePortal.reset();
}
public get(): IConnectionProfile {
public get(): IConnectionProfile | undefined {
return this._connectionKey.get();
}
}