---
url: /api/packages/core/src/functions/resolveReferences.md
---
[pantoken-root](../../../../index.md) / [packages/core/src](../index.md) / resolveReferences

# Function: resolveReferences()

> **resolveReferences**(`tokens`, `mode?`): `Map`<`string`, `string`>

Beta

Resolve every token to a concrete, single-mode value: expand `var(...)` chains and collapse
`light-dark()` to the chosen `mode`.

## Parameters

### tokens

readonly [`Token`](../interfaces/Token.md)\[]

The IR.

### mode?

[`Mode`](../type-aliases/Mode.md) = `"light"`

Which side of `light-dark()` to keep (default `"light"`).

## Returns

`Map`<`string`, `string`>

A map of token name to concrete value.

## Example

**Resolve the built IR to concrete dark-mode values**

```ts
import { buildTokens } from "@pantoken/core/build";
import { resolveReferences } from "@pantoken/core";

const resolved = resolveReferences(buildTokens(), "dark");
resolved.get("--instui-color-background-base"); // → a concrete "#…" value
```
