INNER CODE UNIT · TypeScript

registerContainerReport

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

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);
}

/**
 * Emit container added.
 * @param containerAdded
 */
export function emitContainerAdded(containerAdded) {
    eventEmitter.emit(WUD_CONTAINER_ADDED, containerAdded);

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…