transferum
    Preparing search index...

    Class ConvertTransfer<TInput, TOutput>

    Converter transfer: transforms input data via an Operator and sends the result to subscribers.

    Capabilities: isInput, isOutput, isPushable, isSubscribable

    Mechanics:

    1. The constructor accepts config.operator: OperatorInterface<TInput, TOutput>
    2. push(data: TInput) — applies operator.apply(data), notifies subscribers, clears _state
    3. subscribe(handler) — subscribes to transformed data
    4. destroy() — unsubscribes subscribers, clears _state
    5. If the operator returns undefined, subscribers are not notified

    Error handling:

    • If operator.apply() throws an exception, onError is called.
    • With onError provided, the exception is suppressed, subscribers are not notified.
    • Without onError, the exception is rethrown.

    Configuration (ConvertTransferConfig):

    • operator: OperatorInterface<TInput, TOutput> — data transformer
    • onError?: ErrorHandler — error handler

    Difference from OperatorTransfer (old version):

    • The new version's push() automatically notifies subscribers
    • Has no trigger() — emission happens immediately on push()
    • Has no pull() — the result is not stored after emission

    Use cases:

    • Type transformation in a stream (e.g., string → number)
    • Filtering via GuardOperator (undefined blocks emission)
    • Real-time data mapping
    • Implementing TransformBridge

    Type Parameters

    • TInput
    • TOutput

    Hierarchy (View Summary)

    Implements

    Index
    isAsyncPollingProxy: boolean = false
    isAsyncPullable: boolean = false
    isAsyncPushable: boolean = false
    isAsyncTriggerable: boolean = false
    isDuplex: true
    isGate: boolean = false
    isInput: true
    isOutput: true
    isPollingProxy: boolean = false
    isPollingSource: boolean = false
    isPullable: boolean = false
    isPushable: true
    isSubscribable: true
    isTriggerable: boolean = false