outputBinding
function
Creates an output binding.
outputBinding
Binding
Creates an output binding.
@parameventName
string
Public name of the output to listen to.
@paramlistener
(event: T) => unknown
Function to be called when the output emits.
Usage example
In this example we create an instance of the MyCheckbox
component and listen
to its onChange
event.
interface CheckboxChange {value: string;}createComponent(MyCheckbox, {bindings: [outputBinding<CheckboxChange>('onChange', event => console.log(event.value))],});
@returns
Binding
Jump to details