Skip to main content

Type Alias: Plugin<Ts>

Plugin<Ts> = (pluginIndex, pluginStore) => PluginInstance<Ts>

Defined in: packages/fast-check/src/check/plugin/Plugin.ts:87

Builder instantiating a plugin. Each property will instantiate its own plugin when starting to be assessed via check or assert.

Parameters received by the Plugin function:

  • 1st argument or pluginIndex: Corresponds to the index of the plugin within the run (starts at zero). Plugins are instantiated in order. As such, for a given batch expect to see index 0 instantiated first, followed by others.
  • 2nd argument or pluginStore: Context parameter shared across all builders. The store can be leveraged to exchange insights with other builders.

Type Parameters

Type Parameter
Ts

Parameters

ParameterType
pluginIndexnumber
pluginStorePluginStore

Returns

PluginInstance<Ts>

Remarks

Since 4.10.0