PromiseService Class
Creates an instance of promise-based service object based on original service
Constructor
PromiseService
(
-
originalService
Parameters:
-
originalService
Objectthe service which should be converted into promise-based version (e.g. ContentService)
Item Index
Methods
_generateMappedFunction
(
Function
private
-
originalFunction
Generate a new function, that if called assured this
is mapped to
the original service.
Parameters:
-
originalFunction
Function
Returns:
Function:
_generatePromiseFunction
(
Function
private
-
originalFunction
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: