import { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes'; import { EngineEventTrigger } from './EngineEventTrigger'; interface Unsubscriber { (): void; } export declare class EngineEvent void> extends EngineEventTrigger { private legacyHandler; private subscriptions; constructor(legacyHandler: () => T | undefined, logger?: LoggerFunction); /** * Executes the registered callbacks with provided arguments * * @param args The arguments to pass to the callbacks. * @returns The result of executing the callbacks. */ trigger(...args: Parameters): ReturnType; /** * Registers a callback function. * * @param callback - The callback function to register. This function will be invoked when the event occurs. * @param errorBehavior - An optional parameter to define how to handle errors that appear in the callback function. * Accepted values are: * - "log": Logs the error to the console (default behavior) * - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others * @returns A function to unsubscribe the callback, preventing it from being invoked in the future. */ registerCallback(callback: T, errorBehavior?: CallbackErrorBehavior): Unsubscriber; } export {};