Skip to content

pantoken / packages/utils/src / tokenNames

Funktion: tokenNames()

tokenNames(ir): Set<string>

Beta

Die Menge der Token-Namen, die ein IR definiert.

Parameter

ir

readonly Token[]

Rückgabe

Set<string>

Beispiel

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