Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

DeferredPromise

  • DeferredPromise<T>(): ITuple3<Promise<T>, (v: T) => void, (e: Error) => void>
  • Creates a Promise whose resolve and reject implementations are not yet provided.

    Type parameters

    • T

    Returns ITuple3<Promise<T>, (v: T) => void, (e: Error) => void>

    Array A triplet with [Promise, resolve(T), reject()]

timeoutPromise

withTimeout

  • withTimeout<T>(p: Promise<T>, millis: Millisecond, timeoutP?: (_: Millisecond) => Promise<void>): Promise<Either<"timeout", T>>
  • Wraps a Promise with a timeout, resolves to Left<"timeout"> on timeout or Right on completion.

    Type parameters

    • T

    Parameters

    Returns Promise<Either<"timeout", T>>

Legend

  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Interface
  • Interface with type parameter
  • Enumeration
  • Class with type parameter

Generated using TypeDoc