Type alias EffectConfiguration<Input, Result, Error>

EffectConfiguration<Input, Result, Error>: {
    eagerInputSubscription?: boolean;
    effectDebounceTime?: number;
    effectInputEquals?: ((a: Input, b: Input) => boolean);
    initialResultGetter?: (() => Result);
    nameExtension?: string;
    withTrigger?: boolean;
    wrappedEffectGetter?: ((effect: Effect<Input, Result, Error>) => Effect<Input, Result, Error>);
}

This type specifies the type of the argument to EffectSignalsBuild, hence the configuration of EffectSignals.

Type Parameters

  • Input

    specifies the input type for the effect

  • Result

    specifies the result type of the effect

  • Error

    specifies the error type of the effect

Type declaration

  • Optional eagerInputSubscription?: boolean

    Specifies whether the input behavior should be subscribed eagerly (defaults to false)

  • Optional effectDebounceTime?: number

    If defined and >0, then it will be used as milliseconds to debounce new input to the effect (please DON'T debounce the input signal yourself, because that would debounce before trigger and/or input equals!)

  • Optional effectInputEquals?: ((a: Input, b: Input) => boolean)
      • (a: Input, b: Input): boolean
      • Function used to determine whether a new input equals the previous one. Defaults to strict equals (a === b)

        Parameters

        • a: Input
        • b: Input

        Returns boolean

  • Optional initialResultGetter?: (() => Result)
      • (): Result
      • If defined, this function will be used to determine an initial result for the result behavior

        Returns Result

  • Optional nameExtension?: string

    Optional string to be used as argument to calls of getBehaviorId and getEventId

  • Optional withTrigger?: boolean

    Defaults to false. If true, the effect will only be performed in case a trigger event is received (else, whenever the input changes)

  • Optional wrappedEffectGetter?: ((effect: Effect<Input, Result, Error>) => Effect<Input, Result, Error>)
      • (effect: Effect<Input, Result, Error>): Effect<Input, Result, Error>
      • Function to wrap the effect defined by effectId with a custom Effect

        Parameters

        • effect: Effect<Input, Result, Error>

        Returns Effect<Input, Result, Error>

Generated using TypeDoc