Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "conditional"

Index

Functions

Functions

conditional

  • Apply decorator on a class if test is true

    Parameters

    Returns ClassDecorator

  • Apply decorator on a class if test function returns true

    Parameters

    • test: function

      function which receives a target class itself as an argument and returns boolean value

        • (clazz?: Function): boolean
        • Parameters

          • Optional clazz: Function

          Returns boolean

    • decorator: ClassDecorator

    Returns ClassDecorator

  • Apply decorator on a property if test is true

    Parameters

    Returns PropertyDecorator

  • Apply decorator on a property if test function returns true

    Parameters

    • test: function

      function which receives a class' prototype and property name as arguments and returns boolean value

        • (target?: Object, key?: string | symbol): boolean
        • Parameters

          • Optional target: Object
          • Optional key: string | symbol

          Returns boolean

    • decorator: PropertyDecorator

    Returns PropertyDecorator

  • Apply decorator on a method parameter if test is true

    Parameters

    Returns ParameterDecorator

  • Apply decorator on a method parameter if test function returns true

    Parameters

    • test: function

      function which receives a class' prototype, property name and parameter position as arguments and returns boolean value

        • (target?: Object, key?: string | symbol, index?: number): boolean
        • Parameters

          • Optional target: Object
          • Optional key: string | symbol
          • Optional index: number

          Returns boolean

    • decorator: ParameterDecorator

    Returns ParameterDecorator

  • Apply decorator on a method (which includes property accessor) if test is true

    Parameters

    Returns MethodDecorator

  • Apply decorator on a method (which includes property accessor) if test function returns true

    Parameters

    • test: function

      function which receives a class' prototype, method name and property descriptor as arguments and returns boolean value

        • (target?: Object, key?: string | symbol, desc?: PropertyDescriptor): boolean
        • Parameters

          • Optional target: Object
          • Optional key: string | symbol
          • Optional desc: PropertyDescriptor

          Returns boolean

    • decorator: MethodDecorator

    Returns MethodDecorator

Generated using TypeDoc