Skip to content

pantoken / packages/utils/src / tokenNames

関数: tokenNames()

tokenNames(ir): Set<string>

ベータ

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" }