IntExpression class
Represents a property which is either a int or a string expression which resolves to a int.
- Extends
-
ExpressionProperty<number>
Remarks
String values are always interpreted as an expression, whether it has '=' prefix or not.
Constructors
Int |
Initializes a new instance of the IntExpression class. |
Inherited Properties
expression |
Getes or sets the expression text to evaluate to get the value. |
value | Gets or sets the raw value of the expression property. |
Methods
set |
Set an integer value. |
try |
Try to get the value. |
Inherited Methods
get |
Get the value. |
to |
This will return the existing expression if the value is non-complex type. |
to |
Convert an expression property to string. |
Constructor Details
IntExpression(number | string | Expression)
Initializes a new instance of the IntExpression class.
new IntExpression(value?: number | string | Expression)
Parameters
- value
-
number | string | Expression
An int number
or string
expression which resolves to an int number
.
Inherited Property Details
expressionText
Getes or sets the expression text to evaluate to get the value.
expressionText: string
Property Value
string
Inherited From ExpressionProperty.expressionText
value
Gets or sets the raw value of the expression property.
value: number
Property Value
number
Inherited From ExpressionProperty.value
Method Details
setValue(number | string | Expression)
Set an integer value.
function setValue(value: number | string | Expression)
Parameters
- value
-
number | string | Expression
Value to set.
tryGetValue(object)
Try to get the value.
function tryGetValue(data: object): { error: Error, value: number }
Parameters
- data
-
object
Data to use for expression binding.
Returns
{ error: Error, value: number }
Value of int number
Inherited Method Details
getValue(object)
Get the value.
function getValue(data: object): number
Parameters
- data
-
object
Data to use for expression binding.
Returns
number
The value.
Remarks
An error will be thrown if value is an invalid expression.
Inherited From ExpressionProperty.getValue
toExpression()
This will return the existing expression if the value is non-complex type.
function toExpression(): Expression
Returns
The existing expression if the value is non-complex type.
Inherited From ExpressionProperty.toExpression
toString()
Convert an expression property to string.
function toString(): string
Returns
string
The converted string.
Inherited From ExpressionProperty.toString