Browse Source

Pull request #1727: 无JIRA任务 修改类型描述

Merge in VISUAL/fineui from ~YOUKI/fineui:master to master

* commit '3ebc3451fe261808ac01f295462658b957cafa75':
  无JIRA任务 refactor: 修改类型描述
es6
Youki 4 years ago
parent
commit
2949a33fb6
  1. 10
      typescript/core/utils/tree.ts

10
typescript/core/utils/tree.ts

@ -14,7 +14,7 @@ export declare class Node {
setParent(parent: Node): void;
getParent(): Node;
getChild(index: number): Node;
getChildIndex(id: any): Node;
getChildIndex(id: any): number;
removeChild(id: any): void;
removeChildByIndex(index: number): void;
removeAllChilds(): void;
@ -31,9 +31,9 @@ export declare class Tree {
getRoot(): Node;
clear():void;
initTree(nodes: any[]):void;
toJSON(node: Node): object[];
toJSONWithNode(node: Node): object[];
search(root: Node, target: any, param?: any): boolean;
toJSON<T>(node?: Node): T[];
toJSONWithNode<T>(node: Node): T[];
search(root: Node, target?: any, param?: any): Node;
traverse(callback: Function): void;
recursion(callback: Function): void;
inOrderTraverse(callback: Function): void;
@ -44,7 +44,7 @@ export declare class Tree {
nrPostOrderTraverse(callback: Function): void;
static transformToArrayFormat(nodes: Node | Node[], pId: any): Node[];
static arrayFormat(nodes: Node | Node[], pId: any): Node[];
static transformToTreeFormat(sNodes: Node | Node[]): Node[];
static transformToTreeFormat<T>(sNodes: T[]): Node[];
static treeFormat(sNodes: Node | Node[]): Node[];
static traversal(array: Node[], callback: Function, pNode: Node): void;
}
Loading…
Cancel
Save