KofiLoop
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to interact inside of loop. Primary used as scope ('this' reference) in loop handlers.

use_reference

Never create the object yourself and always use reference.

Hierarchy

  • LoopSelf

Index

Accessors

deltaTime

deltaTime:

Time difference between last step initialization and last step end.

readonly

interval

interval:

Current loop interval.

readonly

isPending

isPending:

Boolean indicating if the loop is pending.

readonly

isStopped

isStopped:

Boolean indicating if the loop is stopped.

readonly

step

step:

Current loop step.

readonly

value

value:

Value of the loop step.

Methods

startLoop

  • startLoop(handler: Promise<any> | function, interval: number, ...args: any[]): LoopReturn
  • Start a subloop and pause current loop until the end of the subloop.

    see

    LoopSelf for handler scope ('this' reference).

    Parameters

    • handler: Promise<any> | function

      The function to loop

    • interval: number

      The interval in milliseconds

    • Rest ...args: any[]

      Some arguments to pass to function

    Returns LoopReturn

stop

  • stop(value?: any): void
  • Stop current loop.

    Parameters

    • Optional value: any

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc