Skip to content

pantoken / packages/utils/src / tokenNames

Funzione: tokenNames()

tokenNames(ir): Set<string>

Beta

L'insieme dei nomi di token che un IR definisce.

Parametri

ir

readonly Token[]

Restituisce

Set<string>

Esempio

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