Constructors
constructor
- new Job<T>(job: (() => Promise<T>), interval: number): Job<T>
-
Parameters
-
job: (() => Promise<T>)
-
- (): Promise<T>
-
Returns Promise<T>
-
interval: number
Returns Job<T>
Properties
Private
_active
_active: boolean = false
Private
_id
_id: undefined | Timer
Private
Readonly
_interval
_interval: number
Private
Readonly
_job
_job: (() => Promise<T>)
Type declaration
-
- (): Promise<T>
-
Returns Promise<T>
Methods
Private
callJobAfterTimeout
- callJobAfterTimeout(): Promise<void>
-
Returns Promise<void>
Private
run
- run(): Promise<void>
-
Returns Promise<void>
start
- start(): Promise<void>
-
Returns Promise<void>
stop
- stop(): void
-
Returns void