Skip to content

pantoken-root / packages/plugin-kit/src / capabilitiesOf

פונקציה: capabilitiesOf() ​

capabilitiesOf(plugin): Stage[] | undefined

בטא

היכולות שתוסף factoried מצהיר עליהן, או undefined עבור תוסף שאינו factoried.

פרמטרים ​

plugin ​

PantokenPlugin

מחזיר ​

Stage[] | undefined

דוגמה ​

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

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