ConditionalBooleanValue Class

Class used to return a boolean value. The boolean value is refreshed by using the specified function. The syncEventIds define one or more eventIds that would require the testFunc to be rerun.


Name Description
constructor(testFunc: () => boolean, syncEventIds: string[], value?: false | true): ConditionalBooleanValue Constructor for ConditionalBooleanValue.  
refresh(): boolean Called to update the value by running the testFunc  
getValue(conditionalValue: ConditionalBooleanValue | boolean | undefined): boolean Static helper function to get boolean from a ConditionalBooleanValue | boolean | undefined  
refreshValue(conditionalValue: ConditionalBooleanValue | boolean | undefined, eventIds: Set<string>): boolean Static helper function to process properties defined as type ConditionalBooleanValue | boolean | undefined  


Name Type Description
syncEventIds ConstructorProperty string[] An array of eventId that should be monitored to determine when to run the refresh method.  
testFunc ConstructorProperty () => boolean Function to run to retrieve the value for the conditional.  
value Accessor ReadOnly boolean The current boolean value of the conditional.  

Defined in

Last Updated: 15 June, 2021