import { FFITypeList } from './common'; export declare type PluginFunctionWrap = (...args: any[]) => PluginFunctionWrap; /** * A simple plugin interface which can be used to transform data or * parameters before the native methods are called */ export interface IPlugin { /** * Used by plugins to read or modify the node-ffi mappings */ modifyMappings(mapping: FFITypeList): void; /** * Used by plugins to read or modify the arguments before the * native method is called */ modifyArgs(args: any[]): void; /** * Used by plugins to to wrap the execution of the native method */ wrapFunction(func: PluginFunctionWrap): PluginFunctionWrap; } /** Interface to type plugin constructors */ export declare type IPluginConstructor = new (target: object, method: string) => Partial; /** * Aggregates plugins and simplifies calling their methods */ export declare class PluginCollection { private readonly target; private readonly pluginsConstructors; constructor(target: object, pluginsConstructors: IPluginConstructor[]); /** Gets plugin instances for the supplied method */ pluginsForMethod(method: string): IPlugin; }