Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)

* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998

* fix pipelines

* fix strict-null-checks

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-21 22:12:22 -07:00
committed by GitHub
parent 7c9be74970
commit 1e22f47304
913 changed files with 18898 additions and 16536 deletions

View File

@@ -21,6 +21,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { IStorageService } from 'vs/platform/storage/common/storage';
import { AsyncDataTree } from 'vs/base/browser/ui/tree/asyncDataTree';
import { AbstractTree } from 'vs/base/browser/ui/tree/abstractTree';
import { assertIsDefined } from 'vs/base/common/types';
export abstract class Viewlet extends Composite implements IViewlet {
@@ -34,8 +35,8 @@ export abstract class Viewlet extends Composite implements IViewlet {
super(id, telemetryService, themeService, storageService);
}
getOptimalWidth(): number | null {
return null;
getOptimalWidth(): number | undefined {
return undefined;
}
getContextMenuActions(): IAction[] {
@@ -76,7 +77,7 @@ export const Extensions = {
};
export class ViewletRegistry extends CompositeRegistry<Viewlet> {
private defaultViewletId!: string;
private defaultViewletId: string | undefined;
/**
* Registers a viewlet to the platform.
@@ -120,7 +121,7 @@ export class ViewletRegistry extends CompositeRegistry<Viewlet> {
* Gets the id of the viewlet that should open on startup by default.
*/
getDefaultViewletId(): string {
return this.defaultViewletId;
return assertIsDefined(this.defaultViewletId);
}
}
@@ -166,8 +167,9 @@ export class ShowViewletAction extends Action {
private sidebarHasFocus(): boolean {
const activeViewlet = this.viewletService.getActiveViewlet();
const activeElement = document.activeElement;
const sidebarPart = this.layoutService.getContainer(Parts.SIDEBAR_PART);
return !!(activeViewlet && activeElement && DOM.isAncestor(activeElement, this.layoutService.getContainer(Parts.SIDEBAR_PART)));
return !!(activeViewlet && activeElement && sidebarPart && DOM.isAncestor(activeElement, sidebarPart));
}
}