提交 b7808ec3 编写于 作者: J Joao Moreno

tree: more type cleanup

上级 84501959
......@@ -296,7 +296,7 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
return this.model.getFirstElementChild(location);
}
getLastElementAncestor(location: TRef): T | undefined {
getLastElementAncestor(location?: TRef): T | undefined {
return this.model.getLastElementAncestor(location);
}
......
......@@ -443,7 +443,7 @@ export class IndexTreeModel<T extends Exclude<any, undefined>, TFilterData = voi
return node.children[0].element;
}
getLastElementAncestor(location: number[]): T | undefined {
getLastElementAncestor(location: number[] = []): T | undefined {
const node = this.getTreeNode(location);
if (node.children.length === 0) {
......
......@@ -96,7 +96,7 @@ export interface ITreeModel<T, TFilterData, TRef> {
getParentElement(location: TRef): T;
getFirstElementChild(location: TRef): T | undefined;
getLastElementAncestor(location: TRef): T | undefined;
getLastElementAncestor(location?: TRef): T | undefined;
isCollapsed(location: TRef): boolean;
setCollapsed(location: TRef, collapsed: boolean): boolean;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册