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