Skip to content

pantoken-root / packages/utils/src / tokenNames

函数: tokenNames() ​

tokenNames(ir): Set<string>

Beta

IR 定义的令牌名称集合。

参数 ​

ir ​

只读 Token[]

返回值 ​

Set<string>

示例 ​

ts
import { tokenNames } from "@pantoken/utils";
import type { Token } from "@pantoken/model";

const ir: Token[] = [
  { name: "--instui-leaf", syntax: "<color>", inherits: true, value: "#0374B5" },
];
tokenNames(ir); // → Set { "--instui-leaf" }