Skip to content

pantoken-root / packages/core/src / resolveValue

函数: resolveValue() ​

resolveValue(raw): string

Beta

解析原始令牌值:引用变为 var(...);具体值则原样通过。

参数 ​

raw ​

string

返回值 ​

string

示例 ​

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

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