Interface KeyInteractionBinderBuilder<I, A, D>

The binding builder API for key-based user interactions, that already knows the type of user interaction the bindings will use.

interface KeyInteractionBinderBuilder {
    catch(fn): KeyInteractionBinderBuilder<I, A, D>;
    configureRules(ruleName, severity): KeyInteractionBinderBuilder<I, A, D>;
    end(fn): KeyInteractionBinderBuilder<I, A, D>;
    log(...level): KeyInteractionBinderBuilder<I, A, D>;
    name(name): KeyInteractionBinderBuilder<I, A, D>;
    on<W>(widget, ...widgets): KeyInteractionBinderBuilder<I, A, D>;
    onDynamic(node): KeyInteractionBinderBuilder<I, A, D>;
    preventDefault(): KeyInteractionBinderBuilder<I, A, D>;
    stopImmediatePropagation(): KeyInteractionBinderBuilder<I, A, D>;
    when(fn, mode?): KeyInteractionBinderBuilder<I, A, D>;
    with(isCode, ...keysOrCodes): KeyInteractionBinderBuilder<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 KeyInteractionBinderBuilder<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 KeyInteractionBinderBuilder<I, A, D>

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

Generated using TypeDoc