weasel API - v0.8.0
    Preparing search index...

    Interface BindingOpts

    Per-invocation options the dispatcher reads from a GestureBinding's opts field and passes to OngoingInvoker.start. Today carries behaviors; extensible.

    interface BindingOpts {
        behaviors?: ActionBehavior<unknown, unknown, unknown>[];
        params?: Record<string, unknown> | (() => Record<string, unknown>);
    }
    Index

    Properties

    Properties

    behaviors?: ActionBehavior<unknown, unknown, unknown>[]
    params?: Record<string, unknown> | (() => Record<string, unknown>)

    Per-binding action parameters. The action's invoker reads these via the second arg to run (or via InvocationCtx for ongoing invokers, when needed). Loose typing (Record<string, unknown>) for now; consider per-action typing later via BindingOpts.

    params may also be a thunk evaluated each time the dispatcher (or invoker) needs the value. Thunks let tools close over refs that mutate during a gesture (e.g. polygon sides adjusted mid-drag via ArrowUp). For ongoing invokers that want the latest values at commit, the invoker can re-call the thunk inside onEnd via resolveParams(opts?.params).