Skip to content

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 Parameter
T extends BindingsRecord
ParameterType
bindingsT

T