Fix a bunch of strict issues (#11857)

* fix a bunch of strict issues

* fix tests

* fix tests
This commit is contained in:
Anthony Dresser
2020-08-19 10:37:30 -07:00
committed by GitHub
parent e90341b3d2
commit 60c62c0668
20 changed files with 100 additions and 79 deletions

View File

@@ -107,7 +107,7 @@ export class PanelComponent extends Disposable implements IThemable {
private _actionbar?: ActionBar;
private _mru: TabComponent[] = [];
private _tabExpanded: boolean = true;
private _styleElement: HTMLStyleElement;
private _styleElement!: HTMLStyleElement;
protected AutoScrollbarVisibility = ScrollbarVisibility.Auto; // used by angular template
protected HiddenScrollbarVisibility = ScrollbarVisibility.Hidden; // used by angular template
@@ -266,7 +266,7 @@ export class PanelComponent extends Disposable implements IThemable {
public updateTab(tabId: string, config: { title?: string, iconClass?: string }): void {
// First find the tab and update it with the new values. Then manually refresh the
// tab header since it won't detect changes made to the corresponding tab by itself.
let tabHeader: TabHeaderComponent;
let tabHeader: TabHeaderComponent | undefined;
const tabHeaders = this._tabHeaders.toArray();
const tab = this._tabs.find((item, i) => {
if (item.identifier === tabId) {

View File

@@ -25,7 +25,7 @@ export type TabType = 'tab' | 'group-header';
export class TabComponent implements OnDestroy {
private _child?: TabChild;
@ContentChild(TemplateRef) templateRef!: TemplateRef<any>;
@Input() public title!: string;
@Input() public title?: string;
@Input() public canClose!: boolean;
@Input() public actions?: Array<Action>;
@Input() public iconClass?: string;