Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Timeout

Call a function after a certain time has passed. Uses the window.setTimeout().

Hierarchy

  • Timeout

Index

Constructors

Properties

Methods

Constructors

constructor

  • Returns Timeout

Properties

id

id: number

is_active

is_active: boolean

Methods

clear

  • clear(): void
  • Cancels the timeout.

    Returns void

start

  • start(functionToCall: Function, interval: number): void
  • Starts the timeout. If there was an active timeout already, that one is canceled.

    Throws an Error exception if:

    • functionToCall isn't a function.
    • interval isn't a number.

    Parameters

    • functionToCall: Function
    • interval: number

    Returns void

Generated using TypeDoc