import 'reflect-metadata'; import { ICallbackStrategyConstructor } from './callback-strategy'; import { FFITypeList } from './common'; import { IPlugin, PluginFunctionWrap } from './plugins'; /** Callback decorator options */ export interface ICallbackOptions { /** * The node-ffi type mappings used to create the callback pointer * * Example: `['int', ['short', 'pointer']]` */ types: FFITypeList; /** * Strategy for holding onto the callback pointer */ strategy?: ICallbackStrategyConstructor; /** * Calling convention */ abi?: number; } /** * Used to decorate callback parameters so they automatically * get wrapped with ffi.callbacks */ export declare function Callback(options: ICallbackOptions): ParameterDecorator; /** * Plugin to automatically handle wrapping JavaScript callbacks * with ffi.callback pointers */ export declare class CallbackPlugin implements Partial { private readonly target; private readonly method; private readonly strategies; constructor(target: object, method: string); /** * @inheritDoc */ modifyMappings(mapping: [string, string[]]): void; /** * @inheritDoc */ modifyArgs(args: any[]): void; /** * @inheritDoc */ wrapFunction(func: PluginFunctionWrap): PluginFunctionWrap; }