Class OperationCounter

Provides a way to track the progress of running operations.

Hierarchy

Implements

Constructors

  • Returns OperationCounter

Properties

_completed: number
_operations: number
_total: number

Accessors

  • get loading(): boolean
  • Gets whether at least one operation is being executed.

    Returns boolean

  • get progress(): number
  • Returns a number between 0 and 1 which represent the ratio between completed operations and total operations.

    Returns number

Methods

  • Adds a listener to an event type.

    Type Parameters

    • T extends "complete"

    Parameters

    Returns void

  • Type Parameters

    • T extends string

    Parameters

    Returns void

  • Decrements the number of pending operations.

    Returns void

  • Fire an event type.

    Type Parameters

    • T extends "complete"

    Parameters

    Returns void

  • Checks if listener is added to an event type.

    Type Parameters

    • T extends "complete"

    Parameters

    Returns boolean

  • Type Parameters

    • T extends string

    Parameters

    Returns boolean

  • Increment the number of pending operations.

    Returns void

  • Removes a listener from an event type.

    Type Parameters

    • T extends "complete"

    Parameters

    Returns void

  • Type Parameters

    • T extends string

    Parameters

    Returns void

Generated using TypeDoc