@farris/devkit-vue
Version:
68 lines (67 loc) • 1.59 kB
TypeScript
import { EntityNode } from './entity-node';
import { EntityPath } from './entity-path/index';
import { Entity } from './entity';
import { EntityList } from './entity-list';
import { EntityState } from './entity-state';
/**
* 实体查询
*/
declare class EntityStateQuery {
/**
* 实体类型
*/
private entityState;
/**
* 实体集合
*/
private entityList;
/**
* 构造函数
*/
constructor(entityState: EntityState<Entity>);
/**
* 获取实体数组
*/
getEntities(): Entity[];
/**
* 根据Path获取实体数组
*/
getEntitiesByPath(path: EntityPath): Entity[];
/**
* 获取实体列表
*/
getEntityList(): EntityList<Entity>;
/**
* 根据Path获取实体列表
*/
getEntityListByPath(path: EntityPath): EntityList<Entity>;
/**
* 根据ID获取根实体
*/
getEntityById(id: string): Entity | undefined;
/**
* 根据Path获取实体
*/
getEntityByPath(path: EntityPath): Entity | undefined;
/**
* 获取根当前实体
*/
getCurrentEntity(): Entity;
/**
* 根据Path获取当前实体
*/
getCurrentEntityByPath(path: EntityPath): Entity;
/**
* 根据字段名获取根实体字段值
*/
getValue(name: string): any;
/**
* 根据路径获取字段值
*/
getValueByPath(path: EntityPath): any;
/**
* 根据路径获取实体、实体集合、属性值
*/
getEntityNode(path: EntityPath): EntityNode | any;
}
export { EntityStateQuery };