Represents a scalar kind with numeric functionality. This class extends the ScalarKind class.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

Properties

maxBytes?: number

Optional parameter that specifies the maximum number of bytes that numeric data can occupy when encoded.

Methods

  • Encodes the input data into numeric format and ensures it doesn't exceed the maximum bytes, if specified.

    Parameters

    • data: Input

      The data to encode, expected to be numeric.

    • context: string

      Descriptive context for error messages

    Returns DataOutput

    DataOutput object with an encode function.

    Will throw an error if data validation fails or encoding issues occur.