/** * Wraps a function in order to emit events on start, end, and error. * @param {Object} [emitter] - The desired emitter for events emitted by the wrapper. Defaults to the global emitter. * @param {boolean} always - If `true`, emit events even if already emitting an event. * @returns {function} The wrapped function. */ export function createWrapperWithEmitter(emitter?: Object, always: boolean, agentRef: any): Function; /** * Copies properties from one object to another. Used for creating a wrapper function from an original function and for * copying an original function to a property of a wrapper function named by `flag` in the executing context. * @param {Object} from - The source function or object. * @param {Object} to - The destination function or object. * @param {Object} [emitter] - The (optional) desired event emitter if errors are encountered while copying. * Defaults to the global event emitter. * @returns {object} - The destination founction or object with copied properties. */ export function copy(from: Object, to: Object, emitter?: Object): object; export const flag: string; export default createWrapperWithEmitter; //# sourceMappingURL=wrap-function.d.ts.map