Interface InteractionBinderBuilder<I, A, D>

The binding builder API that already knows the type of user interaction the bindings will use

interface InteractionBinderBuilder {
    catch(fn): InteractionBinderBuilder<I, A, D>;
    configureRules(ruleName, severity): InteractionBinderBuilder<I, A, D>;
    end(fn): InteractionBinderBuilder<I, A, D>;
    log(...level): InteractionBinderBuilder<I, A, D>;
    name(name): InteractionBinderBuilder<I, A, D>;
    on<W>(widget, ...widgets): InteractionBinderBuilder<I, A, D>;
    onDynamic(node): InteractionBinderBuilder<I, A, D>;
    preventDefault(): InteractionBinderBuilder<I, A, D>;
    stopImmediatePropagation(): InteractionBinderBuilder<I, A, D>;
    when(fn, mode?): InteractionBinderBuilder<I, A, D>;
}

Type Parameters

Hierarchy

Methods

  • Allows the processing of errors during the execution of the binding. Errors reported here are errors thrown in arrow functions provided to the the different routines of the binder and errors triggered by the command. A binder can have several cummulative 'catch' routines.

    Parameters

    • fn: ((ex) => void)

      The function to process the error caught by the binding during its execution

        • (ex): void
        • Parameters

          • ex: unknown

          Returns void

    Returns InteractionBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

  • Specifies the widgets on which the binding will operate. When a widget is added to this list, this widget is binded to this binding. When widget is removed from this list, this widget is unbinded from this binding.

    Type Parameters

    • W

    Parameters

    • widget: Widget<W> | readonly Widget<W>[]

      The mandatory first widget

    • Rest ...widgets: readonly Widget<W>[]

      The list of the widgets involved in the bindings.

    Returns InteractionBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

  • Specifies the conditions to fulfill to initialise, update, or execute the command while the interaction is running. A binder can have several cummulative 'when' routines.

    Parameters

    • fn: ((i, acc) => boolean)

      The predicate that checks whether the command can be initialised, updated, or executed. This predicate takes as arguments the data of the ongoing user interaction involved in the binding.

        • (i, acc): boolean
        • Parameters

          • i: D
          • acc: Readonly<A>

          Returns boolean

    • Optional mode: WhenType

    Returns InteractionBinderBuilder<I, A, D>

    A clone of the current binder to chain the building configuration.

Generated using TypeDoc