This is the main interface that every plugin to be used with the FlowrAnalyzer must comply with.

One of the most important decisions for the generics is also the PluginType, as this determines at which stage of the analysis the plugin is applied and what it is expected to do. Do yourself a favor and do not implement a corresponding class yourself but use the classes referenced alongside the PluginType values, as these already provide the correct generic restrictions, additional capabilities, and the type property.

interface FlowrAnalyzerPluginInterface<In = unknown, Out = In> {
    description: string;
    name: string;
    processor(analyzer: FlowrAnalyzerContext, args: In): Out;
    type: PluginType;
    version: SemVer;
}

Type Parameters

  • In = unknown
  • Out = In

Implemented by

Properties

description: string

A short description of what the plugin does.

name: string

A unique, human-readable name of the plugin.

The type of the plugin, determining when and for what purpose it is applied during the analysis.

version: SemVer

The version of the plugin, ideally following semver.

Methods