Skip to content

pantoken-root / packages/utils/src / tokenNames

Funktion: tokenNames() ​

tokenNames(ir): Set<string>

Beta

Sættet af tokennavn, som en IR definerer.

Parametre ​

ir ​

skrivbeskyttet Token[]

Returnerer ​

Set<string>

Eksempel ​

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