Skip to content

pantoken-root / packages/core/src / resolveValue

Hàm: resolveValue() ​

resolveValue(raw): string

Beta

Giải quyết giá trị token thô: một tham chiếu trở thành var(...); một giá trị cụ thể được truyền qua.

Tham số ​

raw ​

string

Trả về ​

string

Ví dụ ​

ts
import { resolveValue } from "@pantoken/core";

resolveValue("{semantic.color.background.base}"); // → "var(--instui-color-background-base)"
resolveValue("#ffffff");                          // → "#ffffff"