Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • GenericRecords

Index

Constructors

Methods

Constructors

Methods

  • compact<F>(typeName: string, fields: F, values: { [ property in string | number | symbol]: F[property] extends Field<T> ? T : any }): GenericRecord
  • 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

    Type Parameters

    • F extends {}

    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

    A compact generic record

Generated using TypeDoc