---
title: "TokenTree"
description: "The accessor shape for an init `T`: the same nesting as its token tree, with every leaf replaced by the branded `var(--…)` reference its schema declares. Numeric keys index with brackets (`t.color.gray[900]`)."
url: "https://pitlane.tools/package/theme/type/TokenTree"
---

# TokenTree

```ts
import type { TokenTree } from "@pitlane/theme";
```

```ts
type TokenTree<T> = 0 extends 1 & T ? unknown : T extends object ? TreeOf<Tok, Sch, never> : unknown;
```

The accessor shape for an init `T`: the same nesting as its token tree, with every leaf replaced by the branded `var(--…)` reference its schema declares. Numeric keys index with brackets (`t.color.gray[900]`).

A leaf whose schema entry is missing resolves to `unknown`, which is unusable in `css()`. The compiler also throws for it at module load.

## Type Parameters

### T

`T`

## See

[ThemeResult](https://pitlane.tools/package/theme/interface/ThemeResult.md)
