import { DataMediator, MutationMediator } from './base.mediators'; import type { DataLike, MutationLike, AtomLikeOfOutput } from '../atoms'; import type { MediatorTypeMaker, MediatorType } from './base.mediators'; /****************************************************************************************************** * * FlatMediator Predicatess * ******************************************************************************************************/ /** * @param tar anything * @return { boolean } whether the target is a FlatMediator instance */ export declare const isFlatMediator: (tar: any) => tar is FlatMediatorUnion; /****************************************************************************************************** * * FlatMediator Classes * ******************************************************************************************************/ /** * */ export declare const FlatMediatorType: MediatorTypeMaker<"[mediator Flat]">; export interface FlatMediatorOptions { autoConnect?: boolean; } export declare const DEFAULT_FLAT_MEDIATOR_OPTIONS: Required; declare type FlatMediatorUnion = FlatDataMediator | FlatMutationMediator; /****************************************************************************************************** * * FlatDataMediator * ******************************************************************************************************/ /** * */ export declare class FlatDataMediator extends DataMediator { private readonly _originalAtom; private _connection; private _subscription; private readonly _options; constructor(atom: DataLike, options?: FlatMediatorOptions); get type(): MediatorType; get mediatorType(): MediatorType; get isFlatMediator(): true; static of(atom: DataLike, options?: FlatMediatorOptions): FlatDataMediator; static of(atom: I): I; connect(): void; disconnect(): void; release(): void; } /****************************************************************************************************** * * FlatMutationMediator * ******************************************************************************************************/ /** * */ export declare class FlatMutationMediator

extends MutationMediator { private readonly _originalAtom; private _connection; private _subscription; private readonly _options; constructor(atom: MutationLike, options?: FlatMediatorOptions); get type(): MediatorType; get mediatorType(): MediatorType; get isFlatMediator(): true; static of(atom: MutationLike, options?: FlatMediatorOptions): FlatMutationMediator; static of(atom: I): I; connect(): void; disconnect(): void; release(): void; } /****************************************************************************************************** * * FlatMediator * ******************************************************************************************************/ /** * */ export declare class FlatMediator { constructor(); get type(): MediatorType; get mediatorType(): MediatorType; get isFlatMediator(): true; static of(atom: DataLike, options?: FlatMediatorOptions): FlatDataMediator; static of(atom: MutationLike, options?: FlatMediatorOptions): FlatMutationMediator; static of(atom: I, options?: FlatMediatorOptions): I; } interface IWithValueFlatted { (atom: DataLike, options?: FlatMediatorOptions): FlatDataMediator;

(atom: MutationLike, options?: FlatMediatorOptions): FlatMutationMediator; (atom: I, options?: FlatMediatorOptions): I; (atom: AtomLikeOfOutput, options?: FlatMediatorOptions): AtomLikeOfOutput; } /** * Make a flat mediator which will flatten the data and mutation of the given atom. * - Data\ -> Data * - Data\ -> Data * - Mutation\ -> Mutation * - Mutation\ -> Mutation */ export declare const withValueFlatted: IWithValueFlatted; export {}; //# sourceMappingURL=flat.mediators.d.ts.map