Skip to content

pantoken / packages/plugin-kit/src / capabilitiesOf

Funktion: capabilitiesOf()

capabilitiesOf(plugin): Stage[] | undefined

Beta

De muligheder en fabrikeret plugin erklærer, eller undefined for et ikke-fabrikeret plugin.

Parametre

plugin

PantokenPlugin

Returnerer

Stage[] | undefined

Eksempel

ts
import { capabilitiesOf, definePlugin } from "@pantoken/plugin-kit";

capabilitiesOf(definePlugin({ name: "brand", tokens: (c) => c.tokens })); // → ["tokens"]
capabilitiesOf({ name: "hand-written" });                                 // → undefined