No unused locals (#8231)

* add no unused local

* fix strict null

* fix compile errors

* update vscode comments
This commit is contained in:
Anthony Dresser
2019-11-06 17:22:05 -08:00
committed by GitHub
parent 564f78b6f6
commit df0c505452
147 changed files with 726 additions and 892 deletions

View File

@@ -6,7 +6,7 @@ import 'vs/css!./media/groupLayout';
import {
Component, Input, Inject, ChangeDetectorRef, forwardRef,
ViewChild, ElementRef, OnDestroy, AfterViewInit
ElementRef, OnDestroy, AfterViewInit
} from '@angular/core';
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/workbench/browser/modelComponents/interfaces';
@@ -39,8 +39,6 @@ export default class GroupContainer extends ContainerBase<GroupLayout> implement
private _containerLayout: GroupLayout;
@ViewChild('container', { read: ElementRef }) private _container: ElementRef;
constructor(
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef) {
@@ -83,7 +81,7 @@ export default class GroupContainer extends ContainerBase<GroupLayout> implement
return this.hasHeader() && this._containerLayout.collapsible === true;
}
private getContainerWidth(): string {
public getContainerWidth(): string {
if (this._containerLayout && this._containerLayout.width) {
let width: string = this._containerLayout.width.toString();
if (!endsWith(width, '%') && !endsWith(width.toLowerCase(), 'px')) {
@@ -95,11 +93,11 @@ export default class GroupContainer extends ContainerBase<GroupLayout> implement
}
}
private getContainerDisplayStyle(): string {
public getContainerDisplayStyle(): string {
return !this.isCollapsible() || !this.collapsed ? 'block' : 'none';
}
private getHeaderClass(): string {
public getHeaderClass(): string {
if (this.isCollapsible()) {
let modifier = this.collapsed ? 'collapsed' : 'expanded';
return `modelview-group-header-collapsible ${modifier}`;
@@ -108,7 +106,7 @@ export default class GroupContainer extends ContainerBase<GroupLayout> implement
}
}
private changeState(): void {
public changeState(): void {
if (this.isCollapsible()) {
this.collapsed = !this.collapsed;
this._changeRef.detectChanges();