INNER CODE UNIT · TypeScript
wrapped
getwud/wud · app/event/index.ts:52
const wrapped = (...args) => {
const res = handler(...args);
if (res && typeof res.then === 'function') {
pendingHandlers.push(res);
}
return res;
};
wrappedContainerReportsHandlers.set(handler, wrapped);
eventEmitter.on(WUD_CONTAINER_REPORTS, wrapped);
}
/**
* Emit a container rollback event.
* @param rollbackReport
*/
export function emitContainerRollback(rollbackReport) {
eventEmitter.emit(WUD_CONTAINER_ROLLBACK, rollbackReport);
}