import type { Subscription } from './observable'; /** * Type helper to extract event types that have "void" data. This allows to call `notify` without a * second argument. Ex: * * ``` * interface EventMap { * foo: void * } * const LifeCycle = AbstractLifeCycle * new LifeCycle().notify('foo') * ``` */ type EventTypesWithoutData = { [K in keyof EventMap]: EventMap[K] extends void ? K : never; }[keyof EventMap]; export declare class AbstractLifeCycle { private callbacks; notify>(eventType: EventType): void; notify(eventType: EventType, data: EventMap[EventType]): void; subscribe(eventType: EventType, callback: (data: EventMap[EventType]) => void): Subscription; } export {};