Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Completion<T>

A completion object that emits completion notifications either succeeded or failed.

Type parameters

  • T

Hierarchy

Index

Methods

await

  • await(): void
  • await(timeoutMillis: number): void
  • Cause the current thread to wait until this completion completes.

    If the current thread is interrupted, an exception will be thrown.

    Returns void

  • Cause the current thread to wait until this completion completes with a configurable timeout.

    If completion times out or the current thread is interrupted, an exception will be thrown.

    Parameters

    • timeoutMillis: number

    Returns void

awaitSuccess

  • awaitSuccess(): void
  • awaitSuccess(timeoutMillis: number): void
  • Cause the current thread to wait until this completion completes and succeeds.

    If the current thread is interrupted or the suite fails, an exception will be thrown.

    Returns void

  • Cause the current thread to wait until this completion completes and succeeds with a configurable timeout.

    If completion times out or the current thread is interrupted or the suite fails, an exception will be thrown.

    Parameters

    • timeoutMillis: number

    Returns void

handler

  • handler(): PromiseLike<T>
  • handler(completionHandler: ((res: AsyncResult<T>) => void) | Handler<AsyncResult<T>>): void
  • Completion handler to receive a completion signal when this completions completes.

    Returns PromiseLike<T>

  • Completion handler to receive a completion signal when this completions completes.

    Parameters

    • completionHandler: ((res: AsyncResult<T>) => void) | Handler<AsyncResult<T>>

    Returns void

isCompleted

  • isCompleted(): boolean
  • Returns boolean

isFailed

  • isFailed(): boolean
  • Returns boolean

isSucceeded

  • isSucceeded(): boolean
  • Returns boolean

resolve

  • resolve(future: Promise<T>): void
  • Completes the future upon completion, otherwise fails it.

    Parameters

    • future: Promise<T>

    Returns void

Generated using TypeDoc