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