import { Data } from '../atoms'; import type { AtomLikeOfOutput } from '../atoms'; declare type Effect = (emit: (value: V) => void, target: T, immediateReturn: (value: V) => void) => any; /** * `effectT` transfer the value's emittion authority to the `effect` function, * so developer can control whether, when and what value will be emitted. * * @param effect A function that controls the value's emittion. * When there is a target value received, the effect function will be invoked. * It takes an emit function as first argument, invoke it with the value to emit it. * And takes the target value as second argument, an value set function * whose value will be emitted just after effect function's execution. * @param target Atom * @return Data * * @see {@link dynamicEffectT}, {@link staticEffectT} */ export declare const effectT: (effect: Effect, target: AtomLikeOfOutput) => Data; interface IEffectT_ { (effect: Effect, target: AtomLikeOfOutput): Data; (effect: Effect): (target: AtomLikeOfOutput) => Data; } /** * @see {@link effectT} */ export declare const effectT_: IEffectT_; /** * @see {@link effectT} */ export declare const dynamicEffectT: (effect: AtomLikeOfOutput>, target: AtomLikeOfOutput) => Data; interface IDynamicEffectT_ { (effect: AtomLikeOfOutput>, target: AtomLikeOfOutput): Data; (effect: AtomLikeOfOutput>): (target: AtomLikeOfOutput) => Data; } /** * @see {@link dynamicEffectT} */ export declare const dynamicEffectT_: IDynamicEffectT_; /** * @see {@link effectT} */ export declare const staticEffectT: (effect: Effect, target: AtomLikeOfOutput) => Data; interface IStaticEffectT_ { (effect: Effect, target: AtomLikeOfOutput): Data; (effect: Effect): (target: AtomLikeOfOutput) => Data; } /** * @see {@link staticEffectT} */ export declare const staticEffectT_: IStaticEffectT_; export {}; //# sourceMappingURL=effect.taches.d.ts.map