Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Class: CalculableResult

@react-form-builder/core.CalculableResult

Calculable result.

Constructors

constructor

new CalculableResult(error?, result?, exceptions?)

Constructor.

Parameters

NameTypeDefault valueDescription
errorbooleanfalsethe error.
result?anyundefinedthe result.
exceptions?Error[]undefinedthe exceptions.

Properties

error

Readonly error: boolean = false

the error.


exceptions

Optional Readonly exceptions: Error[]

the exceptions.


result

Optional Readonly result: any

the result.

Methods

error

Static error(exceptions): CalculableResult

Creates a new instance of CalculableResult class with an error.

Parameters

NameTypeDescription
exceptionsError[]the exception array.

Returns

CalculableResult

the new instance of CalculableResult class.


success

Static success(result): CalculableResult

Creates a new instance of the CalculableResult class with a successful result.

Parameters

NameTypeDescription
resultanythe calculable result.

Returns

CalculableResult

the new instance of CalculableResult class.