functional-models
    Preparing search index...

    Type Alias CalculateDenormalization<TValue, TData, TModelExtensions, TModelInstanceExtensions>

    CalculateDenormalization: (
        modelData: CreateParams<TData>,
        modelInstance: ModelInstance<
            TData,
            TModelExtensions,
            TModelInstanceExtensions,
        >,
    ) => MaybePromise<TValue | undefined>

    A function that can calculate a denormalized value. This is very useful for property values that have very complicated and often expensive calculations (but should be calculated once). NOTE: The data that comes in (to be normalized) via the modelData, is the raw data passed into create(). If other functions must fire to create values, they will not be present. Example: Foreign keys.

    Type Parameters

    • TValue extends DataValue
    • TData extends DataDescription
    • TModelExtensions extends object = object
    • TModelInstanceExtensions extends object = object

    Type declaration