Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FieldUtils

Utility functions for fields.

Hierarchy

  • FieldUtils

Index

Methods

Methods

Static configure

  • Produces the metadata for a field based on the field configuration, and firestorm configuration.

    Type parameters

    • T

    Parameters

    • fieldConfig: IFieldConfig

      The field configuration specified in the decorator.

    • property: string

      The name of the class field property.

    • type: T

      The type of the field.

    • fieldType: FieldTypes

    Returns IFieldMeta

    The configured field.

Static process

  • process<T>(isArray: boolean, fieldValue: T | T[], processSingle: function): any
  • Utility for running a processor function on a field value or array of values.

    Type parameters

    • T

    Parameters

    • isArray: boolean

      Whether the field is configured to have array values.

    • fieldValue: T | T[]

      The value(s) for the field.

    • processSingle: function

      Process a single value.

        • (singleValue: T, ...values: any): any
        • Parameters

          • singleValue: T
          • Rest ...values: any

          Returns any

    Returns any

Generated using TypeDoc