import type { ISignal, IWritableSignal, SignalSubscription } from './SignalTypes';
/**
 * Implementation of writable signal with private listeners and strong typing.
 *
 * @public
 */
export declare class Signal<T> implements IWritableSignal<T> {
    private readonly _listeners;
    private _value;
    constructor(initialValue: T);
    /**
     * Factory method for creating a new Signal instance.
     * @param value Initial value of the signal.
     */
    static from<T>(value: T): Signal<T>;
    /**
     * Returns the current value, adding the current effect to listeners if it exists.
     */
    get(): T;
    /**
     * Sets a new value for the signal and notifies all listeners if value has changed.
     * @param next - The new value to set.
     */
    set(next: T): void;
    /**
     * Updates the value using an update function and notifies listeners.
     * @param updateFn Function that receives the current value and returns a new value.
     */
    update(updateFn: (value: T) => T): void;
    /**
     * Returns a readonly version of this signal.
     */
    asReadonly(): ISignal<T>;
    /**
     * Subscribes a function to be called on value changes.
     * @param fn Function to call on updates.
     * @returns A function to unsubscribe.
     */
    subscribe(fn: (v: T) => void): SignalSubscription;
    /**
     * Notifies all subscribed listeners of the new value.
     * @param next - The new value to notify listeners with.
     */
    private _notifyListeners;
}
/**
 * Wraps an effect function to manage the SignalManager’s current effect.
 * @param fn Effect function to be executed.
 * @public
 */
export declare function effect(fn: () => void): void;
//# sourceMappingURL=Signal.d.ts.map