[AAE-622] No implicit returns (#5157)

* enable noImplicitReturns rule

* type fixes

* fix return types

* fix return value

* fix tests

* fix visibility service

* update tests

* add missing types

* fix test
This commit is contained in:
Denys Vuika
2019-10-17 09:35:39 +01:00
committed by GitHub
parent 48aca2d30f
commit d7ab0417b8
65 changed files with 366 additions and 319 deletions

View File

@@ -260,10 +260,11 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
return rows.map((row) => new ObjectDataRow(row, row.isSelected));
}
convertToDataSorting(sorting: any[]): DataSorting {
convertToDataSorting(sorting: any[]): DataSorting | null {
if (sorting && sorting.length > 0) {
return new DataSorting(sorting[0], sorting[1]);
}
return null;
}
private initAndSubscribeClickStream() {
@@ -362,7 +363,7 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
}
}
private setTableSorting(sorting) {
private setTableSorting(sorting: any[]) {
if (this.data) {
this.data.setSorting(this.convertToDataSorting(sorting));
}
@@ -610,10 +611,12 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck,
return `${row.cssClass} ${this.rowStyleClass}`;
}
getSortingKey(): string {
getSortingKey(): string | null {
if (this.data.getSorting()) {
return this.data.getSorting().key;
}
return null;
}
selectRow(row: DataRow, value: boolean) {