Skip to content

pantoken-root / packages/utils/src / tokenNames

Fungsi: tokenNames() ​

tokenNames(ir): Set<string>

Beta

Kumpulan nama token yang didefinisikan oleh sebuah IR.

Parameter ​

ir ​

hanya-baca Token[]

Mengembalikan ​

Set<string>

Contoh ​

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