Function transformerDecoratorFactory

  • transformerDecoratorFactory is a utility function used to create Transformer type property decorators, used to transform the value of a property.

    Type Parameters

    • This

      The type of the class the decorator is applied to.

    • Value

      The type of the decorated property.

    Parameters

    • name: string

      The name of the 'Transformer' type decorator.

    • func: TransformerFunction<This>

      The function to execute as part of the transformation process.

    • Optionalopt: Partial<TransformerOptions> = TransformerOptionsDefault

      Optional configuration.

    Returns DecoratorType<This, Value>

    The property decorator function.

    Use this factory function to design custom 'Transformer' type decorators tailored to specific data format requirements that are not supported by the library yet.