@farris/devkit-vue
Version:
57 lines (56 loc) • 1.11 kB
TypeScript
import { EntityPathNode } from './entity-path-node';
/**
* 实体路径
*/
declare class EntityPath {
/**
* 路径节点集合
*/
private nodes;
/**
* 构造函数
*/
constructor();
/**
* 获取路径节点
*/
getNodes(): EntityPathNode[];
/**
* 获取第一个节点
*/
getFirstNode(): EntityPathNode;
/**
* 获取最后一个节点
*/
getLastNode(): EntityPathNode;
/**
* 获取父实体路径
*/
getParentEntityPath(): EntityPath;
/**
* 添加节点
*/
appendNode(node: EntityPathNode): void;
/**
* 是否和当前路径相等
*/
isSame(entityPath: EntityPath): boolean;
/**
* 是否为当前路径的祖先路径
*/
isAncestor(ancestorPath: EntityPath): boolean;
/**
* 是否为当前路径的父路径
*/
isParent(parentPath: EntityPath): boolean;
/**
* 克隆路径
*/
clone(): EntityPath;
/**
* 转换为短路径
* @returns
*/
toShortPath(): string;
}
export { EntityPath };