Skip to content

pantoken-root / 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