utils_TimeoutManager
perfect-graph / Modules / utils/TimeoutManager
Module: utils/TimeoutManager#
Table of contents#
References#
Type aliases#
Functions#
References#
Timeout#
Re-exports Timeout
TimeoutInstance#
Re-exports TimeoutInstance
Type aliases#
Options#
Ƭ Options: Object
Type declaration#
| Name | Type |
|---|---|
autostart? | boolean |
onFinish? | () => void |
onPlayChanged? | () => void |
Defined in#
utils/TimeoutManager/index.ts:14
TimeoutManager#
Ƭ TimeoutManager: ReturnType<typeof createTimeoutManager>
Defined in#
utils/TimeoutManager/index.ts:110
Timer#
Ƭ Timer<T>: { after: number } & T
Type parameters#
| Name |
|---|
T |
Defined in#
utils/TimeoutManager/index.ts:6
Functions#
createTimeoutManager#
â–¸ Const createTimeoutManager<T>(timers?, callback, options?): Object
Type parameters#
| Name | Type |
|---|---|
T | extends Timer<Record<string, any>> |
Parameters#
| Name | Type | Default value |
|---|---|---|
timers | T[] | [] |
callback | (timer: T, index: number, timeout: TimeoutInstance) => void | undefined |
options | Options | {} |
Returns#
Object
| 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 |