Strict null pass on some base ui files (#4832)

* more strict null checks in base browser code

* revert changes to radiobutton

* fix some more minor things, enable strict null check in pipelines

* formatting

* fix compile errors

* make null undefined

* more null to undefined
This commit is contained in:
Anthony Dresser
2019-04-03 16:18:33 -07:00
committed by GitHub
parent 80a8e1a4da
commit cef5bbb2be
25 changed files with 253 additions and 234 deletions

View File

@@ -16,7 +16,7 @@ export interface IObservableCollection<T> {
}
class DataWindow<T> {
private _data: T[];
private _data: T[] | undefined;
private _length: number = 0;
private _offsetFromDataSource: number = -1;
@@ -30,9 +30,6 @@ class DataWindow<T> {
dispose() {
this._data = undefined;
this.loadFunction = undefined;
this.placeholderItemGenerator = undefined;
this.loadCompleteCallback = undefined;
this.cancellationToken.cancel();
}
@@ -157,7 +154,7 @@ export class VirtualizedCollection<T extends Slick.SlickData> implements IObserv
}
private getRangeFromCurrent(start: number, end: number): T[] {
let currentData = [];
const currentData: Array<T> = [];
for (let i = 0; i < end - start; i++) {
currentData.push(this.getDataFromCurrent(start + i));
}