Class AnonBinding<C, I, A, D>

A special implementation of a binding to be used in binders.

Type Parameters

  • C extends Command

    The type of the command that will produce this binding.

  • I extends Interaction<D>

    The type of the interaction that will use this binding.

  • A

    The type of the accumulator.

  • D extends InteractionData = InteractionDataType<I>

    The interaction data type (infered from the interaction type)

Hierarchy

Constructors

  • Type Parameters

    Parameters

    • continuousExec: boolean
    • interaction: I
    • undoHistory: UndoHistoryBase
    • logger: Logger
    • cmdSupplierFn: ((d) => C)
        • (d): C
        • Parameters

          • d: undefined | D

          Returns C

    • widgets: readonly unknown[]
    • dynamicNodes: readonly Node[]
    • loggers: readonly LogLevel[]
    • timeoutThrottle: number
    • stopPropagation: boolean
    • prevDefault: boolean
    • linterRules: ReadonlyMap<RuleName, Severity>
    • Optional firstFn: ((c, i, acc) => void)
        • (c, i, acc): void
        • Parameters

          • c: C
          • i: D
          • acc: A

          Returns void

    • Optional thenFn: ((c, i, acc) => void)
        • (c, i, acc): void
        • Parameters

          • c: C
          • i: D
          • acc: A

          Returns void

    • Optional whenFn: When<D, A>[]
    • Optional endFn: ((c, i, acc) => void)
        • (c, i, acc): void
        • Parameters

          • c: C
          • i: D
          • acc: A

          Returns void

    • Optional cancelFn: ((i, acc) => void)
        • (i, acc): void
        • Parameters

          • i: D
          • acc: A

          Returns void

    • Optional endOrCancelFn: ((i, acc) => void)
        • (i, acc): void
        • Parameters

          • i: D
          • acc: A

          Returns void

    • Optional hadEffectsFn: ((c, i, acc) => void)
        • (c, i, acc): void
        • Parameters

          • c: C
          • i: D
          • acc: A

          Returns void

    • Optional hadNoEffectFn: ((c, i, acc) => void)
        • (c, i, acc): void
        • Parameters

          • c: C
          • i: D
          • acc: A

          Returns void

    • Optional cannotExecFn: ((c, i, acc) => void)
        • (c, i, acc): void
        • Parameters

          • c: C
          • i: D
          • acc: A

          Returns void

    • Optional onErrFn: ((ex) => void)
        • (ex): void
        • Parameters

          • ex: unknown

          Returns void

    • Optional name: string
    • Optional accInit: A

    Returns AnonBinding<C, I, A, D>

Properties

_activated: boolean
_cmd: undefined | C

The current action in progress.

_interaction: I

The source interaction.

_name: undefined | string
_timeCancelled: number
_timeEnded: number
accumulator: A

The accumulator used during the binding.

accumulatorInit: undefined | A
cancelFn: undefined | ((i, acc) => void)

Type declaration

    • (i, acc): void
    • Parameters

      • i: D
      • acc: A

      Returns void

cannotExecFn: undefined | ((c, i, acc) => void)

Type declaration

    • (c, i, acc): void
    • Parameters

      • c: C
      • i: D
      • acc: A

      Returns void

cmdProducer: ((i?) => C)

Type declaration

    • (i?): C
    • The command class to instantiate.

      Parameters

      • Optional i: D

      Returns C

cmdsProduced: Subject<C>
continuousCmdExecution: boolean

States whether the command must be executed on each step of the interaction (and not only at the end of the interaction execution).

endOrCancelFn: undefined | ((i, acc) => void)

Type declaration

    • (i, acc): void
    • Parameters

      • i: D
      • acc: A

      Returns void

firstFn: undefined | ((c, i, acc) => void)

Type declaration

    • (c, i, acc): void
    • Parameters

      • c: C
      • i: D
      • acc: A

      Returns void

hadEffectsFn: undefined | ((c, i, acc) => void)

Type declaration

    • (c, i, acc): void
    • Parameters

      • c: C
      • i: D
      • acc: A

      Returns void

hadNoEffectFn: undefined | ((c, i, acc) => void)

Type declaration

    • (c, i, acc): void
    • Parameters

      • c: C
      • i: D
      • acc: A

      Returns void

linterRules: ReadonlyMap<RuleName, Severity>

The linter rules specific to this binding.

logBinding: boolean

Logs (or not) binding execution information.

logCmd: boolean

Logs binding usage information, to perform data analysis on usage

logUsage: boolean

Logs (or not) usage information of the binding for usage analysis

logger: Logger
onEndFn: undefined | ((c, i, acc) => void)

Type declaration

    • (c, i, acc): void
    • Parameters

      • c: C
      • i: D
      • acc: A

      Returns void

onErrFn: undefined | ((ex) => void)

Type declaration

    • (ex): void
    • Parameters

      • ex: unknown

      Returns void

thenFn: undefined | ((c, i, acc) => void)

Type declaration

    • (c, i, acc): void
    • Parameters

      • c: C
      • i: D
      • acc: A

      Returns void

undoHistory: UndoHistoryBase
whenFn: undefined | When<D, A>[]

Accessors

  • get activated(): boolean
  • States whether the binding is activated.

    Returns boolean

  • set activated(activated): void
  • States whether the binding is activated.

    Parameters

    • activated: boolean

    Returns void

  • get command(): undefined | C
  • The command in progress or null.

    Returns undefined | C

  • get produces(): Observable<C>
  • An RX observable objects that will provide the commands produced by the binding.

    Returns Observable<C>

  • get timesCancelled(): number
  • Information method. The number of times the binding was cancelled (nevermind a command was created or not).

    Returns number

  • get timesEnded(): number
  • Information method.

    Returns number

    The number of times the binding successfully ended (nevermind a command was created or not).

Methods

  • creates the command of the binding. If the attribute 'cmd' is not null, nothing will be done.

    Returns undefined | C

    The created command or undefined if an error occurred

  • Parameters

    • filterPredicate: ((when) => boolean)
        • (when): boolean
        • Parameters

          Returns boolean

    Returns boolean

Generated using TypeDoc