Constructor
new Hook()
- Source:
Members
hasObservers
- Description:
- Whether this hook has any observer functions
- Source:
Whether this hook has any observer functions
(static) Types :Object
- Description:
- Source:
Properties:
Name |
Type |
Description |
Parallel |
String
|
|
Series |
String
|
|
Types of supported Hook
Type:
Methods
(async) invoke(…args) → {Promise}
- Description:
- Source:
Parameters:
Name |
Type |
Attributes |
Description |
args |
*
|
<repeatable>
|
Arguments to be passed to observers |
Returns:
-
Type
-
Promise
onInvoke()
- Description:
- Returns a promise which is resolved when the hook is successfully invoked. If hook fails, the promise is rejected with the error
- Source:
Returns:
Promise
tap(observer)
- Description:
- Adds an observer to the hook
- Source:
Parameters:
Name |
Type |
Description |
observer |
function
|
Callback to be called when the hook is invoked |
untap(observer)
- Description:
- Removes an observer from the hook
- Source:
Parameters:
Name |
Type |
Description |
observer |
function
|
|