Function preFunctionDecoratorFactory

  • preFunctionDecoratorFactory function helps creates a decorator that saves the metadata of Pre type decorator.

    Type Parameters

    • This

      The type of the class the decorator is applied to.

    Parameters

    • name: string

      Name of the 'Pre' type decorator. *

    • func: PrePostFunction<This>

      Function that will be executed before the property or class has been processed, that receive the instance and cursor value as argument.

    • Optionalopt: Partial<PrePostOptions> = PrePostOptionsDefault

      Optional configution.

    Returns ClassAndPropertyDecoratorType<This>

    The class or property decorator function.