INNER CODE UNIT · TypeScript

emitContainerReport

getwud/wud · app/event/index.ts:87

export function emitContainerReport(containerReport) {
    eventEmitter.emit(WUD_CONTAINER_REPORT, containerReport);
}

/**
 * Register to ContainerReport event.
 * @param handler
 */
export function registerContainerReport(handler) {
    const wrapped = (...args) => {
        const res = handler(...args);
        if (res && typeof res.then === 'function') {
            pendingHandlers.push(res);
        }
        return res;
    };
    wrappedContainerReportHandlers.set(handler, wrapped);
    eventEmitter.on(WUD_CONTAINER_REPORT, wrapped);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…