Strict Null Checks, Builder Removal, Formatting (#4849)

* remove builder; more null checks

* null checks

* formatting

* wip

* fix dropdown themeing

* formatting

* formatting

* fix tests

* update what files are checked

* add code to help refresh bad nodes
This commit is contained in:
Anthony Dresser
2019-04-08 13:27:41 -07:00
committed by GitHub
parent 01784dd186
commit 22ec1d5f0a
57 changed files with 177 additions and 206 deletions

View File

@@ -9,8 +9,6 @@ import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle';
import { INavigator } from 'vs/base/common/iterator';
import * as _ from './tree';
import { Event, Emitter, EventMultiplexer, Relay } from 'vs/base/common/event';
// {{SQL CARBON EDIT}}
import { TreeNode } from 'sql/parts/objectExplorer/common/treeNode';
interface IMap<T> { [id: string]: T; }
interface IItemMap extends IMap<Item> { }
@@ -374,14 +372,7 @@ export class Item {
return result.then(() => {
this._setExpanded(true);
this._onDidExpand.fire(eventData);
// {{SQL CARBON EDIT}} - Original code does not handle the need to refresh children in case previous refreshchildren errored out.
if ((this.element instanceof TreeNode) && (this.element.errorStateMessage)) {
this.needsChildrenRefresh = true;
return false;
} // We may need special handling for other types of this.element apart from TreeNode as well.
else {
return true;
}
return true;
});
});

View File

@@ -1527,7 +1527,7 @@ export class TreeView extends HeightMap {
this.onDragEnd(e);
} else {
// {{SQL CARBON EDIT}}
this.context.dnd.dropAbort(this.context.tree, this.currentDragAndDropData);
this.context.dnd!.dropAbort(this.context.tree, this.currentDragAndDropData!);
}
this.cancelDragAndDropScrollInterval();
}
@@ -1538,7 +1538,7 @@ export class TreeView extends HeightMap {
this.currentDropTargets = [];
} else {
// {{SQL CARBON EDIT}}
this.context.dnd.dropAbort(this.context.tree, this.currentDragAndDropData);
this.context.dnd!.dropAbort(this.context.tree, this.currentDragAndDropData!);
}
this.currentDropDisposable.dispose();