RSX Code Reference
    Preparing search index...

    Class Enum

    The Enum class implements the base class for an enumerable value collection.

    Index
    • Parameters

      • do_not_: undefined
      • construct_: undefined
      • this_: undefined
      • type_: undefined

      Returns Enum

    isEnum: true
    • Takes an array of enum values and combines them as a single enum flag value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

      Type Parameters

      • TEnum extends typeof Enum

      Parameters

      • this: TEnum
      • values: readonly EnumValueTyped<TEnum["prototype"], number>[]

        The array of values to be combined using bitwise-or operator.

      Returns EnumValueTyped<TEnum["prototype"]>

      The combined enum value.

    • Returns string[]

      Compatibility

    • Parameters

      • index: number

      Returns number

      Compatibility

    • Returns number[]

      Compatibility

    • Gets the enumeration value at the specified index.

      Type Parameters

      • TEnum extends typeof Enum

      Parameters

      • this: TEnum
      • index: number

        The index.

      Returns EnumValueTyped<TEnum["prototype"], number>

      The enumeration value or undefined if not found.

    • Takes a single enum value and splits it into separated flag values set on the value. This assumes that the target enum is a flag enum that can have their values combined using bitwise operators.

      Type Parameters

      • TEnum extends typeof Enum

      Parameters

      • this: TEnum
      • value: EnumValueTyped<TEnum["prototype"]>

        The enum value to have it's value split using bitwise-and operator.

      Returns EnumValueTyped<TEnum["prototype"], number>[]

      An array of each "bit flag" set in the enum.