Class: CalculableResult
@react-form-builder/core.CalculableResult
Calculable result.
Constructors
constructor
• new CalculableResult(error?
, result?
, exceptions?
)
Constructor.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
error | boolean | false | the error. |
result? | any | undefined | the result. |
exceptions? | Error [] | undefined | the 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
Name | Type | Description |
---|---|---|
exceptions | Error [] | the exception array. |
Returns
the new instance of CalculableResult class.
success
▸ Static
success(result
): CalculableResult
Creates a new instance of the CalculableResult class with a successful result.
Parameters
Name | Type | Description |
---|---|---|
result | any | the calculable result. |
Returns
the new instance of CalculableResult class.