Skip to main content

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#

NameType
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#

NameType
Textends Timer<Record<string, any>>

Parameters#

NameTypeDefault value
timersT[][]
callback(timer: T, index: number, timeout: TimeoutInstance) => voidundefined
optionsOptions{}

Returns#

Object

NameType
clear() => void
currentIndexnumber
durationnumber
durationCounternull | Timeout
finishedboolean
pause() => void
pausedboolean
start() => void
timeoutInstancesTimeoutInstance[]
timersT[]
totalDurationnumber

Defined in#

utils/TimeoutManager/index.ts:19