Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "src/decorator/bluebird"

Index

Variables

Const bluebirdDecorator

bluebirdDecorator: function = DecoratorUtils.createDecorator([DecoratorUtils.declarationTypes.CLASS_METHOD,DecoratorUtils.declarationTypes.CLASS_ACCESSOR,DecoratorUtils.declarationTypes.OBJECT_LITERAL_METHOD,DecoratorUtils.declarationTypes.OBJECT_LITERAL_ACCESSOR], <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<(...args) => Bluebird<T>>) =>{let method = descriptor.value;descriptor.value = function (...args): Bluebird<T>{let self = this;//return returnValue instanceof Promise ? Bluebird.resolve(returnValue) : returnValue;return Bluebird.resolve().then(function (){return method.apply(self, args);});};return descriptor;}) as MethodDecorator

Type declaration

    • <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>): TypedPropertyDescriptor<T> | void
    • Type parameters

      • T

      Parameters

      • target: Object
      • propertyKey: string | symbol
      • descriptor: TypedPropertyDescriptor<T>

      Returns TypedPropertyDescriptor<T> | void

Functions

bluebirdDecorator2

  • bluebirdDecorator2<T>(target: any, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor
  • Type parameters

    • T

    Parameters

    • target: any
    • propertyKey: string
    • descriptor: PropertyDescriptor

    Returns PropertyDescriptor

Generated using TypeDoc