Skip to content

mitm-core / PluginPayload

Type Alias: PluginPayload<K> ​

PluginPayload<K> = PluginEventMap[K] extends unknown[] ? PluginEventMap[K][0] : PluginEventMap[K]

Defined in: src/core/plugin/BasePlugin.ts:13

Extracts the payload type associated with a plugin event.

If the event map defines its value as an argument tuple, the first tuple element is used as the payload type. Otherwise, the event map value itself is used.

Type Parameters ​

K ​

K extends keyof PluginEventMap

The plugin event key from PluginEventMap.

Returns ​

The payload type associated with the specified plugin event.