Interface ModelPropTransform<TOriginal, TTransformed>

A model prop transform.

interface ModelPropTransform<TOriginal, TTransformed> {
    transform(
        params: {
            cachedTransformedValue: undefined | TTransformed;
            originalValue: TOriginal;
            setOriginalValue(value: TOriginal): void;
        },
    ): TTransformed;
    untransform(
        params: {
            cacheTransformedValue: () => void;
            transformedValue: TTransformed;
        },
    ): TOriginal;
}

Type Parameters

  • TOriginal
  • TTransformed

Methods

  • Parameters

    • params: { cacheTransformedValue: () => void; transformedValue: TTransformed }

    Returns TOriginal