lib/repository/tree-repository.ts
Function extendTreeRepository
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function extendTreeRepository<Entity extends IBaseTreeEntity>(repository: Repository<Entity>) {
const repo = repository.extend({
async findTrees(options?: FindTreeOptions) {
const roots = await this.findRoots(options)
const trees = await Promise.all(roots.map((root) => this.findDescendantsTree(root, options)))