API Docs for: 1.5.0
Show:

PromiseService Class

Creates an instance of promise-based service object based on original service

Constructor

PromiseService

(
  • originalService
)

Parameters:

  • originalService Object

    the service which should be converted into promise-based version (e.g. ContentService)

Methods

_generateMappedFunction

(
  • originalFunction
)
Function private

Generate a new function, that if called assured this is mapped to the original service.

Parameters:

  • originalFunction Function

Returns:

Function:

_generatePromiseFunction

(
  • originalFunction
)
Function private

Generate a promise version of the given function

The execution is mapped to the originalService in order to preserve all internal state manipulations.

Parameters:

  • originalFunction Object

Returns:

Function: