Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/heft > IHeftPlugin

IHeftPlugin interface

The interface used for all Heft plugins.

Signature:

export interface IHeftPlugin<TSession extends IHeftLifecycleSession | IHeftTaskSession = IHeftLifecycleSession | IHeftTaskSession, TOptions = void> 

Properties

PropertyModifiersTypeDescription
accessor?readonlyobject(Optional) The accessor provided by the plugin. This accessor can be obtained by other plugins within the same phase by calling session.requestAccessToPlugin(...), and is used by other plugins to interact with hooks or properties provided by the host plugin.

Methods

MethodDescription
apply(session, heftConfiguration, pluginOptions)Apply the plugin to the session. Plugins are expected to hook into session hooks to provide plugin implementation. The apply(...) method is called once per phase.