Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IOptions<T, U, V>

Instantiation options for polls.

Type parameters

  • T

    The resolved type of the factory's promises.

  • U

    The rejected type of the factory's promises.

  • V: string

    The type to extend the phases supported by a poll.

Hierarchy

  • IOptions

Index

Properties

Optional auto

auto: undefined | false | true

Whether to begin polling automatically; defaults to true.

factory

factory: Factory<T, U, V>

A factory function that is passed a poll tick and returns a poll promise.

Optional frequency

frequency: Partial<Frequency>

The polling frequency parameters.

Optional name

name: undefined | string

The name of the poll. Defaults to 'unknown'.

Optional standby

standby: Standby | function

Indicates when the poll switches to standby or a function that returns a boolean or a Poll.Standby value to indicate whether to stand by. Defaults to 'when-hidden'.

Notes

If a function is passed in, for any given context, it should be idempotent and safe to call multiple times. It will be called before each tick execution, but may be called by clients as well.

Generated using TypeDoc