Class CLTypeList

Represents a List type in the Casper type system. This class implements the CLType interface specifically for List types, allowing lists of elements with a specified type.

Hierarchy

  • CLTypeList

Implements

Constructors

Properties

elementsType: CLType

The type of elements contained in the list.

Methods

  • Converts the CLTypeList instance to its byte representation. This includes the type ID for List followed by the byte representation of the element type.

    Returns

    A Uint8Array representing the CLTypeList.

    Returns Uint8Array

  • Converts the CLTypeList to a JSON-compatible representation. The JSON object contains a single key-value pair, where the key is "List" and the value is the JSON representation of the element type.

    Returns

    A JSON object representing the list type and its element type.

    Returns {
        [key: string]: CLType;
    }

  • Creates a CLTypeList instance from a JSON representation.

    Returns

    A new CLTypeList instance with the parsed element type.

    Parameters

    • source: any

      The JSON representation of the CLTypeList.

    Returns CLTypeList

Generated using TypeDoc