Add no implicit any to the strict null check (#5635)

* wip

* working through adding no implicit any
This commit is contained in:
Anthony Dresser
2019-06-04 09:29:40 -07:00
committed by GitHub
parent 50242b2c35
commit 4ad226570a
26 changed files with 296 additions and 306 deletions

View File

@@ -134,7 +134,10 @@ export class AlertsViewComponent extends JobManagementView implements OnInit, On
let rowDetail = new RowDetailView({
cssClass: '_detail_selector',
useRowClick: false,
panelRows: 1
panelRows: 1,
postTemplate: () => '', // I'm assuming these code paths are just never hit...
preTemplate: () => '',
process: () => { }
});
columns.unshift(rowDetail.getColumnDefinition());
jQuery(this._gridEl.nativeElement).empty();

View File

@@ -37,6 +37,11 @@ export const JOBSVIEW_SELECTOR: string = 'jobsview-component';
export const ROW_HEIGHT: number = 45;
export const ACTIONBAR_PADDING: number = 10;
interface IItem extends Slick.SlickData {
jobId?: string;
id: string;
}
@Component({
selector: JOBSVIEW_SELECTOR,
templateUrl: decodeURI(require.toUrl('./jobsView.component.html')),
@@ -71,7 +76,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
];
private _jobCacheObject: JobCacheObject;
private rowDetail: RowDetailView;
private rowDetail: RowDetailView<IItem>;
private filterPlugin: any;
private dataView: any;
private _isCloud: boolean;
@@ -161,7 +166,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
this.dataView = new Slick.Data.DataView({ inlineFilters: false });
let rowDetail = new RowDetailView({
let rowDetail = new RowDetailView<IItem>({
cssClass: '_detail_selector',
process: (job) => {
(<any>rowDetail).onAsyncResponse.notify({
@@ -169,11 +174,13 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
}, undefined, this);
},
useRowClick: false,
panelRows: 1
panelRows: 1,
postTemplate: () => '', // I'm assuming these code paths are just never hit...
preTemplate: () => '',
});
this.rowDetail = rowDetail;
columns.unshift(this.rowDetail.getColumnDefinition());
let filterPlugin = new HeaderFilter({});
let filterPlugin = new HeaderFilter<{ inlineFilters: false }>();
this._register(attachButtonStyler(filterPlugin, this._themeService));
this.filterPlugin = filterPlugin;
jQuery(this._gridEl.nativeElement).empty();
@@ -337,7 +344,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
this.filterPlugin.onCommand.subscribe((e, args: any) => {
this.columnSort(args.column.name, args.command === 'sort-asc');
});
this._table.registerPlugin(<HeaderFilter>this.filterPlugin);
this._table.registerPlugin(this.filterPlugin);
this.dataView.beginUpdate();
this.dataView.setItems(jobViews);
@@ -900,7 +907,7 @@ export class JobsViewComponent extends JobManagementView implements OnInit, OnDe
}
protected getCurrentTableObject(rowIndex: number): JobActionContext {
let data = this._table.grid.getData();
let data = this._table.grid.getData() as Slick.DataProvider<IItem>;
if (!data || rowIndex >= data.getLength()) {
return undefined;
}

View File

@@ -134,7 +134,10 @@ export class OperatorsViewComponent extends JobManagementView implements OnInit,
let rowDetail = new RowDetailView({
cssClass: '_detail_selector',
useRowClick: false,
panelRows: 1
panelRows: 1,
postTemplate: () => '', // I'm assuming these code paths are just never hit...
preTemplate: () => '',
process: () => { }
});
columns.unshift(rowDetail.getColumnDefinition());

View File

@@ -137,7 +137,10 @@ export class ProxiesViewComponent extends JobManagementView implements OnInit, O
let rowDetail = new RowDetailView({
cssClass: '_detail_selector',
useRowClick: false,
panelRows: 1
panelRows: 1,
postTemplate: () => '', // I'm assuming these code paths are just never hit...
preTemplate: () => '',
process: () => { }
});
columns.unshift(rowDetail.getColumnDefinition());

View File

@@ -423,7 +423,7 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe
// Check extensions to create ActionItem; otherwise, return undefined
// This is similar behavior that exists in MenuItemActionItem
if (action instanceof MenuItemAction) {
return new LabeledMenuItemActionItem(action, this.keybindingService, this.notificationService, this.contextMenuService, 'notebook-button');
return new LabeledMenuItemActionItem(action, this.keybindingService, this.contextMenuService, this.notificationService, 'notebook-button');
}
return undefined;
}