# core/plugins/representation.tree.plugin.ts

> 11 lines of code and 1 definition.

Tree: GovLab Patterns
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/patterns#file-patterns-core-plugins-representation-tree-plugin-ts
Source text: https://banes-lab.com/source/patterns/core/plugins/representation.tree.plugin.ts.txt

Listed in [core/plugins](https://banes-lab.com/api/source/patterns/core/plugins.md), after [core/plugins/representation.sequence.plugin.ts](https://banes-lab.com/source/patterns/core/plugins/representation.sequence.plugin.ts.md) and before [core/plugins/representation.vector.plugin.ts](https://banes-lab.com/source/patterns/core/plugins/representation.vector.plugin.ts.md).

## Definitions

- `create` (method_definition, line 8)

## Contained in

- [core/plugins](https://banes-lab.com/anatomy/patterns/folder-patterns-core-plugins.md)

## Uses

- [core/converters/finding.tree.converter.ts](https://banes-lab.com/source/patterns/core/converters/finding.tree.converter.ts.md)
- [core/factories/representation.factory.ts](https://banes-lab.com/source/patterns/core/factories/representation.factory.ts.md)

## Linked from

- [core/converters](https://banes-lab.com/anatomy/patterns/folder-patterns-core-converters.md)
- [core/factories](https://banes-lab.com/anatomy/patterns/folder-patterns-core-factories.md)

## Source

```typescript
import { TreeAccumulator } from "#core/aggregators/representation.tree.aggregator";
import { registerRepresentation } from "#core/registries/representation.registry";
import { runtimeOf } from "#core/factories/representation.factory";
import { treeFindings } from "#core/converters/finding.tree.converter";

registerRepresentation({
    applicable: ["structure", "relation", "fractal"],
    create(field) {
        return runtimeOf(new TreeAccumulator(field), (summary) => treeFindings(field, summary));
    },
    name: "tree",
});
```
