/** * Represents a callback that can be set once. * * Common usage is dependency injection. * In contrast to events, callbacks can only have one handler, * are executed synchronously, * and can return results. */ export declare class Callback any> { private _callback; call(...args: Parameters): ReturnType; callIfSet(...args: Parameters): ReturnType | undefined; set(callback: T): void; isSet(): boolean; } export type SetCallbacks = { handlers: Set; }; /** * Create a fan-out callback handler. * NOTE: Methods cannot return values. */ export declare const createSetDispatch: ({ handlers }: SetCallbacks) => any; //# sourceMappingURL=callback.d.ts.map