Skip to content

pantoken / packages/plugin-kit/src / capabilitiesOf

함수: capabilitiesOf()

capabilitiesOf(plugin): Stage[] | undefined

베타

팩토리화된 플러그인이 선언하는 기능들이거나, 팩토리화되지 않은 플러그인의 경우 undefined.

매개변수

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