ArcadeExpressionReturnType enum

The expected type of the result calculated by an expression described within an ArcadeExpression.

Inheritance
Available extensions

Values

automatic → const ArcadeExpressionReturnType

The return type of the expression will be automatically determined based on the script calculation.

The return type is determined by the return value of the script. Different paths through the script might result in different result types. For example, depending on input values, it might return a number, a string, a date or an array.

number → const ArcadeExpressionReturnType

The return type is expected to be a floating-point number.

Arcade will convert the return type to a float64 via the following transformations:

  • booleans return 1 if true, 0 otherwise.
  • integral types are converted to float64. This may be a narrowing conversion.
  • float64 values are returned unchanged.
  • null is converted to 0.
  • strings are parsed as float64.
  • all other types are converted to NaN.
string → const ArcadeExpressionReturnType

The return type is expected to be a string.

Arcade will convert the return type to a string via the Arcade Text() function.

dictionary → const ArcadeExpressionReturnType

The return type is expected to be a dictionary of key/value pairs.

Arcade will convert the return type to a dictionary of key/value pairs via the following transformations:

  • dictionaries are returned unchanged.
  • all other types are converted to null.
any → const ArcadeExpressionReturnType

The return type is expected to be any of the other ArcadeExpressionReturnType types.

'any' implies that the application evaluating the expression will need to check the result for its type and use the value appropriately.

boolean → const ArcadeExpressionReturnType

The return type is expected to be a boolean value of true or false.

Arcade will convert the return type to a boolean via the following transformations:

  • booleans are returned unchanged.
  • numbers are true if not equal to 0 or NaN, false otherwise.
  • strings are true if a lower-case comparison is equal to 'true', false otherwise.
  • all other types are false.
date → const ArcadeExpressionReturnType

The return type is expected to be a DateTime value.

Arcade converts the return type to a DateTime via the following transformations:

  • DateTime objects are returned unchanged.
  • DateOnly objects are converted by assuming the time is midnight.
  • TimestampOffset objects are converted to match local time.
  • strings are parsed if they match the ISO 8601 format, YYYY-MM-DDTHH:MM:SS.
  • all other types are converted to null.
dateOnly → const ArcadeExpressionReturnType

The return type is expected to be a DateOnly value.

Arcade converts the return type to a DateOnly via the following transformations:

  • DateOnly objects are returned unchanged.
  • DateTime objects are converted by removing their time component.
  • TimestampOffset objects are converted by removing their time component and offset.
  • strings are parsed if they match the ISO 8601 format, YYYY-MM-DD.
  • all other types are converted to null.
timeOnly → const ArcadeExpressionReturnType

The return type is expected to be a TimeOnly value.

Arcade converts the return type to a TimeOnly via the following transformations:

  • TimeOnly objects are returned unchanged.
  • DateTime objects are converted by removing their date component.
  • TimestampOffset objects are converted by removing their date component and offset.
  • strings are parsed if they match the ISO 8601 format, HH:MM:SS.
  • all other types are converted to null.
timestampOffset → const ArcadeExpressionReturnType

The return type is expected to be a TimestampOffset value.

Arcade converts the return type to a TimestampOffset via the following transformations:

  • TimestampOffset objects are returned unchanged.
  • DateTime objects display their offset from UTC based on their timezone.
  • DateOnly objects are converted assuming the time is midnight with no offset from UTC.
  • strings are parsed if they match the ISO 8601 format, YYYY-MM-DDTHH:MM:SS[+/-]HH::MM.
  • all other types are converted to null.

Properties

coreValue → RT_ArcadeExpressionReturnType
no setter
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ArcadeExpressionReturnType>
A constant List of the values in this enum, in order of their declaration.