UNPKG

ryuu.js

Version:

Ryuu JavaScript Utility Library

19 lines (18 loc) 928 B
/** * Registers a callback to be invoked when a data update message is received. * Uses MessageChannel for event communication, matching the pattern of other event listeners. * NOTE: this references the Domo class, so it should be called in the context of that class. * * @param {(alias: string) => void} callback - Callback function to be called with the alias when a data update event occurs. * @returns {() => void} - Function to remove the registered callback. */ export declare function onDataUpdated(callback: (alias: string) => void): () => void; /** * Handles incoming data update messages and invokes registered callbacks. * * @this {Domo} - The Domo instance context. * @param message - The message containing data update information. * @param responsePort - The port to send the response back. * @returns void */ export declare function handleDataUpdated(message: any, responsePort: MessagePort): void;