mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Reenable strict null checks (#6716)
* add some patches for strict null * renable strict null checks
This commit is contained in:
@@ -297,7 +297,7 @@ function topStep<T>(array: ReadonlyArray<T>, compare: (a: T, b: T) => number, re
|
||||
*/
|
||||
export function coalesce<T>(array: ReadonlyArray<T | undefined | null>): T[] {
|
||||
if (!array) {
|
||||
return undefined; // {{SQL CARBON EDIT}} @anthonydresser strict-null-checks
|
||||
return array as T[]; // {{SQL CARBON EDIT}} @anthonydresser strict-null-checks
|
||||
}
|
||||
return <T[]>array.filter(e => !!e);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export class ProductService implements IProductService {
|
||||
|
||||
get vscodeVersion(): string { return '1.35.0'; } // {{SQL CARBON EDIT}} add vscodeversion
|
||||
|
||||
get recommendedExtensionsByScenario(): { [area: string]: Array<string> } { return this.productConfiguration.recommendedExtensionsByScenario; }// {{SQL CARBON EDIT}} add getter
|
||||
get recommendedExtensionsByScenario(): { [area: string]: Array<string> } { return this.productConfiguration ? this.productConfiguration.recommendedExtensionsByScenario : {}; }// {{SQL CARBON EDIT}} add getter
|
||||
|
||||
get commit(): string | undefined { return this.productConfiguration ? this.productConfiguration.commit : undefined; }
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ export class AppInsightsAppender implements ITelemetryAppender {
|
||||
});
|
||||
}
|
||||
|
||||
flush(): Promise<any> | undefined {
|
||||
flush(): Promise<any> {
|
||||
if (this._aiClient) {
|
||||
return new Promise(resolve => {
|
||||
this._aiClient!.flush({
|
||||
@@ -85,6 +85,6 @@ export class AppInsightsAppender implements ITelemetryAppender {
|
||||
});
|
||||
});
|
||||
}
|
||||
return undefined;
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user