utils_TimeoutManager
perfect-graph / Modules / utils/TimeoutManager
#
Module: utils/TimeoutManager#
Table of contents#
References#
Type aliases#
Functions#
References#
TimeoutRe-exports Timeout
#
TimeoutInstanceRe-exports TimeoutInstance
#
Type aliases#
OptionsƬ Options: Object
#
Type declarationName | Type |
---|---|
autostart? | boolean |
onFinish? | () => void |
onPlayChanged? | () => void |
#
Defined inutils/TimeoutManager/index.ts:14
#
TimeoutManagerƬ TimeoutManager: ReturnType
<typeof createTimeoutManager
>
#
Defined inutils/TimeoutManager/index.ts:110
#
TimerƬ Timer<T
>: { after
: number
} & T
#
Type parametersName |
---|
T |
#
Defined inutils/TimeoutManager/index.ts:6
#
Functions#
createTimeoutManagerâ–¸ Const
createTimeoutManager<T
>(timers?
, callback
, options?
): Object
#
Type parametersName | Type |
---|---|
T | extends Timer <Record <string , any >> |
#
ParametersName | Type | Default value |
---|---|---|
timers | T [] | [] |
callback | (timer : T , index : number , timeout : TimeoutInstance ) => void | undefined |
options | Options | {} |
#
ReturnsObject
Name | Type |
---|---|
clear | () => void |
currentIndex | number |
duration | number |
durationCounter | null | Timeout |
finished | boolean |
pause | () => void |
paused | boolean |
start | () => void |
timeoutInstances | TimeoutInstance [] |
timers | T [] |
totalDuration | number |