then()
Transforms the bound value to either one of the specified values (or undefined).
then<U, V>(trueValue: U, falseValue: V): Binding<U | V>;
then<U>(trueValue: U): Binding<U | undefined>;
Summary
This method can be used to substitute the bound value with one of the specified values, depending on whether the bound value is equal to true according to the == operator.
Parameters
- trueValue — The value to use if the bound value is equal to true
- falseValue — The value to use if the bound value is equal to false
Return value
A new binding, typed as the new value or undefined
Related
class Binding
A class that represents a property binding.
