@mojojs/core
Preparing search index...
util
AsyncHooks
Class AsyncHooks
Async hook class.
Hierarchy (
View Summary
)
AsyncHooks
Hooks
Index
Constructors
constructor
Properties
_
hooks
Methods
_
prepare
Hook
add
Hook
remove
Hook
run
Hook
Constructors
constructor
new
AsyncHooks
()
:
AsyncHooks
Returns
AsyncHooks
Properties
_
hooks
_hooks
:
Record
<
string
,
Hook
[]
>
Methods
_
prepare
Hook
_prepareHook
(
chain
:
Hook
[]
)
:
(
...
args
:
any
[]
)
=>
Promise
<
any
>
Parameters
chain
:
Hook
[]
Returns
(
...
args
:
any
[]
)
=>
Promise
<
any
>
add
Hook
addHook
(
name
:
string
,
fn
:
Hook
)
:
void
Add hook.
Parameters
name
:
string
fn
:
Hook
Returns
void
remove
Hook
removeHook
(
name
:
string
,
fn
?:
Hook
)
:
void
Remove one or more hook handlers.
Parameters
name
:
string
Optional
fn
:
Hook
Returns
void
run
Hook
runHook
(
name
:
string
,
...
args
:
any
[]
)
:
Promise
<
any
>
Run hook.
Parameters
name
:
string
...
args
:
any
[]
Returns
Promise
<
any
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
_
hooks
Methods
_
prepare
Hook
add
Hook
remove
Hook
run
Hook
@mojojs/core
Loading...
Async hook class.