import type { Transfer, Pullable, Pushable, Subscribable, Triggerable, PollingProxy, Gate, AsyncPushable, AsyncPullable, AsyncTriggerable, AsyncPollingProxy, BaseSelectorKey } from "./types"; import type { BaseStateTransferConfig, DelayedPushChannelTransferConfig, DebounceTransferConfig, ThrottleTransferConfig, GateTransferConfig, MergeTransferConfig, SplitTransferConfig, PollingSourceTransferConfig, PollingProxyTransferConfig, ChannelTransferConfig, StoredChannelTransferConfig, SinkTransferConfig, WriteTransferConfig, ReadTransferConfig, ConvertTransferConfig, ConditionTransferConfig, PollingFlowTransferConfig, IdlePollingTransferConfig, AsyncPollingSourceTransferConfig, AsyncPollingProxyTransferConfig, AsyncPollingFlowTransferConfig, AsyncIdlePollingTransferConfig, AsyncSinkTransferConfig, AsyncWriteTransferConfig, AsyncReadTransferConfig, AsyncConvertTransferConfig, AsyncConditionTransferConfig, AsyncStoredChannelTransferConfig, AsyncTransformBridgeConfig, DisplaceTransferConfig, PassBridgeConfig, TransformBridgeConfig, TransferBridgeConfig, BridgeAggregatorConfig, BridgeSelectorConfig, BridgeMultiSelectorConfig } from "./configs"; import type { AsyncOperatorInterface, BridgeInterface, OperatorInterface } from "./interfaces"; import { PassBridge, TransformBridge, AsyncTransformBridge, TransferBridge, BridgeAggregator, BridgeSelector, BridgeMultiSelector } from "./bridges"; import { FilterOperator, GuardOperator, MapOperator, PipelineOperator, ReducerOperator, TransparentOperator, AsyncMapOperator, AsyncGuardOperator, AsyncPipelineOperator } from "./operators"; import { LatestStorage, QueueStorage, StackStorage } from "./storages"; import { DefaultLinkStrategy } from "./linking"; /** * Creates a PushChannelTransfer — a reactive channel with automatic emission to subscribers. * * Capabilities: Pushable, Subscribable * * @example * const channel = createPushChannelTransfer(); * channel.subscribe(x => console.log(x)); * channel.push(42); * * @category Factories * @category Transfers */ export declare function createPushChannelTransfer(): Transfer; /** * Creates a PushStoredChannelTransfer — a channel that stores the last value. * * Capabilities: Pushable, Pullable, Subscribable, Triggerable * * @param config — configuration (initialValue) * @example * const channel = createPushStoredChannelTransfer({ initialValue: 0 }); * channel.push(42); * console.log(channel.pull()); // 42 * * @category Factories * @category Transfers */ export declare function createPushStoredChannelTransfer(config?: BaseStateTransferConfig): Transfer; /** * Creates a DelayedPushChannelTransfer — a reactive channel with delayed emission to subscribers. * * Capabilities: Pushable, Subscribable * * @param config — configuration (delay, initialValue) * @example * const channel = createDelayedPushChannelTransfer({ delay: 100 }); * channel.subscribe(x => console.log(x)); * channel.push(42); // 42 will be logged after 100 ms * * @category Factories * @category Transfers */ export declare function createDelayedPushChannelTransfer(config: DelayedPushChannelTransferConfig): Transfer; /** * Creates a DebounceTransfer — a reactive channel with debounced emission to subscribers. * * Capabilities: Pushable, Subscribable * * @param config — configuration (delay) * @example * const channel = createDebounceTransfer({ delay: 200 }); * channel.subscribe(x => console.log(x)); * channel.push(1); // resets the timer * channel.push(2); // resets the timer * // after 200 ms of silence, subscribers receive 2 * * @category Factories * @category Transfers */ export declare function createDebounceTransfer(config: DebounceTransferConfig): Transfer; /** * Creates a ThrottleTransfer — a reactive channel with throttled emission to subscribers. * * Capabilities: Pushable, Subscribable * * @param config — configuration (interval) * @example * const channel = createThrottleTransfer({ interval: 100 }); * channel.subscribe(x => console.log(x)); * channel.push(1); // emitted immediately (leading edge) * channel.push(2); // saved as pending * // after 100 ms subscribers receive 2 (trailing edge) * * @category Factories * @category Transfers */ export declare function createThrottleTransfer(config: ThrottleTransferConfig): Transfer; /** * Creates a BufferTransfer — a passive buffer with push/pull mechanics. * * Capabilities: Pushable, Pullable * * @example * const buffer = createBufferTransfer(); * buffer.push(42); * console.log(buffer.pull()); // 42 * * @category Factories * @category Transfers */ export declare function createBufferTransfer(): Transfer; /** * Creates a ManualBufferTransfer — a buffer with manual read control via trigger(). * * Capabilities: Pushable, Pullable, Triggerable * * @example * const buffer = createManualBufferTransfer(); * buffer.push(42); * buffer.trigger(); * console.log(buffer.pull()); // 42 * * @category Factories * @category Transfers */ export declare function createManualBufferTransfer(): Transfer; /** * Creates a ManualFlowTransfer — a reactive stream with manual emission control. * * Capabilities: Pushable, Subscribable, Triggerable * * @param config — configuration (initialValue) * @example * const flow = createManualFlowTransfer(); * flow.subscribe(x => console.log(x)); * flow.push(42); * flow.trigger(); // 42 * * @category Factories * @category Transfers */ export declare function createManualFlowTransfer(config?: BaseStateTransferConfig): Transfer; /** * Creates a GateTransfer — a transfer with state management (gate). * * Capabilities: Pushable, Subscribable, Gate * * @param config — configuration (activated) * @example * const gate = createGateTransfer({ activated: true }); * gate.subscribe(x => console.log(x)); * gate.push(42); // passes through, since activated === true * gate.deactivate(); * gate.push(100); // ignored * * @category Factories * @category Transfers */ export declare function createGateTransfer(config: GateTransferConfig): Transfer; /** * Creates a MergeTransfer — an aggregator of multiple sources into a single stream. * * Capabilities: Subscribable * * @param config — configuration (sources) * @example * const source1 = createPushStoredChannelTransfer(); * const source2 = createPushStoredChannelTransfer(); * const merge = createMergeTransfer({ sources: [source1, source2] }); * merge.subscribe(x => console.log(x)); * * @category Factories * @category Transfers */ export declare function createMergeTransfer(config: MergeTransferConfig): Transfer; /** * Creates a SplitTransfer — a stream splitter to multiple targets. * * Capabilities: Pushable * * @param config — configuration (targets) * @example * const target1 = createPushStoredChannelTransfer(); * const target2 = createPushStoredChannelTransfer(); * const split = createSplitTransfer({ targets: [target1, target2] }); * split.push(42); // sent to both targets * * @category Factories * @category Transfers */ export declare function createSplitTransfer(config: SplitTransferConfig): Transfer; /** * Creates a PollingSourceTransfer — an output transfer with internal polling. * * Capabilities: Pullable, Subscribable, Triggerable, Gate * * @param config — configuration (fetcher, interval, activated, onError) * @example * const polling = createPollingSourceTransfer({ * fetcher: () => Date.now(), * interval: 1000, * activated: true * }); * polling.subscribe(x => console.log(x)); * * @category Factories * @category Transfers */ export declare function createPollingSourceTransfer(config: PollingSourceTransferConfig): Transfer; /** * Creates a PollingProxyTransfer — a duplex transfer with polling from the previous node. * * Capabilities: PollingProxy, Pullable, Subscribable, Triggerable, Gate * * @param config — configuration (interval, activated, onError) * @example * const polling = createPollingProxyTransfer({ * interval: 1000, * activated: true * }); * // setFetcher is called via linkTransfers * * @category Factories * @category Transfers */ export declare function createPollingProxyTransfer(config: PollingProxyTransferConfig): Transfer; /** * Creates a PollingFlowTransfer — polling from OutputFlowInterface (e.g., Storage). * * Capabilities: Pullable, Subscribable, Triggerable, Gate * * @param config — configuration (flow, interval, activated, onError) * @example * const polling = createPollingFlowTransfer({ * flow: storage, * interval: 1000, * activated: true * }); * polling.subscribe(x => console.log(x)); * * @category Factories * @category Transfers */ export declare function createPollingFlowTransfer(config: PollingFlowTransferConfig): Transfer; /** * Creates an IdlePollingTransfer — a reactive channel with fallback polling on idle. * * If no data has been received via push() for longer than timeout ms, * periodic polling of the fetcher starts with the given interval. * When new data arrives via push(), polling stops and the idle timer resets. * * Capabilities: Pushable, Pullable, Subscribable, Triggerable, Gate * * @param config — configuration (fetcher, timeout, interval, activated, onError) * @example * const channel = createIdlePollingTransfer({ * fetcher: () => fetchLatest(), * timeout: 5000, * interval: 1000, * activated: true * }); * channel.subscribe(x => console.log(x)); * channel.push(42); // notifies subscribers, resets idle timer * // after 5 seconds without push, polling starts every 1 second * * @category Factories * @category Transfers */ export declare function createIdlePollingTransfer(config: IdlePollingTransferConfig): Transfer; /** * Creates a ChannelTransfer — an output channel with external management via setup/destroy. * * Capabilities: Subscribable * * @param config — configuration (setup, destroy, onError, onDestroyError) * @example * const channel = createChannelTransfer({ * setup: (emit) => { * const interval = setInterval(() => emit(Date.now()), 1000); * return () => clearInterval(interval); * }, * destroy: () => {} * }); * channel.subscribe(x => console.log(x)); * * @category Factories * @category Transfers */ export declare function createChannelTransfer(config: ChannelTransferConfig): Transfer; /** * Creates a StoredChannelTransfer — a channel that stores the last value with external management. * * Capabilities: Pullable, Subscribable, Triggerable * * @param config — configuration (setup, destroy, initialValue, onError handlers) * @example * const channel = createStoredChannelTransfer({ * setup: (emit) => { * const ws = new WebSocket('ws://example.com'); * ws.onmessage = (e) => emit(JSON.parse(e.data)); * }, * destroy: () => ws.close() * }); * console.log(channel.pull()); // last value * channel.subscribe(x => console.log(x)); * * @category Factories * @category Transfers */ export declare function createStoredChannelTransfer(config: StoredChannelTransferConfig): Transfer; /** * Creates a SinkTransfer — a terminal destination (callback). * * Capabilities: Pushable * * @param config — configuration (callback, initialValue) * @example * const sink = createSinkTransfer({ * callback: x => console.log('Received:', x) * }); * sink.push(42); * * @category Factories * @category Transfers */ export declare function createSinkTransfer(config: SinkTransferConfig): Transfer; /** * Creates a WriteTransfer — an adapter for writing to InputFlowInterface. * * Capabilities: Pushable * * @param config — configuration (flow, onError) * @example * const writer = createWriteTransfer({ * flow: storage * }); * writer.push(42); // storage.write(42) * * @category Factories * @category Transfers */ export declare function createWriteTransfer(config: WriteTransferConfig): Transfer; /** * Creates a ReadTransfer — an adapter for reading from OutputFlowInterface. * * Capabilities: Pullable * * @param config — configuration (flow, onError) * @example * const reader = createReadTransfer({ * flow: storage * }); * console.log(reader.pull()); // storage.read() * * @category Factories * @category Transfers */ export declare function createReadTransfer(config: ReadTransferConfig): Transfer; /** * Creates a ConvertTransfer — a converter transfer via Operator. * * Capabilities: Pushable, Subscribable * * @param config — configuration (operator, onError) * @example * const converter = createConvertTransfer({ * operator: new MapOperator(x => x.toString()) * }); * converter.subscribe(s => console.log(s)); * converter.push(42); // "42" * * @category Factories * @category Transfers */ export declare function createConvertTransfer(config: ConvertTransferConfig): Transfer; /** * Creates a ConditionTransfer — a transfer with conditional filtering. * * Capabilities: Pushable, Subscribable * * @param config — configuration (shouldAccept?, shouldEmit?, onAcceptError, onEmitError) * @example * const condition = createConditionTransfer({ * shouldAccept: x => x > 0, * shouldEmit: x => x !== undefined && x < 100 * }); * condition.subscribe(x => console.log(x)); * condition.push(42); // passes * condition.push(-1); // ignored * * @category Factories * @category Transfers */ export declare function createConditionTransfer(config: ConditionTransferConfig): Transfer; /** * Creates a DisplaceTransfer — a transfer that creates a new inner * async-pushable + subscribable transfer per input value, pushes the * value into it via asyncPush(), and forwards its emissions to outer * subscribers. * * On each new push(), the previous inner subscription is unsubscribed * and the previous inner transfer is destroyed — the new inner * displaces the previous one. Only the latest inner transfer's * emissions reach the outer subscribers. * * @param config — configuration (factory, onError, onDisplace) * @example * const displace = createDisplaceTransfer({ * factory: () => createAsyncConvertTransfer({ * operator: createAsyncMapOperator(async (query) => await searchApi(query)), * }), * }); * displace.subscribe(result => render(result)); * displace.push('hello'); // creates inner, pushes 'hello' into it * displace.push('world'); // displaces previous inner, creates new one * * @category Factories * @category Transfers */ export declare function createDisplaceTransfer = Transfer>(config: DisplaceTransferConfig): Transfer; /** * Creates a PassBridge — a simple bridge with gate control. * * @typeParam T — data type * @param config — configuration (source, target, activated) * @example * const source = createPushStoredChannelTransfer(); * const target = createSinkTransfer({ callback: console.log }); * const bridge = createPassBridge({ * source, * target, * activated: true * }); * source.push(42); // passes through the bridge * bridge.deactivate(); * source.push(100); // ignored * * @category Factories * @category Bridges */ export declare function createPassBridge(config: PassBridgeConfig): PassBridge; /** * Creates a TransformBridge — a bridge with data conversion via Operator. * * @typeParam TInput — input data type * @typeParam TOutput — output data type * @param config — configuration (source, target, operator, activated) * @example * const source = createPushStoredChannelTransfer(); * const target = createSinkTransfer({ callback: console.log }); * const bridge = createTransformBridge({ * source, * target, * operator: new MapOperator(n => n.toString()), * activated: true * }); * source.push(42); // "42" * * @category Factories * @category Bridges */ export declare function createTransformBridge(config: TransformBridgeConfig): TransformBridge; /** * Creates a TransferBridge — a bridge with an intermediate duplex transfer. * * @typeParam TInput — input data type * @typeParam TOutput — output data type * @param config — configuration (source, target, middle, middleOwned, activated) * @example * const source = createPushStoredChannelTransfer(); * const target = createSinkTransfer({ callback: console.log }); * const middle = createConditionTransfer({ shouldAccept: x => x > 0 }); * const bridge = createTransferBridge({ * source, * target, * middle, * middleOwned: true, * activated: true * }); * source.push(42); // passes * source.push(-5); // ignored * * @category Factories * @category Bridges */ export declare function createTransferBridge(config: TransferBridgeConfig): TransferBridge; /** * Creates a BridgeAggregator — an aggregator of multiple bridges. * * @param config — configuration (bridges, activated, owned) * @example * const bridge1 = createPassBridge({ source, target, activated: false }); * const bridge2 = createPassBridge({ source, target, activated: false }); * const aggregator = createBridgeAggregator({ * bridges: [bridge1, bridge2], * activated: true, * owned: false * }); * aggregator.active; // true (all bridges active) * * @category Factories * @category Bridges */ export declare function createBridgeAggregator(config: BridgeAggregatorConfig): BridgeAggregator; /** * Creates a BridgeSelector — a selector for a single bridge from a map. * * @typeParam TMap — bridge map (Record) * @param config — configuration (bridges, initialKey, activated, owned) * @example * const bridge1 = createPassBridge({ source, target, activated: false }); * const bridge2 = createPassBridge({ source, target, activated: false }); * const selector = createBridgeSelector({ * bridges: { first: bridge1, second: bridge2 }, * initialKey: 'first', * activated: true, * owned: false * }); * selector.select('second'); // switches to the second bridge * * @category Factories * @category Bridges */ export declare function createBridgeSelector>(config: BridgeSelectorConfig): BridgeSelector; /** * Creates a BridgeMultiSelector — a selector for multiple bridges from a map. * * @typeParam TMap — bridge map (Record) * @param config — configuration (bridges, initialKeys, activated, owned) * @example * const bridge1 = createPassBridge({ source, target, activated: false }); * const bridge2 = createPassBridge({ source, target, activated: false }); * const selector = createBridgeMultiSelector({ * bridges: { first: bridge1, second: bridge2 }, * initialKeys: ['first'], * activated: true, * owned: false * }); * selector.check('second'); // adds the second bridge to active * * @category Factories * @category Bridges */ export declare function createBridgeMultiSelector>(config: BridgeMultiSelectorConfig): BridgeMultiSelector; /** * Creates a TransparentOperator — an identity operator (returns data unchanged). * * @typeParam T — data type * @example * const op = createTransparentOperator(); * op.apply(42); // 42 * * @category Factories * @category Operators */ export declare function createTransparentOperator(): TransparentOperator; /** * Creates a MapOperator — a transform operator via a mapper function. * * @typeParam TInput — input data type * @typeParam TOutput — output data type * @param mapper — transform function * @example * const op = createMapOperator(n => n.toString()); * op.apply(42); // "42" * * @category Factories * @category Operators */ export declare function createMapOperator(mapper: (data: TInput) => TOutput): MapOperator; /** * Creates a FilterOperator — an array filter operator by predicate. * * @typeParam T — array element type * @param predicate — filter predicate function * @example * const op = createFilterOperator(n => n % 2 === 0); * op.apply([1, 2, 3, 4]); // [2, 4] * * @category Factories * @category Operators */ export declare function createFilterOperator(predicate: (item: T) => boolean): FilterOperator; /** * Creates a ReducerOperator — an array reduce operator to a single value. * * @typeParam T — array element type * @param reducer — reduce function * @param defaultValue — default value for an empty array * @example * const op = createReducerOperator((acc, curr) => acc + curr, 0); * op.apply([1, 2, 3]); // 6 * op.apply([]); // 0 * * @category Factories * @category Operators */ export declare function createReducerOperator(reducer: (acc: T, curr: T) => T, defaultValue?: T): ReducerOperator; /** * Creates a GuardOperator — a validation operator (passes data or returns undefined). * * @typeParam T — data type * @param validator — validation function * @example * const op = createGuardOperator(n => n > 0); * op.apply(42); // 42 * op.apply(-1); // undefined * * @category Factories * @category Operators */ export declare function createGuardOperator(validator: (data: T) => boolean): GuardOperator; /** * Creates a PipelineOperator — a composition of multiple operators into a chain. * * @typeParam TInput — input data type * @typeParam TOutput — output data type * @param operators — array of operators for sequential application * @example * const op = createPipelineOperator([ * createMapOperator(n => n * 2), * createMapOperator(n => n.toString()), * ]); * op.apply(21); // "42" * * @category Factories * @category Operators */ export declare function createPipelineOperator(operators: OperatorInterface[]): PipelineOperator; /** * Creates an AsyncSinkTransfer — an asynchronous terminal sink. * * Capabilities: AsyncPushable * * @param config — configuration (callback: AsyncDataHandler) * @example * const sink = createAsyncSinkTransfer({ * callback: async (n) => { await fetch('/api', { body: JSON.stringify(n) }); } * }); * await sink.asyncPush(42); * * @category Factories * @category Async Transfers */ export declare function createAsyncSinkTransfer(config: AsyncSinkTransferConfig): Transfer; /** * Creates an AsyncWriteTransfer — an adapter for asynchronous writing to AsyncInputFlowInterface. * * Capabilities: AsyncPushable * * @param config — configuration (flow, onError) * * @category Factories * @category Async Transfers */ export declare function createAsyncWriteTransfer(config: AsyncWriteTransferConfig): Transfer; /** * Creates an AsyncReadTransfer — an adapter for asynchronous reading from AsyncOutputFlowInterface. * * Capabilities: AsyncPullable * * @param config — configuration (flow, onError) * * @category Factories * @category Async Transfers */ export declare function createAsyncReadTransfer(config: AsyncReadTransferConfig): Transfer; /** * Creates an AsyncPollingSourceTransfer — an output transfer with asynchronous source polling. * * Capabilities: AsyncPullable, Subscribable, AsyncTriggerable, Gate * * @param config — configuration (fetcher, interval, activated, tickerFactory, onError) * * @category Factories * @category Async Transfers */ export declare function createAsyncPollingSourceTransfer(config: AsyncPollingSourceTransferConfig): Transfer; /** * Creates an AsyncPollingProxyTransfer — a duplex transfer with async polling from the previous node. * * Capabilities: AsyncPollingProxy, AsyncPullable, Subscribable, AsyncTriggerable, Gate * * @param config — configuration (interval, activated, tickerFactory, onError) * * @category Factories * @category Async Transfers */ export declare function createAsyncPollingProxyTransfer(config: AsyncPollingProxyTransferConfig): Transfer; /** * Creates an AsyncPollingFlowTransfer — polling from AsyncOutputFlowInterface. * * Capabilities: AsyncPullable, Subscribable, AsyncTriggerable, Gate * * @param config — configuration (flow, interval, activated, tickerFactory, onError) * * @category Factories * @category Async Transfers */ export declare function createAsyncPollingFlowTransfer(config: AsyncPollingFlowTransferConfig): Transfer; /** * Creates an AsyncIdlePollingTransfer — a reactive channel with async fallback polling on idle. * * Capabilities: Pushable, Subscribable, AsyncPullable, AsyncTriggerable, Gate * * @param config — configuration (fetcher, timeout, interval, activated, initialValue, tickerFactory, onError) * * @category Factories * @category Async Transfers */ export declare function createAsyncIdlePollingTransfer(config: AsyncIdlePollingTransferConfig): Transfer; /** * Creates an AsyncConvertTransfer — an async converter transfer via AsyncOperator. * * Capabilities: AsyncPushable, Subscribable * * @param config — configuration (operator: AsyncOperatorInterface, onError) * * @category Factories * @category Async Transfers */ export declare function createAsyncConvertTransfer(config: AsyncConvertTransferConfig): Transfer; /** * Creates an AsyncConditionTransfer — a transfer with async conditional filtering. * * Capabilities: AsyncPushable, Subscribable * * @param config — configuration (shouldAccept?, shouldEmit?, onAcceptError, onEmitError) * * @category Factories * @category Async Transfers */ export declare function createAsyncConditionTransfer(config: AsyncConditionTransferConfig): Transfer; /** * Creates an AsyncStoredChannelTransfer — a channel with value storage and async interface. * * Capabilities: AsyncPullable, Subscribable, AsyncTriggerable * * @param config — configuration (setup, destroy, initialValue, onError handlers) * * @category Factories * @category Async Transfers */ export declare function createAsyncStoredChannelTransfer(config: AsyncStoredChannelTransferConfig): Transfer; /** * Creates an AsyncTransformBridge — a bridge with async transformation via AsyncOperator. * * @typeParam TInput — input data type * @typeParam TOutput — output data type * @param config — configuration (source, target, operator: AsyncOperatorInterface, activated, onError) * * @category Factories * @category Async Bridges */ export declare function createAsyncTransformBridge(config: AsyncTransformBridgeConfig): AsyncTransformBridge; /** * Creates an AsyncMapOperator — an async transform operator. * * @typeParam TInput — input data type * @typeParam TOutput — output data type * @param mapper — async transform function * @example * const op = createAsyncMapOperator(async (n) => (await fetch(`/api/${n}`)).text()); * await op.apply(42); // fetch result * * @category Factories * @category Async Operators */ export declare function createAsyncMapOperator(mapper: (data: TInput) => Promise): AsyncMapOperator; /** * Creates an AsyncGuardOperator — an async validation operator. * * @typeParam T — data type * @param validator — async validation function * @example * const op = createAsyncGuardOperator(async (n) => (await check(n)).valid); * const result = await op.apply(42); // 42 or undefined * * @category Factories * @category Async Operators */ export declare function createAsyncGuardOperator(validator: (data: T) => Promise): AsyncGuardOperator; /** * Creates an AsyncPipelineOperator — a composition of sync/async operators into a chain. * * @typeParam TInput — input data type * @typeParam TOutput — output data type * @param operators — array of sync/async operators for sequential application * @example * const op = createAsyncPipelineOperator([ * createAsyncMapOperator(async (n) => n * 2), * createMapOperator(n => n.toString()), * ]); * await op.apply(21); // "42" * * @category Factories * @category Async Operators */ export declare function createAsyncPipelineOperator(operators: (OperatorInterface | AsyncOperatorInterface)[]): AsyncPipelineOperator; /** * Creates a LatestStorage — a storage that keeps only the last value. * * @typeParam T — data type * @param defaultValue — initial value (optional) * @example * const storage = createLatestStorage(0); * storage.write(42); * storage.read(); // 42 * storage.size; // 1 * * @category Factories * @category Storages */ export declare function createLatestStorage(defaultValue?: T): LatestStorage; /** * Creates a QueueStorage — a storage with a FIFO queue. * * @typeParam T — data type * @param maxLength — maximum queue length (optional) * @example * const storage = createQueueStorage(3); * storage.write(1); * storage.write(2); * storage.read(); // 1 (first written) * * @category Factories * @category Storages */ export declare function createQueueStorage(maxLength?: number): QueueStorage; /** * Creates a StackStorage — a storage with a LIFO stack. * * @typeParam T — data type * @param maxLength — maximum stack length (optional) * @example * const storage = createStackStorage(3); * storage.write(1); * storage.write(2); * storage.read(); // 2 (last written) * * @category Factories * @category Storages */ export declare function createStackStorage(maxLength?: number): StackStorage; /** * Creates a DefaultLinkStrategy — a strategy for linking transfers. * * The link strategy provides: * - `link(lhs, rhs, options?)` — directly links an output transfer to an input transfer * * @example * const linkStrategy = createDefaultLinkStrategy(); * linkStrategy.link(source, target); * * @category Factories * @category Linking */ export declare function createDefaultLinkStrategy(): DefaultLinkStrategy; //# sourceMappingURL=factories.d.ts.map