functional-models
    Preparing search index...

    Function ConstantValueProperty

    • A property that has a fixed value that can never be changed. Can be useful for things like embedding the name of a model into JSONified objects.

      Type Parameters

      Parameters

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