defineBindings
defineBindings<
T>(bindings):T
Defined in: bindings.ts:23
Declare an app’s bindings: ids mapped to event maps, flat or machine-rooted.
Returns its argument unchanged; it exists so the exact ids and events are
inferred, which Register then uses to type useBoundActions (ADR 0021).
export const appBindings = defineBindings({ 'todo.add': { onClick: [['action/push', ['todos'], 'event/arg']] },});Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends BindingsRecord |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
bindings | T |
Returns
Section titled “Returns”T