/**
 * Mini Effector - Minimal event→state implementation
 *
 * Core concepts from Effector in ~100 lines:
 * - createEvent: callable + subscribable
 * - createStore: reactive state with .on() for event connections
 * - sample: connect clock → source → filter → target
 */
type Subscriber<T> = (payload: T) => void;
export interface Event<T> {
    (payload: T): void;
    watch(fn: Subscriber<T>): () => void;
    /** Internal: get subscribers for sample() */
    _subscribers: Set<Subscriber<T>>;
}
export declare function createEvent<T = void>(): Event<T>;
export interface Store<T> {
    getState(): T;
    watch(fn: Subscriber<T>): () => void;
    on<E>(event: Event<E>, reducer: (state: T, payload: E) => T): Store<T>;
    /** Internal: update state */
    _setState(value: T): void;
}
export declare function createStore<T>(initialState: T): Store<T>;
export interface Effect<T, R> {
    (payload: T): Promise<R>;
    done: Event<{
        params: T;
        result: R;
    }>;
    fail: Event<{
        params: T;
        error: Error;
    }>;
    pending: Store<boolean>;
}
export declare function createEffect<T, R>(handler: (payload: T) => Promise<R>): Effect<T, R>;
interface SampleConfig<Clock, Source, Target, EffectResult = unknown> {
    clock: Event<Clock>;
    source?: Store<Source>;
    filter?: (clockPayload: Clock, sourceState?: Source) => boolean;
    fn?: (clockPayload: Clock, sourceState?: Source) => Target;
    target?: Event<Target> | Effect<Target, EffectResult>;
}
export declare function sample<Clock, Source, Target, EffectResult = unknown>(config: SampleConfig<Clock, Source, Target, EffectResult>): void;
export {};
