---
lang: en
title: 'API docs: rest.trie'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.trie.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/rest](./rest.md) &gt; [Trie](./rest.trie.md)

## Trie class

An implementation of trie for routes. The key hierarchy is built with parts of the route path delimited by `/`

**Signature:**

```typescript
export declare class Trie<T> 
```

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[root](./rest.trie.root.md)


</td><td>

`readonly`


</td><td>

[Node](./rest.node.md)<!-- -->&lt;T&gt;


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[create(routeTemplate, value)](./rest.trie.create.md)


</td><td>


</td><td>

Create a node for a given path template


</td></tr>
<tr><td>

[list()](./rest.trie.list.md)


</td><td>


</td><td>

List all nodes with value of the trie


</td></tr>
<tr><td>

[match(path)](./rest.trie.match.md)


</td><td>


</td><td>

Match a route path against the trie


</td></tr>
</tbody></table>

