functional-models
    Preparing search index...

    Function SingleTypeArrayProperty

    • A property that is an array, but only of a single value type. This is an ArrayProperty but with a validator for the type.

      Type Parameters

      Parameters

      • valueType: TValue

        The type. (Only supports primitive data types, no objects)

      • config: {} = {}
      • additionalMetadata: {} = {}

      Returns Readonly<
          {
              createGetter: (
                  value: readonly TValue[],
                  modelData: Readonly,
                  modelInstance: ModelInstance<
                      Readonly<{ [s: string]: any }>,
                      object,
                      object,
                  >,
              ) => ValueGetter<
                  readonly TValue[],
                  Readonly<{ [s: string]: any }>,
                  object,
                  object,
              >;
              getChoices: () => readonly ChoiceTypes[];
              getConfig: () => object;
              getConstantValue: () => undefined | readonly TValue[];
              getDefaultValue: () => undefined | readonly TValue[];
              getPropertyType: () => string;
              getValidator: (
                  valueGetter: ValueGetter<
                      readonly TValue[],
                      Readonly<{ [s: string]: any }>,
                      object,
                      object,
                  >,
              ) => PropertyValidator<Readonly<{ [s: string]: any }>>;
          },
      >