The class for creating generic records. This class should not be instantiated directly. Its compact method creates new compact generic records.

Hierarchy

  • GenericRecords

Constructors

Methods

Constructors

Methods

  • Static constructor method for compact generic records.

    Throws

    TypeError if a value is of wrong type according to fields

    Throws

    RangeError if a value is out of range of its type

    Returns

    A compact generic record

    Type Parameters

    • F extends {
          [name: string]: Field<any>;
      }

    Parameters

    • typeName: string

      Represents the type of the compact object, included in serialized form

    • fields: F

      Represents the field schema of the compact

    • values: { [ property in string | number | symbol]: F[property] extends Field<T> ? T : any }

      Values to use in the generic record. This should be in sync with fields

    Returns GenericRecord

Generated using TypeDoc