Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Interval

Hierarchy

  • Interval

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

active

active: boolean

Optional baseline

baseline: undefined | number

Optional timer

timer: NodeJS.Timeout

Methods

run

  • run(fn: (...args: any[]) => void, duration: number, initial?: boolean): Timeout
  • since

    0.1.0 Created function

    since

    0.3.0 Added initial param

    Start and run the interval

    Parameters

    • fn: (...args: any[]) => void

      The function to run

        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • duration: number

      The duration between each function run

    • Default value initial: boolean = false

      Whether to run the given function immediately or wait the x milliseconds before running it the first time

    Returns Timeout

stop

  • stop(): void
  • since

    0.1.0 Created function

    Stop the interval

    Returns void

Generated using TypeDoc